"src/git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "08ac24cfc58bd2b7f475896a4a5501234c216cca"
Commit f7707341 authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

refac

parent d9a229b1
......@@ -99,7 +99,6 @@ from config import (
CHANGELOG,
FRONTEND_BUILD_DIR,
UPLOAD_DIR,
CACHE_DIR,
STATIC_DIR,
DEFAULT_LOCALE,
......
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment