[IIAB] translation - irc transcript

Chris Leonard cjlhomeaddress at gmail.com
Thu Jul 25 18:19:55 PDT 2013


On Thu, Jul 25, 2013 at 8:40 PM,  <thinkndev at gmail.com> wrote:
> Hello,
>
> That's a lot of languages to be done, even more surprising that it can be
> done. Can someone explain how translations are made via pootle? I don't mind
> doing translations in Korean, if that is a language to include.


Pootle is actually very simple. The real magic is in setting up the
code for internationalization (i18n).  You flag UI strings in the code
and tehn use tools like gettext t oextract them into a POT (template)
file that us used to create PO files.

A PO file entry looks something like this:

#: gutenberg.py:183 templates/macros/_misc.html:30
#: templates/macros/_misc.html:67 templates/macros/_misc.html:100
msgid "Author"
msgstr ""

#: zim_views.py:exampleonly
#, python-format
msgid "Unknown Exception: %(error)s"
msgstr ""

Poolte just creates individual copies of the POT file for each
language and presents them for translation.

In this line (and lines like it)  Exception: %(error)s you do not
change the stuff between "%" and "s" because that is as string
substitution.

so "알 수 없는 오류 %(error)s" for example.

Once completed, PO files are committed, then during the build proecss
transformed into MO files.  At runtime, gettext substitutes in the
correct language UI messages from the MO file.

I'll need to create an account for you, contact me with your preferred
username and I'll create the account.

cjl



More information about the IIAB mailing list