From 83ad97e577a0258f44da9c1398c10f60bac5dbd1 Mon Sep 17 00:00:00 2001 From: Daniel Markstedt Date: Sat, 29 Jan 2022 14:22:39 -0800 Subject: [PATCH] Use Locale class methods to get the localized language name for display (#628) --- python/web/src/web.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/web/src/web.py b/python/web/src/web.py index 6c34d1bb..00d73677 100644 --- a/python/web/src/web.py +++ b/python/web/src/web.py @@ -1016,7 +1016,9 @@ def change_language(): file_cmds.locale = session["language"] refresh() - flash(_("Changed Web Interface language to %(locale)s", locale=locale)) + language = Locale.parse(locale) + language_name = language.get_language_name(locale) + flash(_("Changed Web Interface language to %(locale)s", locale=language_name)) return redirect(url_for("index"))