Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
jokester committed Nov 3, 2024
1 parent b32127d commit 746b213
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/translations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ def get_locale() -> Optional[str]:
and current_user.locale != "auto"
and current_user.locale in Locale.ids()
):
# NOTE User.locale is not used
logging.debug("locale from user %s", current_user.locale)
return current_user.locale

Check warning on line 20 in app/translations/__init__.py

View check run for this annotation

Codecov / codecov/patch

app/translations/__init__.py#L19-L20

Added lines #L19 - L20 were not covered by tests
# TODO: allow frontend to override locale in UI
# "zh" locale asssets is created from hardcoded strings
# "en" locale are machine translated
best_match = request.accept_languages.best_match(["zh", "en"], default="en")
Expand Down
2 changes: 1 addition & 1 deletion app/translations/en/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2024-10-29 01:56+0900\n"
"POT-Creation-Date: 2024-11-04 02:29+0900\n"
"PO-Revision-Date: 2017-04-14 15:38+0800\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: en_US\n"
Expand Down
2 changes: 1 addition & 1 deletion app/translations/zh/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2024-10-29 01:56+0900\n"
"POT-Creation-Date: 2024-11-04 02:29+0900\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: zh\n"
Expand Down

0 comments on commit 746b213

Please sign in to comment.