diff options
author | Tomás Touceda <chiiph@leap.se> | 2013-03-08 13:15:38 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2013-03-08 13:15:38 -0300 |
commit | 926575bc811e8382100695a3396da7191fb43eb3 (patch) | |
tree | ed5326517f1d1d6952eb5639d82230717c381812 /src/leap/config | |
parent | 977bd769b78596346f3c999e6bdb8523dc0929e4 (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.py | 11 |
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): |