Translating
The Enlightenment translation system uses a collection of ".po" files created using the gettext standard and located in SVN.
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.
Table of Contents
Translating from source code
The basic way of translating is creating template files with source code and merge them with existing translation files (or initializing your language if you are just about to start a new one), then submit them to Enlightenment Internationalisation List.
Creating the .pot files
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, still, if you have the urge of running the command manually just follow the instructions.
Enlightenment's .pot
From the root enlightenment source dir (e) run the following command:
xgettext -C --foreign-user -k -k_ -kd_ -o enlightenment.pot `find . -name "*.[ch]" -print`
Don't forget to add the option -p /path/to/output if you want to change the output directory.
Module's .pot
From the root of the module you want to translate run the following command:
xgettext -C --foreign-user -kD_ -o module_name.pot `find . -name "*.[ch]" -print`
Don't forget to add the option -p /path/to/output if you want to change the output directory, and change -o module_name.pot for a unique name to avoid overwriting other translations.
Merging translations
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.pot 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 "updated.pot" and it will be saved in your current working directory.
Beginning the Translation
Once you have the updated ".po" file, you can begin making the changes you wish by using a plain text editor or one of the following alternatives.
- 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.
- gtranslator an enhanced gettext po file editor for GNOME.
Test your Translation
When your translation is (almost) complete, you may want to test it. First you have to build the ".mo" file. This file contents the translation in a binary form, which is actually used by the application (here enlightenment). To build the binary file use the programm msgfmt. msgfmt es.po -o enlightenment.mo And then copy this file in the path $(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.
Share your Translation
If you are satisfied with your translation, you can share it with other e-users. Just send the ".po" file to the intl mailing list and your translation will hopefully be added to enlightenment.
Translating using Launchpad
Launchpad is a platform can be used for translators to ease their work, so that they don't need to care for too much technical issues and make it possible for focusing on the content needs to be translated. Enlightenment project's translation is available at https://translations.launchpad.net/enlightenment .
The relation between Launchpad translation and mailing list is simple, that Launchpad is another alternate for translator choices and won't be conflict with the previously mentioned way. Currently Aron Xu is doing the synchronizing work to keep templates and translations are in good shape both side, but it is clear that contributions on Launchpad will be delayed to appear in the e svn. The translation sync will take place during (or some time before, perhaps) every code freeze, and template update on Launchpad will be more often.
At present there aren't many translators working with the mailing list, so the possibility of conflict is small, but when it occurs, the translations submitted to mailing list will be legal, and the translator will be notified that there are hands on Launchpad so they can cooperate in some way they'd like to choose.
Help wanted!
Aron need some hands to help making sure he won't miss any freeze and update, he's personal time is reducing because he is nearly go to college and must pay more time on getting a better grade.
Other resources
We have set up a Damned-Lies web interface to show the statistics and template files for every language/module in e svn, data will update every day. It is accessible at http://l10n.enlightenment.org/ .
If you need to add a language/module to it, please ping Aron Xu at happyaron (dot) xu (at) gmail (dot) com.
Thanks to Claude Paroz, who maintains the Damned-Lies and help make it possible for our use.
Attachments
-
Anjuta_attach.2.jpg
(45.6 KB) - added by buergi
3 weeks ago.
Image by Audifahrer from old wiki
-
Anjuta_main.2.jpg
(125.8 KB) - added by buergi
3 weeks ago.
Image by Audifahrer from old wiki
