mirror of
https://github.com/akuker/RASCSI.git
synced 2024-11-22 01:31:25 +00:00
Always assign locale in detect_locale() (#1163)
* Always assign locale in detect_locale() * Bump version of Debian used in CI builds from from buster to bullseye * Update code comment --------- Co-authored-by: nucleogenic <nr@nucleogenic.com>
This commit is contained in:
parent
1c52dba979
commit
b28da7001d
@ -16,7 +16,7 @@ services:
|
||||
context: ..
|
||||
dockerfile: docker/web/Dockerfile
|
||||
args:
|
||||
- OS_VERSION=buster
|
||||
- OS_VERSION=bullseye
|
||||
volumes:
|
||||
- ./volumes/images:/home/pi/images:delegated
|
||||
init: true
|
||||
|
@ -1373,12 +1373,13 @@ def healthcheck():
|
||||
def detect_locale():
|
||||
"""
|
||||
Get the detected locale to use for UI string translations.
|
||||
This requires the Flask app to have started first.
|
||||
Assign the language string to objects to be used for requests.
|
||||
"""
|
||||
if "language" not in session.keys():
|
||||
session["language"] = get_locale()
|
||||
piscsi_cmd.locale = session["language"]
|
||||
file_cmd.locale = session["language"]
|
||||
|
||||
piscsi_cmd.locale = session["language"]
|
||||
file_cmd.locale = session["language"]
|
||||
|
||||
|
||||
@APP.before_request
|
||||
|
Loading…
Reference in New Issue
Block a user