rename config key to default_locale

This commit is contained in:
Ased Mammad 2024-03-26 23:15:51 +03:30
parent 64e6003627
commit 0c021e42f5
3 changed files with 4 additions and 4 deletions

View file

@ -1,7 +1,7 @@
{ {
"version": 0, "version": 0,
"ui": { "ui": {
"locale": "en-US", "default_locale": "en-US",
"prompt_suggestions": [ "prompt_suggestions": [
{ {
"title": [ "title": [

View file

@ -167,7 +167,7 @@ async def get_app_config():
"status": True, "status": True,
"name": WEBUI_NAME, "name": WEBUI_NAME,
"version": VERSION, "version": VERSION,
"locale": CONFIG_DATA["ui"]["locale"], "default_locale": CONFIG_DATA["ui"]["default_locale"],
"images": images_app.state.ENABLED, "images": images_app.state.ENABLED,
"default_models": webui_app.state.DEFAULT_MODELS, "default_models": webui_app.state.DEFAULT_MODELS,
"default_prompt_suggestions": webui_app.state.DEFAULT_PROMPT_SUGGESTIONS, "default_prompt_suggestions": webui_app.state.DEFAULT_PROMPT_SUGGESTIONS,

View file

@ -25,8 +25,8 @@
if (backendConfig) { if (backendConfig) {
// Save Backend Status to Store // Save Backend Status to Store
await config.set(backendConfig); await config.set(backendConfig);
if ($config.locale) { if ($config.default_locale) {
initI18n($config.locale); initI18n($config.default_locale);
} else { } else {
initI18n(); initI18n();
} }