Page MenuHomePhabricator

Updated 2,099 Days AgoPublic

(Placeholder page for proper/updated guidelines for contributing translations.)

The Enlightenment translation system uses a collection of ".po" files created using the gettext standard and located in Git.

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.

Translating from source code

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.

Creating the template (.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, then move to the /po subdirectory and run the command "make update-po".

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.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.

Beginning the Translation

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.

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 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

And then copy the file in the following directory $(PREFIX)/share/locale/YOUR_LANGUAGE/LC_MESSAGES/
Here an example for a spanish translation:

sudo cp /e17/opt/share/locale/es/LC_MESSAGES/

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 Enlightenment users. Just send the ".po" file to the Enlightenment Internationalization mailing list and your translation will hopefully be added to Enlightenment.

Last Author
Last Edited
Nov 21 2013, 9:10 AM
ragecryx, Drakevr

Document Hierarchy