aboutsummaryrefslogtreecommitdiff
path: root/desktop/src
diff options
context:
space:
mode:
authorMax1Truc <max1truc@disroot.org>2021-10-27 11:47:17 +0200
committerMax1Truc <max1truc@disroot.org>2021-10-27 11:47:17 +0200
commite9ef087c8fcb3839eb77aa090de0a66f38e8e581 (patch)
treecb039c11dba2e5a2742aed53ffaa164b589a6c3a /desktop/src
parent357e3efead8e54b7b1551b902746b37c6715c811 (diff)
downloadonionshare-e9ef087c8fcb3839eb77aa090de0a66f38e8e581.tar.gz
onionshare-e9ef087c8fcb3839eb77aa090de0a66f38e8e581.zip
Fix "KeyError: 'fr'" in desktop strings.py
Diffstat (limited to 'desktop/src')
-rw-r--r--desktop/src/onionshare/strings.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/desktop/src/onionshare/strings.py b/desktop/src/onionshare/strings.py
index c4192a33..55f56788 100644
--- a/desktop/src/onionshare/strings.py
+++ b/desktop/src/onionshare/strings.py
@@ -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]