diff options
author | Daniel Baeyens <dbaeyens@warp.es> | 2010-06-16 01:38:41 +0200 |
---|---|---|
committer | Eitan Isaacson <eitan@monotonous.org> | 2010-06-16 09:12:42 -0700 |
commit | 4b9ebd473e7a9dc6fbb3983fcda314da582f8bca (patch) | |
tree | dfc861647e8321c11903d8902ee754eff98da77d /caribou/ui/i18n.py.in | |
parent | 85a282e7630bd22aa66f244cad3cd76ff37367e8 (diff) | |
download | caribou-4b9ebd473e7a9dc6fbb3983fcda314da582f8bca.tar.gz |
Project files are reorganized and have consts separated on a new file
New organization:
caribou.common has files not related to the UI
caribou.ui has files related to the UI
Makefiles.am files have been modified to successfully build the package
.gitignore is updated to ignore moved built files
Diffstat (limited to 'caribou/ui/i18n.py.in')
-rw-r--r-- | caribou/ui/i18n.py.in | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/caribou/ui/i18n.py.in b/caribou/ui/i18n.py.in new file mode 100644 index 0000000..067283a --- /dev/null +++ b/caribou/ui/i18n.py.in @@ -0,0 +1,21 @@ +import gettext +from gettext import gettext as _ +import os + +print 'initialized i18n' + +def C_(ctx, s): + """Provide qualified translatable strings via context. + (copied from Orca)""" + translated = gettext.gettext('%s\x04%s' % (ctx, s)) + if '\x04' in translated: + # no translation found, return input string + return s + return translated + +gettext.bindtextdomain ("@GETTEXT_PACKAGE@", + os.path.join ("@prefix@", "@DATADIRNAME@", "locale")) + +gettext.textdomain("@GETTEXT_PACKAGE@") + + |