summaryrefslogtreecommitdiff
path: root/src/leap/config/baseconfig.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/config/baseconfig.py')
-rw-r--r--src/leap/config/baseconfig.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/leap/config/baseconfig.py b/src/leap/config/baseconfig.py
index b80fd419..b6890d09 100644
--- a/src/leap/config/baseconfig.py
+++ b/src/leap/config/baseconfig.py
@@ -159,10 +159,13 @@ class LocalizedKey(object):
"""
descriptions = self._func(instance)
description_lang = ""
- if lang in descriptions.keys():
- description_lang = descriptions[lang]
- else:
- logger.warning("Unknown language: %s" % (lang,))
+ config_lang = "en"
+ for key in descriptions.keys():
+ if lang.startswith(key):
+ config_lang = key
+ break
+
+ description_lang = descriptions[config_lang]
return description_lang
def __get__(self, instance, instancetype):