[server] Allow setting an InternalManager's preferred language
authorJulien Cristau <julien.cristau@logilab.fr>
Tue, 17 Dec 2013 11:50:12 +0100
changeset 9479 f13fbab0c718
parent 9478 2d7521881d3d
child 9480 14159c600dad
[server] Allow setting an InternalManager's preferred language Related to #3381521
server/session.py
--- a/server/session.py	Mon Jan 27 16:19:49 2014 +0100
+++ b/server/session.py	Tue Dec 17 11:50:12 2013 +0100
@@ -1770,11 +1770,12 @@
     bootstrapping the repository or creating regular users according to
     repository content
     """
-    def __init__(self):
+    def __init__(self, lang='en'):
         self.eid = -1
         self.login = u'__internal_manager__'
         self.properties = {}
         self.groups = set(['managers'])
+        self.lang = lang
 
     def matching_groups(self, groups):
         return 1
@@ -1787,7 +1788,7 @@
 
     def property_value(self, key):
         if key == 'ui.language':
-            return 'en'
+            return self.lang
         return None
 
     def prefered_language(self, language=None):