mirror of
https://github.com/onionshare/onionshare.git
synced 2025-07-25 23:55:36 -04:00
if a string doesn't exist, fallback to English
This commit is contained in:
parent
c8f3632fa4
commit
5475038d79
1 changed files with 4 additions and 1 deletions
|
@ -103,7 +103,10 @@ def load_strings(default="en"):
|
||||||
if lc:
|
if lc:
|
||||||
lang = lc[:2]
|
lang = lc[:2]
|
||||||
if lang in translated:
|
if lang in translated:
|
||||||
strings = translated[lang]
|
# if a string doesn't exist, fallback to English
|
||||||
|
for key in translated[default]:
|
||||||
|
if key in translated[lang]:
|
||||||
|
strings[key] = translated[lang][key]
|
||||||
return strings
|
return strings
|
||||||
|
|
||||||
def file_crunching(filename):
|
def file_crunching(filename):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue