fix(frontend): 优化前端组件和国际化支持
- 添加 Accept-Language 请求头支持后端翻译 - 优化账户状态指示器和测试模态框 - 简化用户属性表单和配置模态框 - 新增多个国际化翻译条目 - 重构管理视图代码,提升可维护性
This commit is contained in:
@@ -47,6 +47,7 @@ export default {
|
||||
description: 'Configure your Sub2API instance',
|
||||
database: {
|
||||
title: 'Database Configuration',
|
||||
description: 'Connect to your PostgreSQL database',
|
||||
host: 'Host',
|
||||
port: 'Port',
|
||||
username: 'Username',
|
||||
@@ -63,6 +64,7 @@ export default {
|
||||
},
|
||||
redis: {
|
||||
title: 'Redis Configuration',
|
||||
description: 'Connect to your Redis server',
|
||||
host: 'Host',
|
||||
port: 'Port',
|
||||
password: 'Password (optional)',
|
||||
@@ -71,6 +73,7 @@ export default {
|
||||
},
|
||||
admin: {
|
||||
title: 'Admin Account',
|
||||
description: 'Create your administrator account',
|
||||
email: 'Email',
|
||||
password: 'Password',
|
||||
confirmPassword: 'Confirm Password',
|
||||
@@ -80,9 +83,21 @@ export default {
|
||||
},
|
||||
ready: {
|
||||
title: 'Ready to Install',
|
||||
description: 'Review your configuration and complete setup',
|
||||
database: 'Database',
|
||||
redis: 'Redis',
|
||||
adminEmail: 'Admin Email'
|
||||
},
|
||||
status: {
|
||||
testing: 'Testing...',
|
||||
success: 'Connection Successful',
|
||||
testConnection: 'Test Connection',
|
||||
installing: 'Installing...',
|
||||
completeInstallation: 'Complete Installation',
|
||||
completed: 'Installation completed!',
|
||||
redirecting: 'Redirecting to login page...',
|
||||
restarting: 'Service is restarting, please wait...',
|
||||
timeout: 'Service restart is taking longer than expected. Please refresh the page manually.'
|
||||
}
|
||||
},
|
||||
|
||||
@@ -790,6 +805,18 @@ export default {
|
||||
failedToCreate: 'Failed to create group',
|
||||
failedToUpdate: 'Failed to update group',
|
||||
failedToDelete: 'Failed to delete group',
|
||||
platforms: {
|
||||
all: 'All Platforms',
|
||||
anthropic: 'Anthropic',
|
||||
openai: 'OpenAI',
|
||||
gemini: 'Gemini',
|
||||
antigravity: 'Antigravity'
|
||||
},
|
||||
statuses: {
|
||||
active: 'Active',
|
||||
inactive: 'Inactive',
|
||||
error: 'Error'
|
||||
},
|
||||
deleteConfirm:
|
||||
"Are you sure you want to delete '{name}'? All associated API keys will no longer belong to any group.",
|
||||
deleteConfirmSubscription:
|
||||
@@ -954,6 +981,16 @@ export default {
|
||||
tokenRefreshed: 'Token refreshed successfully',
|
||||
accountDeleted: 'Account deleted successfully',
|
||||
rateLimitCleared: 'Rate limit cleared successfully',
|
||||
statuses: {
|
||||
active: 'Active',
|
||||
inactive: 'Inactive',
|
||||
error: 'Error',
|
||||
cooldown: 'Cooldown',
|
||||
paused: 'Paused',
|
||||
limited: 'Limited',
|
||||
rateLimitedUntil: 'Rate limited until {time}',
|
||||
overloadedUntil: 'Overloaded until {time}'
|
||||
},
|
||||
bulkActions: {
|
||||
selected: '{count} account(s) selected',
|
||||
selectCurrentPage: 'Select this page',
|
||||
@@ -1396,6 +1433,17 @@ export default {
|
||||
searchProxies: 'Search proxies...',
|
||||
allProtocols: 'All Protocols',
|
||||
allStatus: 'All Status',
|
||||
protocols: {
|
||||
http: 'HTTP',
|
||||
https: 'HTTPS',
|
||||
socks5: 'SOCKS5',
|
||||
socks5h: 'SOCKS5H (Remote DNS)'
|
||||
},
|
||||
statuses: {
|
||||
active: 'Active',
|
||||
inactive: 'Inactive',
|
||||
error: 'Error'
|
||||
},
|
||||
columns: {
|
||||
name: 'Name',
|
||||
protocol: 'Protocol',
|
||||
|
||||
@@ -44,6 +44,7 @@ export default {
|
||||
description: '配置您的 Sub2API 实例',
|
||||
database: {
|
||||
title: '数据库配置',
|
||||
description: '连接到您的 PostgreSQL 数据库',
|
||||
host: '主机',
|
||||
port: '端口',
|
||||
username: '用户名',
|
||||
@@ -60,6 +61,7 @@ export default {
|
||||
},
|
||||
redis: {
|
||||
title: 'Redis 配置',
|
||||
description: '连接到您的 Redis 服务器',
|
||||
host: '主机',
|
||||
port: '端口',
|
||||
password: '密码(可选)',
|
||||
@@ -68,6 +70,7 @@ export default {
|
||||
},
|
||||
admin: {
|
||||
title: '管理员账户',
|
||||
description: '创建您的管理员账户',
|
||||
email: '邮箱',
|
||||
password: '密码',
|
||||
confirmPassword: '确认密码',
|
||||
@@ -77,9 +80,21 @@ export default {
|
||||
},
|
||||
ready: {
|
||||
title: '准备安装',
|
||||
description: '检查您的配置并完成安装',
|
||||
database: '数据库',
|
||||
redis: 'Redis',
|
||||
adminEmail: '管理员邮箱'
|
||||
},
|
||||
status: {
|
||||
testing: '测试中...',
|
||||
success: '连接成功',
|
||||
testConnection: '测试连接',
|
||||
installing: '安装中...',
|
||||
completeInstallation: '完成安装',
|
||||
completed: '安装完成!',
|
||||
redirecting: '正在跳转到登录页面...',
|
||||
restarting: '服务正在重启,请稍候...',
|
||||
timeout: '服务重启时间超出预期,请手动刷新页面。'
|
||||
}
|
||||
},
|
||||
|
||||
@@ -848,8 +863,15 @@ export default {
|
||||
rateMultiplierHint: '1.0 = 标准费率,0.5 = 半价,2.0 = 双倍',
|
||||
platforms: {
|
||||
all: '全部平台',
|
||||
claude: 'Claude',
|
||||
openai: 'OpenAI'
|
||||
anthropic: 'Anthropic',
|
||||
openai: 'OpenAI',
|
||||
gemini: 'Gemini',
|
||||
antigravity: 'Antigravity'
|
||||
},
|
||||
statuses: {
|
||||
active: '正常',
|
||||
inactive: '停用',
|
||||
error: '错误'
|
||||
},
|
||||
saving: '保存中...',
|
||||
noGroups: '暂无分组',
|
||||
@@ -1054,7 +1076,11 @@ export default {
|
||||
active: '正常',
|
||||
inactive: '停用',
|
||||
error: '错误',
|
||||
cooldown: '冷却中'
|
||||
cooldown: '冷却中',
|
||||
paused: '暂停',
|
||||
limited: '限流',
|
||||
rateLimitedUntil: '限流中,重置时间:{time}',
|
||||
overloadedUntil: '负载过重,重置时间:{time}'
|
||||
},
|
||||
usageWindow: {
|
||||
statsTitle: '5小时窗口用量统计',
|
||||
@@ -1520,7 +1546,8 @@ export default {
|
||||
protocols: {
|
||||
http: 'HTTP',
|
||||
https: 'HTTPS',
|
||||
socks5: 'SOCKS5'
|
||||
socks5: 'SOCKS5',
|
||||
socks5h: 'SOCKS5H (服务端解析 DNS)'
|
||||
},
|
||||
statuses: {
|
||||
active: '正常',
|
||||
|
||||
Reference in New Issue
Block a user