Project

General

Profile

Translating » History » Revision 4

Revision 3 (Lukas Zapletal, 04/02/2013 05:38 AM) → Revision 4/73 (Lukas Zapletal, 04/02/2013 09:25 AM)

h1. Translating (for contributors) 

 How to translate Foreman 

 h2. Using Transifex 

 Go to https://www.transifex.com/projects/p/foreman and register/login. Then you can use the Transifex interface to do all translations. The project on Transifex automatically updates when we add new strings into git. Foreman team regularly downloads new translations to the develop branch in git as well, therefore there is no action needed when you finish with translations. It will be pulled eventually (e.g. before the next release). 

 h2. Manually 

 If you prefer, you can edit PO files directly using your preferred editor. Please make sure the encoding of the files is UTF-8. It is also recommended to test your translations before submitting a Pull Request on the github using either: 

   foreman# rake gettext:pack 

 or 

   foreman# make -C locale 

 The above command should not print any error message. Also you should start Foreman UI and see if your translations do fit (sometimes longer strings can wrap or even break the UI). If you start Foreman in the production mode, you need to do one of the above commands every time you change your translation. In the development mode, you only need to restart Foreman to see the changes. 

 More info about contributing your translation directly is on our [[Contribute]] wiki page.  

 h1. How to pull translations (for developers) 

 To get updated translations from Transifex you will need account there (https://www.transifex.com) and the tx cli tool. 

 On Fedora: 

   # yum -y install transifex-client gettext make intltool 

 On Debian: 

   # apt-get install transifex-client gettext make intltool-debian 

 Then configure your account: 

   $ cat ~/.transifexrc 
   [https://www.transifex.net] 
   hostname = https://www.transifex.net 
   username = <your_username> 
   password = <your_password> 
   token = <should be empty> 

 And then prepare new topic branch (because the following command will make new commits to your git repo): 

   git checkout -b update-translations 

 Finally do the translation pull 

   make -C locale tx-update 

 And then you can push changes. 

   git push ... TBD