summaryrefslogtreecommitdiff
path: root/src/leap/config
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-03-08 13:15:38 -0300
committerTomás Touceda <chiiph@leap.se>2013-03-08 13:15:38 -0300
commit926575bc811e8382100695a3396da7191fb43eb3 (patch)
treeed5326517f1d1d6952eb5639d82230717c381812 /src/leap/config
parent977bd769b78596346f3c999e6bdb8523dc0929e4 (diff)
Add translation support
Also: - Make OpenVPN use a random port every time - Logout in parallel so the UI doesn't block - Add the WAIT status from OpenVPN to the mainwindow displays - Support non-unix sockets in the LinuxVPNLauncher
Diffstat (limited to 'src/leap/config')
-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):