| Version 10 (modified by luis, 2 years ago) |
|---|
Getting Umit translated to your language
$ svn co http://svn.umitproject.org/svnroot/umit/network-scanner/trunk umit-svn
Starting a new translation
- Copy share/locale/umit.pot to your lang.po, example:
$ cp share/locale/umit.pot zh_SG.po
- Use your favourite translator application or just a text editor to translate your new po file. If you opt to chose a common text editor, you will notice that the file format is straightforward. The "msgid" part is the source string, the "msgstr" part is the translated string.
- After translating you will have to compile the .po file (if you don't have gettext utilities installed, you can optionally use utils/i18n/msgfmt.py here):
$ msgfmt -o umit.mo lang.po
- Send lang.po and umit.mo files to a Umit Developer
Updating an existing translation
From time to time new translatable strings are added, changed or removed from Umit's code, so it is important to verify if your translation needs updating. The common way to do this verification is using msgmerge so you can check for differences.
$ msgmerge old_translation.po umit.pot -o merged_translation.po
Testing Translations
$ python utils/i18n/check_po.py ... $ LANG=lang python umit
Umit Developers
- Remember to update umit.pot (share/locale/umit.pot) after adding, updating or removing translatable strings: (this actually recreates)
$ python utils/i18n/potmanager.py
- To compile pot files to .mo:
$ python utils/i18n/potmanager.py -compile
- Structure for share/locale:
- LANG/LC_MESSAGES/umit.mo
- LANG/LANG.po
