appstore: misc good practices / a11y tweaks

This commit is contained in:
Alexandre Aubin
2023-09-19 16:34:57 +02:00
parent 662fcd2af3
commit c6889e4b01
7 changed files with 82 additions and 58 deletions

View File

@ -14,7 +14,7 @@ AVAILABLE_LANGUAGES = ["en"] + os.listdir("translations")
def get_locale():
# try to guess the language from the user accept
# The best match wins.
return request.accept_languages.best_match(AVAILABLE_LANGUAGES)
return request.accept_languages.best_match(AVAILABLE_LANGUAGES) or "en"
def get_catalog():