How to contribute translations to Bookworm

By Liza Daly
March 11, 2009 | Comments: 6

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.

Bookworm runs on the Django framework, and Django supports these languages. They're all fair game.

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.

  1. Spanish
  2. German Done!
  3. Danish Done!
  4. Simplified Chinese
  5. Finnish Done!
  6. Russian
  7. Italian
  8. French

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/
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 ""
"    For more information, try reading the <a href=\"%(abouturl)s\">About</a> "
"page for some background on the goals and strengths of Bookworm.\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
the context.

Ready to help?

Join the Bookworm Translators list or email with the language you want to work on and we'll set you up.


Hope there will be more volunteers to join Bookworm.

Very good to hear Russian is on the way, i have trouble some times working out the English

Need help with the Italian translation?

Nice to read about bookworm here!

You should omit the comment in your translation; it's just a guide to
the context.

The french translation will most appreciated, thankyou.



The free platform for reading EPUB books online from any device.

Integrated with O'Reilly Labs 02/09/09.

First translations added 03/11/09.

Feedbooks integration & one-click addition added 07/29/09.

Beta Projects

Open Feedback Publishing System (OFPS)

Participate in collaborative community feedback to help refine in-progress, open manuscripts like Building iPhone Apps with HTML, CSS, and JavaScript or the published Programming Scala.

Released 05/20/09.

O'Reilly Product Metadata Interface (OPMI)

Want to know all we know about an  O'Reilly book? Give us an ISBN and we'll let you in on our (RDF) secrets!

Released 02/09/09.

Open Source

DocBook-XSL 1.74.3 with Improved ePub Output

Keith Fahlgren (O'Reilly Media) helped release the stable 1.74.3 release of the open source DocBook-XSL project and improved the EPUB generation stylesheets. Paul Norton (Adobe) and Liza Daly (Threepress) provided very helpful patches.

Released 02/17/09.

DocBook-XSL 1.74.0 EPUB Output

Paul Norton (Adobe) and Keith Fahlgren (O'Reilly Media) have contributed code to the 1.74.0 release of the open source DocBook-XSL project that generates EPUB documents from DocBook. An alpha-quality reference implementation in Ruby was also been provided.

EPUB is an open standard of  the The International Digital Publishing Forum (IDPF) and something O'Reilly is trying  to help gain wider adoption.

Released 06/02/08.