Skip to content
Wen Wang edited this page Jun 26, 2014 · 7 revisions

Kimchi uses GNU Gettext for internationalization. For those not familiar with gettext, the following quick tips should help you to easily perform some basic tasks related to kimchi i18n:

If you add new translatable strings to any existing *.html.tmpl file, Then you need to update the translation catalog and rebuild the object files under the top workspace directory, please make sure "./autogen.sh" have been completed successfully before run "make":

make -C po update-po
make -C po all

After which, Information about the messages that have/haven't been translated and also some fuzzy translations are provided. Fuzzy translations are translated by Gettext and possibly need some improvement which looks like this:

#, fuzzy
msgid "Untranslated sentences"
msgstr "Sentences translated by Gettext"

Remove the annotation with word "fuzzy" which starts with a pound sign and check whether the msgstr message is appropriate. If not, please have it changed to the correct one.

If you add a new *.html.tmpl file, Then you must add that file to the list of files that contain translatable strings:

echo "ui/pages/new.html.tmpl" >> po/POTFILES.in

If you want to add support for a new language, Then you must register the new language code and rebuild.

echo "xx_XX" >> po/LINGUAS
make -C po all

If you want to check the status of translations, Then run the following command:

rm po/*.gmo
make -C po update-gmo

Since the patch i18n patch could include non-ASCII characters, you will get the following prompt:

Which 8bit encoding should I declare [UTF-8]?

when you send the patch by git-send-email. You could just press ENTER to accept the UTF-8 as the encoding. Or you could specify it you git config like this:

[sendemail]
assume8bitEncoding = UTF-8 
Clone this wiki locally