mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 09:21:39 +00:00
minor py3 fix: language setting in qt/preferences
This commit is contained in:
parent
d7750c73e6
commit
9fb927a068
1 changed files with 4 additions and 2 deletions
|
@ -2606,9 +2606,11 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
|||
lang_combo = QComboBox()
|
||||
from electrum.i18n import languages
|
||||
lang_combo.addItems(list(languages.values()))
|
||||
lang_keys = list(languages.keys())
|
||||
lang_cur_setting = self.config.get("language", '')
|
||||
try:
|
||||
index = languages.keys().index(self.config.get("language",''))
|
||||
except Exception:
|
||||
index = lang_keys.index(lang_cur_setting)
|
||||
except ValueError: # not in list
|
||||
index = 0
|
||||
lang_combo.setCurrentIndex(index)
|
||||
if not self.config.is_modifiable('language'):
|
||||
|
|
Loading…
Add table
Reference in a new issue