feat(i18n): add English and Simplified Chinese

This commit is contained in:
eezd committed 2026-10-26 22:04:33 +08:00
1 parent 38c4c8b781
commit 1e9e0678ee
149 files changed
+5356 -1144

No files matched your search

@@ -1,4 +1,5 @@
import type { Settings } from '@/pinia/stores/settings'
import { t as translate } from '@@/i18n/runtime'
import { toast } from '@@/utils/notifications'
import { isCancel } from 'axios'
import { SettingsAppearanceError, useSettingsStore } from '@/pinia/stores/settings'
@@ -11,12 +12,12 @@ export function useSettingsChange() {
return true
} catch (cause) {
if (isCancel(cause)) return false
toast(cause instanceof Error ? cause.message : '保存设置失败')
toast(cause instanceof Error ? cause.message : translate('settings.could_not_save_settings_17b49d'))
if (cause instanceof SettingsAppearanceError) return true
try {
await store.loadSettings()
} catch (reload) {
if (!isCancel(reload)) toast(`重新读取设置失败:${String(reload)}`)
if (!isCancel(reload)) toast(translate('settings.could_not_reload_settings_744b6a', { p0: String(reload) }))
}
return false
}