We should pass ugettext instead of gettext into the jinja template env
authorChristopher Allan Webber <cwebber@dustycloud.org>
Tue, 9 Aug 2011 03:32:28 +0000 (22:32 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Tue, 9 Aug 2011 03:32:28 +0000 (22:32 -0500)
Otherwise we might get UnicodeDecodeErrors :)

mediagoblin/util.py

index c9f4a0ac72a48d5264b3eb692ca93cd4fe75a7e9..d26dc6dc6e7129a59c82410b196767b5ca7b6309 100644 (file)
@@ -93,7 +93,7 @@ def get_jinja_env(template_loader, locale):
         extensions=['jinja2.ext.i18n', 'jinja2.ext.autoescape'])
 
     template_env.install_gettext_callables(
-        mg_globals.translations.gettext,
+        mg_globals.translations.ugettext,
         mg_globals.translations.ngettext)
 
     # All templates will know how to ...