[open-ils-commits] r34 - servres/trunk/conifer
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Nov 19 22:44:30 EST 2008
Author: gfawcett
Date: 2008-11-19 22:44:28 -0500 (Wed, 19 Nov 2008)
New Revision: 34
Modified:
servres/trunk/conifer/genshi_support.py
Log:
made i18n optional in genshi_support
Modified: servres/trunk/conifer/genshi_support.py
===================================================================
--- servres/trunk/conifer/genshi_support.py 2008-11-20 03:26:01 UTC (rev 33)
+++ servres/trunk/conifer/genshi_support.py 2008-11-20 03:44:28 UTC (rev 34)
@@ -8,12 +8,16 @@
import gettext
from conifer.middleware.genshi_locals import get_request
-translations = gettext.GNUTranslations(file('locale/%s/LC_MESSAGES/conifer-syrup.mo' % settings.LANGUAGE_CODE))
+if settings.USE_I18N:
+ translations = gettext.GNUTranslations(
+ file('locale/%s/LC_MESSAGES/conifer-syrup.mo' % settings.LANGUAGE_CODE))
+ _ = translations.ugettext
+else:
+ _ = gettext.gettext
-_ = translations.ugettext
-
def template_loaded(template):
- template.filters.insert(0, Translator(translations.ugettext))
+ if settings.USE_I18N:
+ template.filters.insert(0, Translator(translations.ugettext))
dirs = ['templates']
More information about the open-ils-commits
mailing list