[Home]Internationalization

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

Translating EMC2

Translations use the [GNU gettext system].

To create a new translation, first prepare your system to compile emc and get a checkout of the current source code, as described here: Installing EMC2.

After compiling emc2, you will find several files with the ".pot" extension in the src/po directories. For each of these you copy the file to a new ".po" file for your language--the two letter code for Spanish is "es". For example, copy "rs274_err.pot" to "es_rs274_err.pot". At the top of the file, enter some information that identifies the translation, the translator, and so on.

Next, for each message in es_rs274_err.pot, write the translation. (For messages that you skip, the original text will be shown instead)

When you want to test your translation, execute "make" again, then run the version emc you built.

There is more information about the process of producing translations in the file src/po/README, and in the documentation for gnu gettext which you can see by running 'info gettext' in the terminal after installing the gettext package.

If you are a developer, simply check in the .po and .msg files after you have updated and tested them. If you are not a developer, then e-mail a developer the updated version of these files.

.pot file.po file patternUsed to translate
tcl.potde_DE.poall files in tcl/ including the mini and tkemc GUIs
rs274_err.potde_DE_rs274_err.pothe interpreter's error messages
axis.potde_DE_axis.pothe axis GUI and other Python programs

Examples

AXIS has translations for German, Hungarian, Italian, Portuguese, Romanian, and a couple more. There are translations for German, Romanian, and a partial Japanese translation for mini and TkEmc. You can use TkEmc or mini in your language by exporting the LANG variable with the ISO two-letter code for your language. On Ubuntu machines running AXIS, it may be necessary to set both LANGUAGE and LANG (e.g., LANGUAGE=de LANG=de_DE.UTF-8) or unset LANGUAGE and set only LANG.

Examples

 export LANG=de ; scripts/emc 
 env LANG=ja scripts/emc 


LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org
This page is read-only. Follow the BasicSteps to edit pages. | View other revisions
Last edited June 21, 2009 1:48 pm by JeffEpler (diff)
Search:
Published under a Creative Commons License