Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
..
Failed to load latest commit information.
lang Added gettext and JSONTranslations with gettext example
public/lang Added gettext and JSONTranslations with gettext example
Gettext.py
README Added gettext and JSONTranslations with gettext example
__main__.py Track url/domain/lang in JSONTranslations
build.sh Added gettext and JSONTranslations with gettext example
i18n.py Track url/domain/lang in JSONTranslations
update_json.sh Added gettext and JSONTranslations with gettext example
update_mo.sh Added gettext and JSONTranslations with gettext example
update_po.sh Added gettext and JSONTranslations with gettext example

README

This is an example of the use of pyjamas.JSONTranslations, which 
is some sort of gettext implementation. The JSONTranslations 
class extends the NullTranslations from the python gettext module.


The following shell scripts are used:
update_po.sh : updates the translations files (*.po) in lang/
update_mo.sh : compiles the translations files in lang/
update_json.sh : transform the *.mo files to json files that
                 can be used by the JSONTranslations class

To add a translation, copy the Gettext_en_US.po and do the
translations for all msgids. Then run update_mo.sh and update_json.sh.
Finally add your language to the 'lang' list in Gettext.py.

The update_po.sh is needed when you added messages to Gettext.py.


Something went wrong with that request. Please try again.