We've enabled internationalization support for the user interface and help text in Bookworm and are looking for help in translating it into various languages.
To start we're just assigning one language per person to get through the bulk of the work. After that, periodic updates will be required as the Bookworm text shifts over time, and anyone will be welcome to help.
These languages are in progress. We'll keep this list updated.
- German Done!
- Danish Done!
- Simplified Chinese
- Finnish Done!
How to translate
Django uses the GNU gettext package and generates a
django.po file for each supported language.
Each entry in
django.po looks like this:
#: library/templates/help.html:35 library/templates/help.html.py:129 msgid "Can I use Bookworm with my e-reader?" msgstr ""
The first comment lists all the occurrences of the message id in the source. These can be looked up by browsing the Bookworm code.
msgid is the untranslated string.
msgstr would contain the translated string.
Some message pairs will have embedded variables, like:
#: library/templates/about.html:94 #, python-format msgid "" " <a href=\"%(toururl)s\">Take the tour</a> to see an example of Bookworm " "in action. \n" msgstr ""
Those variables should be preserved as
%(toururl)s, but placed in the appropriate location in the sentence.
The translated text needs to be in double-quote marks. Double-quote marks inside the string should be escaped with a \, as in the example above.
There's often extraneous whitespace in the original. You need to replicate that, unfortunately, including all of the "\n" characters. So your translation here would look like:
#: library/templates/help.html:52 #, python-format msgid "" "\n" " For more information, try reading the <a href=\"%(abouturl)s\">About</a> " "page for some background on the goals and strengths of Bookworm.\n" " " msgstr "\n" " Here is where I put my translation.\n" " "
Finally, sometimes I've put in comments that are meant as notes for
the translators. For example:
#: library/templates/epub.html:88 msgid "Tables <!-- trans: HTML tables --> " msgstr ""
You should omit the comment in your translation; it's just a guide to
Ready to help?