Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
f7707341
"src/git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "08ac24cfc58bd2b7f475896a4a5501234c216cca"
Commit
f7707341
authored
Jun 30, 2024
by
Timothy J. Baek
Browse files
refac
parent
d9a229b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
9 deletions
+7
-9
backend/main.py
backend/main.py
+0
-1
src/routes/+layout.svelte
src/routes/+layout.svelte
+7
-8
No files found.
backend/main.py
View file @
f7707341
...
...
@@ -99,7 +99,6 @@ from config import (
CHANGELOG
,
FRONTEND_BUILD_DIR
,
UPLOAD_DIR
,
CACHE_DIR
,
STATIC_DIR
,
DEFAULT_LOCALE
,
...
...
src/routes/+layout.svelte
View file @
f7707341
...
...
@@ -92,16 +92,15 @@
// Initialize i18n even if we didn't get a backend config,
// so `/error` can show something that's not `undefined`.
const languages = await getLanguages();
const browserLanguages = navigator.languages
? navigator.languages
: [navigator.language || navigator.userLanguage];
const lang = backendConfig.default_locale
? backendConfig.default_locale
: bestMatchingLanguage(languages, browserLanguages, 'en-US');
initI18n();
if (!localStorage.locale) {
const languages = await getLanguages();
const browserLanguages = navigator.languages
? navigator.languages
: [navigator.language || navigator.userLanguage];
const lang = backendConfig.default_locale
? backendConfig.default_locale
: bestMatchingLanguage(languages, browserLanguages, 'en-US');
$i18n.changeLanguage(lang);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment