Browse Source

fixes language sort problem, for just one language

master
age 14 years ago
parent
commit
007137d6a9
  1. 3
      src/cryptobox/web/dataset.py
  2. 3
      src/cryptobox/web/sites.py

3
src/cryptobox/web/dataset.py

@ -57,7 +57,8 @@ class WebInterfaceDataset(dict):
for key in self.keys():
if key.startswith("Data.Languages."):
del self[key]
langs = self.cbox.prefs["WebSettings"]["Languages"][:]
langs = []
langs.append(self.cbox.prefs["WebSettings"]["Languages"][:])
langs.sort()
for (index, lang) in enumerate(langs):
try:

3
src/cryptobox/web/sites.py

@ -458,7 +458,8 @@ class WebInterfaceSites:
3. languages defined in the config file
"""
## start with the configured language order
lang_order = self.cbox.prefs["WebSettings"]["Languages"][:]
lang_order = []
lang_order.append(self.cbox.prefs["WebSettings"]["Languages"][:])
self.cbox.log.debug(
"updating language preferences (default: %s)" % str(lang_order))
## put the preferred browser language in front

Loading…
Cancel
Save