mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 12:55:19 +00:00
index
This commit is contained in:
parent
c26b4b0f6c
commit
42eb59ab4e
3 changed files with 7 additions and 7 deletions
|
|
@ -173,10 +173,10 @@
|
|||
<div>
|
||||
<div class="text-lg font-semibold text-gray-900 dark:text-white flex items-center gap-2">
|
||||
<span class="w-3 h-3 rounded bg-blue-500 shadow-[0_0_8px_rgba(59,130,246,0.6)]"></span>
|
||||
Chat Filter & Import
|
||||
记录筛选与导入
|
||||
</div>
|
||||
<div class="text-sm text-gray-500 dark:text-gray-400 mt-1">
|
||||
导入 JSON 数组,筛选所需的聊天记录,自动下载并导入。
|
||||
筛选所需的聊天记录
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
|
|
@ -191,7 +191,7 @@
|
|||
<div class="space-y-4">
|
||||
<div class="rounded-2xl border border-gray-100 dark:border-gray-800 bg-white dark:bg-gray-900 p-4 space-y-3">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="text-sm font-semibold text-gray-800 dark:text-gray-100">1. 读取文件 (JSON Array)</div>
|
||||
<div class="text-sm font-semibold text-gray-800 dark:text-gray-100">1. 读取文件</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ export const initI18n = (defaultLocale?: string | undefined) => {
|
|||
const detectionOrder = defaultLocale
|
||||
? ['querystring', 'localStorage']
|
||||
: ['querystring', 'localStorage', 'navigator'];
|
||||
const fallbackDefaultLocale = defaultLocale ? [defaultLocale] : ['en-US'];
|
||||
const fallbackDefaultLocale = defaultLocale ? [defaultLocale] : ['zh-CN'];
|
||||
|
||||
const loadResource = (language: string, namespace: string) =>
|
||||
import(`./locales/${language}/${namespace}.json`);
|
||||
|
|
@ -67,7 +67,7 @@ export const initI18n = (defaultLocale?: string | undefined) => {
|
|||
}
|
||||
});
|
||||
|
||||
const lang = i18next?.language || defaultLocale || 'en-US';
|
||||
const lang = i18next?.language || defaultLocale || 'zh-CN';
|
||||
document.documentElement.setAttribute('lang', lang);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -602,7 +602,7 @@
|
|||
// Initialize i18n even if we didn't get a backend config,
|
||||
// so `/error` can show something that's not `undefined`.
|
||||
|
||||
initI18n(localStorage?.locale);
|
||||
initI18n(localStorage?.locale ?? 'zh-CN');
|
||||
if (!localStorage.locale) {
|
||||
const languages = await getLanguages();
|
||||
const browserLanguages = navigator.languages
|
||||
|
|
@ -610,7 +610,7 @@
|
|||
: [navigator.language || navigator.userLanguage];
|
||||
const lang = backendConfig.default_locale
|
||||
? backendConfig.default_locale
|
||||
: bestMatchingLanguage(languages, browserLanguages, 'en-US');
|
||||
: bestMatchingLanguage(languages, browserLanguages, 'zh-CN');
|
||||
changeLanguage(lang);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue