Exemple #1
0
 def __init__(self, browser_langs, *a, **kw):
     FakeAccount.__init__(self, *a, **kw)
     if browser_langs:
         lang = browser_langs[0]
         content_langs = list(browser_langs)
         content_langs.sort()
     else:
         lang = 'en'
         content_langs = 'all'
     self._defaults = self._defaults.copy()
     self._defaults['pref_lang'] = lang
     self._defaults['pref_content_langs'] = content_langs
     self._load()
Exemple #2
0
 def __init__(self, browser_langs, *a, **kw):
     FakeAccount.__init__(self, *a, **kw)
     if browser_langs:
         lang = browser_langs[0]
         content_langs = list(browser_langs)
         content_langs.sort()
     else:
         lang = 'en'
         content_langs = 'all'
     self._defaults = self._defaults.copy()
     self._defaults['pref_lang'] = lang
     self._defaults['pref_content_langs'] = content_langs
     self._load()
Exemple #3
0
 def __init__(self, browser_langs, *a, **kw):
     FakeAccount.__init__(self, *a, **kw)
     if browser_langs:
         lang = browser_langs[0]
         content_langs = list(browser_langs)
         # try to coerce the default language 
         if g.lang not in content_langs:
             content_langs.append(g.lang)
         content_langs.sort()
     else:
         lang = g.lang
         content_langs = 'all'
     self._defaults = self._defaults.copy()
     self._defaults['pref_lang'] = lang
     self._defaults['pref_content_langs'] = content_langs
     self._defaults['pref_frame_commentspanel'] = False
     self._load()
Exemple #4
0
 def __init__(self, browser_langs, *a, **kw):
     FakeAccount.__init__(self, *a, **kw)
     if browser_langs:
         lang = browser_langs[0]
         content_langs = list(browser_langs)
         # try to coerce the default language
         if g.lang not in content_langs:
             content_langs.append(g.lang)
         content_langs.sort()
     else:
         lang = g.lang
         content_langs = 'all'
     self._defaults = self._defaults.copy()
     self._defaults['pref_lang'] = lang
     self._defaults['pref_content_langs'] = content_langs
     self._defaults['pref_frame_commentspanel'] = False
     self._load()
Exemple #5
0
 def __init__(self, browser_langs, *a, **kw):
     FakeAccount.__init__(self, *a, **kw)
     if browser_langs:
         lang = 'ro'#browser_langs[0]
         langsplus = ['ro']
         if  'ro' in browser_langs:
             browser_langs.remove('ro')
         langsplus.extend(browser_langs)            
         content_langs = list(langsplus)
         content_langs.sort()
     else:
         lang = g.lang
         content_langs = 'all'
     self._defaults = self._defaults.copy()
     self._defaults['pref_lang'] = lang
     self._defaults['pref_content_langs'] = content_langs
     self._defaults['pref_frame_commentspanel'] = False
     self._load()