cwconfig.py
changeset 5444 f7fdb5dd82f6
parent 5442 3ed8afbbdf70
child 5473 ee87c5352e63
--- a/cwconfig.py	Thu Apr 29 14:21:59 2010 +0200
+++ b/cwconfig.py	Fri Apr 30 12:14:15 2010 +0200
@@ -664,7 +664,8 @@
         self.debugmode = debugmode
         self.adjust_sys_path()
         self.load_defaults()
-        self.translations = {}
+        # will be properly initialized later by _gettext_init
+        self.translations = {'en': (unicode, lambda ctx, msgid: unicode(msgid) )}
         # don't register ReStructured Text directives by simple import, avoid pb
         # with eg sphinx.
         # XXX should be done properly with a function from cw.uicfg
@@ -985,7 +986,7 @@
         super(CubicWebConfiguration, self).load_configuration()
         if self.apphome and self.set_language:
             # init gettext
-            self._set_language()
+            self._gettext_init()
 
     def init_log(self, logthreshold=None, force=False):
         """init the log service"""
@@ -1013,7 +1014,7 @@
             if lang != 'en':
                 yield lang
 
-    def _set_language(self):
+    def _gettext_init(self):
         """set language for gettext"""
         from gettext import translation
         path = join(self.apphome, 'i18n')