81
by Jason Conti
Adding support for gettext translations and a pointless en_US translation as an example. Using distutils-extra to automatically build the translations and the bonobo server. Replaced the build_servers target with update_prefix. This performs basically the same as build_servers except that it will do the substitution on any .in file, and it just writes the output file without the .in, instead of adding it to the data file install list. |
1 |
"""
|
2 |
Translations.py
|
|
3 |
by Jason Conti
|
|
4 |
March 8, 2010
|
|
5 |
||
6 |
Code for working with gettext translations.
|
|
7 |
"""
|
|
8 |
||
9 |
import gettext |
|
10 |
from gettext import lgettext as _ |
|
119
by Jason Conti
Replaced N_ with ngettext so xgettext can find it without having to add --keyword arguments. Updated the pot file. |
11 |
from gettext import lngettext as ngettext |
81
by Jason Conti
Adding support for gettext translations and a pointless en_US translation as an example. Using distutils-extra to automatically build the translations and the bonobo server. Replaced the build_servers target with update_prefix. This performs basically the same as build_servers except that it will do the substitution on any .in file, and it just writes the output file without the .in, instead of adding it to the data file install list. |
12 |
if hasattr(gettext, "bind_textdomain_codeset"): |
13 |
gettext.bind_textdomain_codeset("recent-notifications", "UTF-8") |
|
14 |
gettext.textdomain("recent-notifications") |