Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Hiro
GetTor
Commits
a80ed49f
Commit
a80ed49f
authored
May 22, 2019
by
Hiro
🏄
Browse files
Assign default locale
parent
d43b45af
Changes
1
Hide whitespace changes
Inline
Side-by-side
gettor/utils/strings.py
View file @
a80ed49f
...
...
@@ -92,7 +92,7 @@ def get_locales():
locales
=
json
.
load
(
f
)
return
locales
def
load_strings
(
current_locale
):
def
load_strings
(
current_locale
=
'en'
):
"""
Loads translated strings and fallback to English
if the translation does not exist.
...
...
@@ -112,7 +112,7 @@ def load_strings(current_locale):
strings
=
{}
for
s
in
translations
[
current_locale
]:
strings
[
s
]
=
translations
[
current_locale
][
s
]
def
translated
(
k
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment