fix #3103. node config: allow to configure default UI language
This language is only used if none is set in the cookies. Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
163629e62e
commit
68811af9f9
@ -170,6 +170,15 @@ async fn get_index_future(
|
||||
lang = language;
|
||||
}
|
||||
}
|
||||
if lang.is_empty() {
|
||||
if let Ok((config, _)) = proxmox_backup::config::node::config() {
|
||||
if let Some(default) = config.default_lang {
|
||||
if Path::new(&format!("/usr/share/pbs-i18n/pbs-lang-{}.js", default)).exists() {
|
||||
lang = default;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let data = json!({
|
||||
"NodeName": nodename,
|
||||
|
Reference in New Issue
Block a user