mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 09:38:02 +00:00
feat: 完成AccountForm组件国际化的最终验证和修复
- 修复遗漏的API URL和API Key标签国际化 - 修复title属性的国际化(复制链接提示) - 修复Claude Max/Pro订阅类型显示的国际化 - 修复剩余placeholder属性的国际化 - 完成系统性的多维度验证检查: * ✅ 模板中的硬编码文本 * ✅ JavaScript中的字符串常量 * ✅ 特殊属性(title, placeholder等) * ✅ 翻译键在三语言文件中的存在性 * ✅ 动态内容和条件渲染 现在AccountForm组件已真正实现完整的三语言国际化支持
This commit is contained in:
@@ -622,7 +622,7 @@
|
||||
<div v-if="form.platform === 'claude-console' && !isEdit" class="space-y-4">
|
||||
<div>
|
||||
<label class="mb-3 block text-sm font-semibold text-gray-700 dark:text-gray-300"
|
||||
>API URL *</label
|
||||
>{{ t('accountForm.apiUrlRequired') }}</label
|
||||
>
|
||||
<input
|
||||
v-model="form.apiUrl"
|
||||
@@ -639,7 +639,7 @@
|
||||
|
||||
<div>
|
||||
<label class="mb-3 block text-sm font-semibold text-gray-700 dark:text-gray-300"
|
||||
>API Key *</label
|
||||
>{{ t('accountForm.apiKeyRequired') }}</label
|
||||
>
|
||||
<input
|
||||
v-model="form.apiKey"
|
||||
@@ -848,7 +848,7 @@
|
||||
type="radio"
|
||||
value="claude_max"
|
||||
/>
|
||||
<span class="text-sm text-gray-700 dark:text-gray-300">Claude Max</span>
|
||||
<span class="text-sm text-gray-700 dark:text-gray-300">{{ t('accountForm.claudeMaxDisplay') }}</span>
|
||||
</label>
|
||||
<label class="flex cursor-pointer items-center">
|
||||
<input
|
||||
@@ -857,7 +857,7 @@
|
||||
type="radio"
|
||||
value="claude_pro"
|
||||
/>
|
||||
<span class="text-sm text-gray-700 dark:text-gray-300">Claude Pro</span>
|
||||
<span class="text-sm text-gray-700 dark:text-gray-300">{{ t('accountForm.claudeProDisplay') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
<p class="mt-2 text-xs text-gray-500 dark:text-gray-400">
|
||||
@@ -1254,7 +1254,7 @@
|
||||
/>
|
||||
<button
|
||||
class="rounded-lg bg-gray-100 px-3 py-2 transition-colors hover:bg-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600"
|
||||
title="复制链接"
|
||||
:title="t('accountForm.copyLinkTooltip')"
|
||||
@click="copySetupTokenAuthUrl"
|
||||
>
|
||||
<i
|
||||
@@ -1680,18 +1680,18 @@
|
||||
<!-- {{ t('accountForm.claudeConsoleFields') }}(编辑模式)-->
|
||||
<div v-if="form.platform === 'claude-console'" class="space-y-4">
|
||||
<div>
|
||||
<label class="mb-3 block text-sm font-semibold text-gray-700">API URL</label>
|
||||
<label class="mb-3 block text-sm font-semibold text-gray-700">{{ t('accountForm.apiUrlLabel') }}</label>
|
||||
<input
|
||||
v-model="form.apiUrl"
|
||||
class="form-input w-full"
|
||||
placeholder="例如:https://api.example.com"
|
||||
:placeholder="t('accountForm.apiUrlPlaceholder')"
|
||||
required
|
||||
type="text"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mb-3 block text-sm font-semibold text-gray-700">API Key</label>
|
||||
<label class="mb-3 block text-sm font-semibold text-gray-700">{{ t('accountForm.apiKeyLabel') }}</label>
|
||||
<input
|
||||
v-model="form.apiKey"
|
||||
class="form-input w-full"
|
||||
@@ -1711,7 +1711,7 @@
|
||||
v-model.number="form.dailyQuota"
|
||||
class="form-input w-full border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-200"
|
||||
min="0"
|
||||
placeholder="0 表示不限制"
|
||||
:placeholder="t('accountForm.quotaZeroUnlimited')"
|
||||
step="0.01"
|
||||
type="number"
|
||||
/>
|
||||
@@ -1866,7 +1866,7 @@
|
||||
<input
|
||||
v-model="form.userAgent"
|
||||
class="form-input w-full"
|
||||
placeholder="留空则透传客户端 User-Agent"
|
||||
:placeholder="t('accountForm.userAgentPlaceholder')"
|
||||
type="text"
|
||||
/>
|
||||
<p class="mt-1 text-xs text-gray-500">
|
||||
@@ -2075,7 +2075,7 @@
|
||||
|
||||
<div>
|
||||
<label class="mb-3 block text-sm font-semibold text-gray-700 dark:text-gray-300"
|
||||
>API Key</label
|
||||
>{{ t('accountForm.apiKeyLabel') }}</label
|
||||
>
|
||||
<input
|
||||
v-model="form.apiKey"
|
||||
|
||||
@@ -1692,6 +1692,19 @@ export default {
|
||||
// Form descriptions
|
||||
modelSupportDesc: 'Leave empty to support all models. If models are specified, requests with models not in the list will not be scheduled to this account',
|
||||
modelTypeSelectionDesc: 'Select model types supported by this deployment',
|
||||
userAgentDesc: 'When empty, will automatically use client User-Agent, only fill when need to fix specific UA'
|
||||
userAgentDesc: 'When empty, will automatically use client User-Agent, only fill when need to fix specific UA',
|
||||
|
||||
// Basic labels
|
||||
apiUrlLabel: 'API URL',
|
||||
apiUrlRequired: 'API URL *',
|
||||
apiKeyLabel: 'API Key',
|
||||
apiKeyRequired: 'API Key *',
|
||||
|
||||
// More missing keys
|
||||
copyLinkTooltip: 'Copy Link',
|
||||
|
||||
// Claude subscription type display
|
||||
claudeMaxDisplay: 'Claude Max',
|
||||
claudeProDisplay: 'Claude Pro'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1692,6 +1692,19 @@ export default {
|
||||
// 表单描述
|
||||
modelSupportDesc: '留空表示支持所有模型。如果指定模型,请求中的模型不在列表内将不会调度到此账号',
|
||||
modelTypeSelectionDesc: '选择此部署支持的模型类型',
|
||||
userAgentDesc: '留空时将自动使用客户端的 User-Agent,仅在需要固定特定 UA 时填写'
|
||||
userAgentDesc: '留空时将自动使用客户端的 User-Agent,仅在需要固定特定 UA 时填写',
|
||||
|
||||
// 基础标签
|
||||
apiUrlLabel: 'API URL',
|
||||
apiUrlRequired: 'API URL *',
|
||||
apiKeyLabel: 'API Key',
|
||||
apiKeyRequired: 'API Key *',
|
||||
|
||||
// 更多缺失的翻译键
|
||||
copyLinkTooltip: '复制链接',
|
||||
|
||||
// Claude 订阅类型显示
|
||||
claudeMaxDisplay: 'Claude Max',
|
||||
claudeProDisplay: 'Claude Pro'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1692,6 +1692,19 @@ export default {
|
||||
// 表單描述
|
||||
modelSupportDesc: '留空表示支援所有模型。如果指定模型,請求中的模型不在列表內將不會調度到此帳戶',
|
||||
modelTypeSelectionDesc: '選擇此部署支援的模型類型',
|
||||
userAgentDesc: '留空時將自動使用用戶端的 User-Agent,僅在需要固定特定 UA 時填寫'
|
||||
userAgentDesc: '留空時將自動使用用戶端的 User-Agent,僅在需要固定特定 UA 時填寫',
|
||||
|
||||
// 基础標籤
|
||||
apiUrlLabel: 'API URL',
|
||||
apiUrlRequired: 'API URL *',
|
||||
apiKeyLabel: 'API Key',
|
||||
apiKeyRequired: 'API Key *',
|
||||
|
||||
// 更多缺失的翻譯鍵
|
||||
copyLinkTooltip: '複製連結',
|
||||
|
||||
// Claude 訂閱類型顯示
|
||||
claudeMaxDisplay: 'Claude Max',
|
||||
claudeProDisplay: 'Claude Pro'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user