summaryrefslogtreecommitdiff
path: root/onionshare/strings.py
diff options
context:
space:
mode:
Diffstat (limited to 'onionshare/strings.py')
-rw-r--r--onionshare/strings.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/onionshare/strings.py b/onionshare/strings.py
index 643186dd..76360a42 100644
--- a/onionshare/strings.py
+++ b/onionshare/strings.py
@@ -35,14 +35,14 @@ def load_strings(common):
# Load all translations
translations = {}
for locale in common.settings.available_locales:
- locale_dir = common.get_resource_path('locale')
+ locale_dir = common.get_resource_path("locale")
filename = os.path.join(locale_dir, "{}.json".format(locale))
- with open(filename, encoding='utf-8') as f:
+ with open(filename, encoding="utf-8") as f:
translations[locale] = json.load(f)
# Build strings
- default_locale = 'en'
- current_locale = common.settings.get('locale')
+ default_locale = "en"
+ current_locale = common.settings.get("locale")
strings = {}
for s in translations[default_locale]:
if s in translations[current_locale] and translations[current_locale][s] != "":
@@ -57,4 +57,5 @@ def translated(k):
"""
return strings[k]
+
_ = translated