feat(webui): refactor settings architecture and achieve full i18n coverage

This commit is contained in:
Wha1eChai
2026-01-09 00:39:25 +08:00
parent c9c5e7d486
commit a4814b8c34
10 changed files with 711 additions and 423 deletions

View File

@@ -167,6 +167,9 @@ document.addEventListener('alpine:init', () => {
configSaved: "Configuration Saved",
enterPassword: "Enter Web UI Password:",
ready: "READY",
depleted: "Depleted",
timeH: "H",
timeM: "M",
familyClaude: "Claude",
familyGemini: "Gemini",
familyOther: "Other",
@@ -176,6 +179,43 @@ document.addEventListener('alpine:init', () => {
logLevelSuccess: "SUCCESS",
logLevelWarn: "WARN",
logLevelError: "ERR",
totalColon: "Total:",
todayColon: "Today:",
hour1Colon: "1H:",
smart: "Smart",
smartTitle: "Select Top 5 most used models (24h)",
activeCount: "{count} Active",
allCaps: "ALL",
claudeCaps: "CLAUDE",
geminiCaps: "GEMINI",
modelMapping: "Mapping (Target Model ID)",
systemInfo: "System Information",
refresh: "Refresh",
runtimeConfig: "Runtime Configuration",
debugDesc: "Enable detailed logging (See Logs tab)",
networkRetry: "Network Retry Settings",
maxRetries: "Max Retries",
retryBaseDelay: "Retry Base Delay (ms)",
retryMaxDelay: "Retry Max Delay (ms)",
persistTokenCache: "Persist Token Cache",
persistTokenDesc: "Save OAuth tokens to disk for faster restarts",
rateLimiting: "Account Rate Limiting & Timeouts",
defaultCooldown: "Default Cooldown Time",
maxWaitThreshold: "Max Wait Threshold (Sticky)",
maxWaitDesc: "Maximum time to wait for a sticky account to reset before failing or switching.",
saveConfigServer: "Save Configuration",
serverRestartAlert: "Some changes may require server restart. Config is saved to {path}",
changePassword: "Change WebUI Password",
changePasswordDesc: "Update the password for accessing this dashboard",
currentPassword: "Current Password",
newPassword: "New Password",
confirmNewPassword: "Confirm New Password",
passwordEmptyDesc: "Leave empty if no password set",
passwordLengthDesc: "At least 6 characters",
passwordConfirmDesc: "Re-enter new password",
cancel: "Cancel",
passwordsNotMatch: "Passwords do not match",
passwordTooShort: "Password must be at least 6 characters",
},
zh: {
dashboard: "仪表盘",
@@ -332,6 +372,9 @@ document.addEventListener('alpine:init', () => {
configSaved: "配置已保存",
enterPassword: "请输入 Web UI 密码:",
ready: "就绪",
depleted: "已耗尽",
timeH: "时",
timeM: "分",
familyClaude: "Claude 系列",
familyGemini: "Gemini 系列",
familyOther: "其他系列",
@@ -341,6 +384,43 @@ document.addEventListener('alpine:init', () => {
logLevelSuccess: "成功",
logLevelWarn: "警告",
logLevelError: "错误",
totalColon: "总计:",
todayColon: "今日:",
hour1Colon: "1小时:",
smart: "智能选择",
smartTitle: "自动选择过去 24 小时最常用的 5 个模型",
activeCount: "{count} 活跃",
allCaps: "全部",
claudeCaps: "CLAUDE",
geminiCaps: "GEMINI",
modelMapping: "映射 (目标模型 ID)",
systemInfo: "系统信息",
refresh: "刷新",
runtimeConfig: "运行时配置",
debugDesc: "启用详细日志记录 (见运行日志)",
networkRetry: "网络重试设置",
maxRetries: "最大重试次数",
retryBaseDelay: "重试基础延迟 (毫秒)",
retryMaxDelay: "重试最大延迟 (毫秒)",
persistTokenCache: "持久化令牌缓存",
persistTokenDesc: "将 OAuth 令牌保存到磁盘以实现快速重启",
rateLimiting: "账号限流与超时",
defaultCooldown: "默认冷却时间",
maxWaitThreshold: "最大等待阈值 (粘性会话)",
maxWaitDesc: "粘性账号在失败或切换前等待重置的最长时间。",
saveConfigServer: "保存配置",
serverRestartAlert: "部分更改可能需要重启服务器。配置已保存至 {path}",
changePassword: "修改 WebUI 密码",
changePasswordDesc: "更新访问此仪表盘的密码",
currentPassword: "当前密码",
newPassword: "新密码",
confirmNewPassword: "确认新密码",
passwordEmptyDesc: "如果未设置密码请留空",
passwordLengthDesc: "至少 6 个字符",
passwordConfirmDesc: "请再次输入新密码",
cancel: "取消",
passwordsNotMatch: "密码不匹配",
passwordTooShort: "密码至少需要 6 个字符",
}
},