mirror of
https://github.com/onionshare/onionshare.git
synced 2025-06-06 22:09:15 -04:00
Fix "KeyError: 'fr'" in desktop strings.py
This commit is contained in:
parent
357e3efead
commit
e9ef087c8f
1 changed files with 5 additions and 1 deletions
|
@ -43,7 +43,11 @@ def load_strings(common, locale_dir):
|
||||||
current_locale = common.settings.get("locale")
|
current_locale = common.settings.get("locale")
|
||||||
strings = {}
|
strings = {}
|
||||||
for s in translations[default_locale]:
|
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]
|
strings[s] = translations[current_locale][s]
|
||||||
else:
|
else:
|
||||||
strings[s] = translations[default_locale][s]
|
strings[s] = translations[default_locale][s]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue