mirror of
https://github.com/akuker/RASCSI.git
synced 2024-06-12 15:29:35 +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: ..
|
context: ..
|
||||||
dockerfile: docker/web/Dockerfile
|
dockerfile: docker/web/Dockerfile
|
||||||
args:
|
args:
|
||||||
- OS_VERSION=buster
|
- OS_VERSION=bullseye
|
||||||
volumes:
|
volumes:
|
||||||
- ./volumes/images:/home/pi/images:delegated
|
- ./volumes/images:/home/pi/images:delegated
|
||||||
init: true
|
init: true
|
||||||
|
|
|
@ -1373,10 +1373,11 @@ def healthcheck():
|
||||||
def detect_locale():
|
def detect_locale():
|
||||||
"""
|
"""
|
||||||
Get the detected locale to use for UI string translations.
|
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():
|
if "language" not in session.keys():
|
||||||
session["language"] = get_locale()
|
session["language"] = get_locale()
|
||||||
|
|
||||||
piscsi_cmd.locale = session["language"]
|
piscsi_cmd.locale = session["language"]
|
||||||
file_cmd.locale = session["language"]
|
file_cmd.locale = session["language"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user