mirror of
https://github.com/akuker/RASCSI.git
synced 2025-01-28 14:34:36 +00:00
Remove use of deprecated before_first_request decorator (#1162)
This commit is contained in:
parent
cfcfbc4301
commit
09d0598c2f
@ -1369,15 +1369,16 @@ def healthcheck():
|
|||||||
return "", 200
|
return "", 200
|
||||||
|
|
||||||
|
|
||||||
@APP.before_first_request
|
@APP.before_request
|
||||||
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.
|
This requires the Flask app to have started first.
|
||||||
"""
|
"""
|
||||||
session["language"] = get_locale()
|
if "language" not in session.keys():
|
||||||
piscsi_cmd.locale = session["language"]
|
session["language"] = get_locale()
|
||||||
file_cmd.locale = session["language"]
|
piscsi_cmd.locale = session["language"]
|
||||||
|
file_cmd.locale = session["language"]
|
||||||
|
|
||||||
|
|
||||||
@APP.before_request
|
@APP.before_request
|
||||||
|
Loading…
x
Reference in New Issue
Block a user