server/session.py
changeset 5444 f7fdb5dd82f6
parent 5443 f299ee54d7e0
child 5557 1a534c596bff
--- a/server/session.py	Thu Apr 29 14:21:59 2010 +0200
+++ b/server/session.py	Fri Apr 30 12:14:15 2010 +0200
@@ -302,16 +302,15 @@
 
     def set_language(self, language):
         """i18n configuration for translation"""
-        vreg = self.vreg
         language = language or self.user.property_value('ui.language')
         try:
-            gettext, pgettext = vreg.config.translations[language]
+            gettext, pgettext = self.vreg.config.translations[language]
             self._ = self.__ = gettext
             self.pgettext = pgettext
         except KeyError:
-            language = vreg.property_value('ui.language')
+            language = self.vreg.property_value('ui.language')
             try:
-                gettext, pgettext = vreg.config.translations[language]
+                gettext, pgettext = self.vreg.config.translations[language]
                 self._ = self.__ = gettext
                 self.pgettext = pgettext
             except KeyError: