-
Notifications
You must be signed in to change notification settings - Fork 8
Localization (help wanted)
All issues that have an impact on user facing-strings should be tagged with the "localization" label.
For closed issues, this indicates development work that has been done that has modified or added English text, and the work to add translations for the supported languages can be started.
For open issues, this indicates an expectation that translations are going to be needed for the functionality identified in the issue.
The TortoiseSI project uses gettext PO (portable object) files for its translation. PO files are plain text, so you can even translate using a normal text editor. The only thing you have to take care of is that the editor can handle the UTF-8 charset. There is a wide range of tools out there that can handle and manipulate PO files. We recommend that you use poEdit (http://poedit.sourceforge.net) on Windows or lokalize (http://userbase.kde.org/Lokalize) on Linux.
This description assumes that you use poEdit.
If you want to implement a new language for TortoiseSI do the following.
-
Use TortoiseGIT (or any other GIT client) to clone: git clone https://github.com/PTC-ALM/TortoiseSI.git (You will get more than one file) or point your browser to: https://github.com/PTC-ALM/TortoiseSI/tree/master/Languages right-click on Tortoise.pot and save this file to your local harddisk. Tortoise.pot is the portable object template (hence .pot) for the translation.
-
Rename Tortoise.pot to Tortoise_xx.po, where xx is your two letter ISO-639-1 language code. Look up your language code here: http://www.loc.gov/standards/iso639-2/langcodes.html If you want to translate into a language that has two different locales and you really need the second locale, add the two letter ISO-3166 locale code. If you're not sure about your country code, look here: http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html. Please keep in mind that we would like to have as few translations as possible that cover as many languages as possible. As an example, it would be very difficult to maintain a (de_CH) Swiss German, (de_AT) Austrian German and (de_DE) German German translation. But if it's necessary like in Chinese, sure go ahead. We are happy with simplified (zh_CN) and traditional (zh_TW) Chinese.
-
Now translate what you can using poEdit. If you are not sure with one or the other translation, mark it as "fuzzy". You can enter a comment in poEdit to give some information about your thoughts to other trans- lators. If you are not sure about the meaning of the original sentence reach out to the TortoiseSI team.
-
Add a header with '#' comments to the PO file using a normal text edi- tor that explains which language you translated and the terminology you used, like:
-
Make sure your file is saved in UTF-8 encoding and that it does not begin with UTF-8 BOMs (Byte Order Marks)
-
Create a pull request with Tortoise_xx.po on the TortoiseSI GitHub.
-
Tortoise.pot and the Tortoise_xx.po you want to improve
-
Start poEdit with Tortoise_xx.po and select "Update from .pot file" from the "Catalog" Menu
-
Select Tortoise.pot and wait until poEdit has finished merging the template and the current translation.
-
The untranslated strings (and fuzzy translations) are always at the top of the list.
-
Translate what you can and create a pull request on the TortoiseSI GitHub containing the updated PO file.
That's all you have to do. We'll take care of creating the resource dlls and installers for the different language packs.
If you want to test the translations you made yourself, before you release them, you need four things:
- The "raw" resource dlls for your version of TortoiseSI. Other dlls won't work. These can be copied from your Languages folder in the TortoiseSI installation (assuming you installed the appropriate language pack).
- The pot file for your version of TortoiseSI
- Any po file for your language. Pick the latest po file from trunk
- The ResText utility that is used to insert the data from the po file into your resource dlls. Note this can be built from src using the Release configuration
Once you finished your installation, you run:
restext apply TortoiseProcLang.dll ..\bin\TortoiseProcNNNN.dll Tortoise_CC.po
restext apply TortoiseShellLang.dll ..\bin\TortoiseShellLangNNNN.dll Tortoise_CC.po
where NNNN is your four digit country code (1031 for germany) and CC is your 2 letter country code (de for germany)
You can find the four digit country code at http://www.microsoft.com/globaldev/reference/lcid-all.mspx under the column LCID dec.
After successfully creating your dlls, copy them into: C:\Program Files\TortoiseSI\Languages If you set your Windows Display language to match that of your language dll, then translations should be picked up and used by TortoiseSI.