mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-22 20:51:27 -05:00
Merge pull request #1454 from Max1Truc/fix-bad-locale
Fix "KeyError: 'fr'" in desktop strings.py
This commit is contained in:
commit
182b6bb67b
@ -43,7 +43,11 @@ def load_strings(common, locale_dir):
|
||||
current_locale = common.settings.get("locale")
|
||||
strings = {}
|
||||
for s in translations[default_locale]:
|
||||
if s in translations[current_locale] and translations[current_locale][s] != "":
|
||||
if (
|
||||
current_locale in translations
|
||||
and s in translations[current_locale]
|
||||
and translations[current_locale][s] != ""
|
||||
):
|
||||
strings[s] = translations[current_locale][s]
|
||||
else:
|
||||
strings[s] = translations[default_locale][s]
|
||||
|
Loading…
Reference in New Issue
Block a user