mirror of
https://github.com/onionshare/onionshare.git
synced 2025-07-23 23:01:26 -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:
|
||||
lang = lc[:2]
|
||||
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
|
||||
|
||||
def file_crunching(filename):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue