From 926575bc811e8382100695a3396da7191fb43eb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Fri, 8 Mar 2013 13:15:38 -0300 Subject: 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 --- src/leap/config/baseconfig.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/leap/config') 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): -- cgit v1.2.3