Thursday, May 26, 2011

Creating A Nepali .po File for Sphinx

Arati Sharma is working with SchoolTool during the last 3 weeks of high school.

There are probably few places anywhere in which a greater number of languages are spoken than in Arlington, Virginia, so it didn't come as a total surprise that W-L High School had several Nepali speaking students in its computer science program.  Arati was one of these students, and now she will be spending 100 hours helping provide SchoolTool documentation for OLE Nepal.

After spending the 1st two days of her internship getting a whirlwind introduction to the Unix CLI, ReST, sphinx, launchpad, and bzr, she started today to work on translating the SchoolTool Book into Nepali.

That's not a task she will finish in 100 hours, so we want to focus on getting the process working well and making contributions to the technologies we are using to support continued work on the project later.

Top on the list of requirements is getting Nepali support into sphinx.  We will be using the information in this post from the sphinx-dev mailing list to get started.

Creating a Sphinx .pot File

Here is what I did (from a unix prompt on a Natty box):
  • sudo aptitude install python-virtualenv python-pip
  • sudo aptitude install python-sphinx mercurial
  • virtualenv --no-site-packages sphinx-nep
  • pip install -E sphinx-nep babel
  • pip install -E sphinx-nep jinja2 --upgrade
  • cd sphinx-nep
  • hg clone
  • cd sphinx
  • ../bin/python extract_messages
  • ../bin/python init_catalog -l ne_NP -i sphinx/locale/sphinx.pot -o sphinx/locale/ne_NP/sphinx.po
That's it!  We now give Arati the sphinx.po file and set her up with the latest sphinx, and she is ready to add Nepali support to sphinx.

1 comment:

  1. Excellent!

    Yeah, I guess filling up 100 hours is pretty easy!