i18n with ugettext instead of gettext
authorgwen <gremond@cadoles.com>
Tue, 22 Apr 2014 15:36:07 +0000 (17:36 +0200)
committerEmmanuel Garette <egarette@cadoles.com>
Sat, 25 Oct 2014 20:21:23 +0000 (22:21 +0200)
tiramisu/i18n.py

index 2677d54..05a03ad 100644 (file)
@@ -52,4 +52,7 @@ gettext.textdomain(APP_NAME)
 gettext.bind_textdomain_codeset(APP_NAME, "UTF-8")
 gettext.translation(APP_NAME, fallback=True)
 
-_ = gettext.gettext
+t = gettext.translation(APP_NAME, fallback=True)
+
+def _(msg):
+    return t.ugettext(msg)