(Placeholder page for proper/updated guidelines for contributing translations.)
Gettext works by extracting a series of crafted strings form the source code files into a ".pot" (translation template file) that will be used later to create the ".po" files for each language.
The basic way of translating is creating template files from the source code and merging them with existing translation files (or initializing a language if you are just about to start a new one) and then submiting them to Enlightenment Internationalization List.
In order for your translation to be up to date, you will need updated ".pot" files. Pot files are created automatically when you run autogen.sh, then move to the /po subdirectory and run the command "make update-po".
If there is a ".po" file for your language that you wish to update, or if you just want to regionalize a general ".po" file (like es_LA.po), you should run the following command to avoid work duplication:
msgmerge -o updated.po e/po/es.po /path/to/enlightenment.pot
Don't forget to change e/po/es.po to the ".po" file you wish to update, "enlightenment.pot" should be the ".pot" file create previously.
The output file will be named "updated.po" and it will be saved in your current working directory.
Once you have an up-to-date ".po" file you can begin making the changes you wish by using a plain text editor or one of the following translation editors.
- poEdit is a cross-platform gettext catalogs editor built with the wxWidgets toolkit.
- KBabel is a set of tools for editing and managing gettext PO files built around the Qt/Kde toolkits.
- Lokalize is a replacement for KBabel.
- gtranslator an enhanced gettext po file editor for GNOME.
- Virtaal is built on the powerful API of the Translate Toolkit.
When your translation is (almost) complete, you may want to test it. First you have to build the ".mo" file. This file contains the translation in a binary form, which is actually used by the application (in our case Enlightenment). To build the binary file use the msgfmt program.
msgfmt es.po -o enlightenment.mo
And then copy the file in the following directory $(PREFIX)/share/locale/YOUR_LANGUAGE/LC_MESSAGES/enlightenment.mo.
Here an example for a spanish translation:
sudo cp enlightenment.mo /e17/opt/share/locale/es/LC_MESSAGES/enlightenment.mo
Be sure that you have your environment set to use your language and restart Enlightenment. Now Enlightenment should use your new translation.
If you are satisfied with your translation, you can share it with other Enlightenment users. Just send the ".po" file to the Enlightenment Internationalization mailing list and your translation will hopefully be added to Enlightenment.