可以更新 Access Token 和 Refresh Token。为了安全起见,不会显示当前的 Token 值。
{{ t('accountForm.newAccessTokenLabel') }}
{{ t('accountForm.newRefreshTokenLabel') }}
@@ -2556,7 +2556,7 @@ const copySetupTokenAuthUrl = async () => {
showToast(t('accountForm.copyFailed'), 'error')
}
} catch (err) {
- showToast('复制失败,请手动复制', 'error')
+ showToast(t('accountForm.copyFailedManual'), 'error')
}
document.body.removeChild(textarea)
@@ -2730,7 +2730,7 @@ const createAccount = async () => {
hasError = true
}
if (!form.value.apiKey || form.value.apiKey.trim() === '') {
- errors.value.apiKey = '请填写 API Key'
+ errors.value.apiKey = t('accountForm.apiKeyRequired')
hasError = true
}
} else if (form.value.platform === 'bedrock') {
@@ -2758,7 +2758,7 @@ const createAccount = async () => {
hasError = true
}
if (!form.value.apiKey || form.value.apiKey.trim() === '') {
- errors.value.apiKey = '请填写 API Key'
+ errors.value.apiKey = t('accountForm.apiKeyRequired')
hasError = true
}
} else if (form.value.addType === 'manual') {
@@ -2766,14 +2766,14 @@ const createAccount = async () => {
if (form.value.platform === 'openai') {
// OpenAI 平台必须有 Refresh Token
if (!form.value.refreshToken || form.value.refreshToken.trim() === '') {
- errors.value.refreshToken = '请填写 Refresh Token'
+ errors.value.refreshToken = t('accountForm.refreshTokenRequired')
hasError = true
}
// Access Token 可选,如果没有会通过 Refresh Token 获取
} else {
// 其他平台(Gemini)需要 Access Token
if (!form.value.accessToken || form.value.accessToken.trim() === '') {
- errors.value.accessToken = '请填写 Access Token'
+ errors.value.accessToken = t('accountForm.accessTokenRequired')
hasError = true
}
}
diff --git a/web/admin-spa/src/i18n/locales/en.js b/web/admin-spa/src/i18n/locales/en.js
index ad7b8c26..e0397225 100644
--- a/web/admin-spa/src/i18n/locales/en.js
+++ b/web/admin-spa/src/i18n/locales/en.js
@@ -1628,6 +1628,70 @@ export default {
createNewGroupOption: 'Create new group option',
// Manual Token Input Tips
- credentialsFromFile: 'credentials from file.'
+ credentialsFromFile: 'credentials from file.',
+
+ // Placeholder texts
+ originalModelNamePlaceholder: 'Original model name',
+ mappedModelNamePlaceholder: 'Mapped model name',
+ userAgentPlaceholder: 'Leave empty to pass through client User-Agent',
+ authCodePlaceholder: 'Paste Authorization Code obtained from Claude Code auth page...',
+ leaveEmptyNoUpdate: 'Leave empty for no update',
+ leaveEmptyNoUpdateKey: 'Leave empty for no API Key update',
+ leaveEmptyNoUpdateToken: 'Leave empty for no update...',
+
+ // Labels and descriptions
+ customUserAgentOptional: 'Custom User-Agent (optional)',
+ clientIdLabel: 'Client ID',
+ schedulePriorityLabel: 'Schedule Priority (1-100)',
+ attentionLabel: 'Attention:',
+ supportedModelsLabel: 'Supported Models',
+ newAccessTokenLabel: 'New Access Token',
+ newRefreshTokenLabel: 'New Refresh Token',
+ updateTokenLabel: 'Update Token',
+
+ // Button texts
+ regenerateBtn: 'Regenerate',
+ previousStepBtn: 'Previous Step',
+
+ // Descriptive texts
+ claudeProLimitation: 'Pro accounts do not support Claude Opus 4 model',
+ claude5HourLimitDesc: 'Auto-stop scheduling when approaching 5-hour usage limit',
+ claude5HourLimitExplanation: 'When system detects account approaching 5-hour usage limit, automatically pause scheduling for this account. Will resume automatically when entering new time window.',
+ useUnifiedClaudeVersion: 'Use unified Claude Code version',
+ unifiedVersionDesc: 'When enabled, will use unified User-Agent captured from real Claude Code client, improving compatibility',
+ currentUnifiedVersion: '💡 Current unified version:',
+ waitingUserAgent: '⏳ Waiting to capture User-Agent from Claude Code client',
+ userAgentTip: '💡 Tip: If unable to capture for a long time, please confirm that Claude Code client is using this account,',
+ contactDeveloper: 'or contact developer to check if User-Agent format has changed',
+ useUnifiedClientId: 'Use unified client identifier',
+ unifiedClientIdDesc: 'When enabled, will use fixed client identifier, making all requests appear from same client, reducing fingerprinting',
+ clientIdReplaceDesc: 'This ID will replace the user_id client part in requests, retaining session part for sticky sessions',
+
+ // OAuth step texts
+ step1GenerateAuthLink: 'Step 1: Generate Authorization Link',
+ clickButtonGenerate: 'Click button below to generate authorization link',
+ copyLinkTitle: 'Copy Link',
+ step2AccessAndAuth: 'Step 2: Access Link and Authorize',
+ openInBrowser: 'Open link in browser and complete authorization',
+ browserAuthDesc: 'Please open the authorization link in a new tab, login to your Claude account and authorize Claude Code.',
+ proxyNotice: 'If you have set up a proxy, please ensure your browser also uses the same proxy to access the authorization page.',
+ step3InputAuthCode: 'Step 3: Input Authorization Code',
+ inputAuthCodeTitle: 'Input Authorization Code',
+ authCompleteDesc: 'After authorization is complete, copy Authorization Code from the return page and paste it into the input box below:',
+ pasteAuthCodeDesc: 'Please paste the Authorization Code copied from Claude Code authorization page',
+
+ // AWS region reference
+ awsRegionRef: 'Common AWS regions reference:',
+
+ // Error messages
+ apiKeyRequired: 'Please enter API Key',
+ refreshTokenRequired: 'Please enter Refresh Token',
+ accessTokenRequired: 'Please enter Access Token',
+ copyFailedManual: 'Copy failed, please copy manually',
+
+ // 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'
}
}
diff --git a/web/admin-spa/src/i18n/locales/zh-cn.js b/web/admin-spa/src/i18n/locales/zh-cn.js
index d43f23c4..e0e0357e 100644
--- a/web/admin-spa/src/i18n/locales/zh-cn.js
+++ b/web/admin-spa/src/i18n/locales/zh-cn.js
@@ -1628,6 +1628,70 @@ export default {
createNewGroupOption: '新建分组选项',
// 手动输入Token提示
- credentialsFromFile: '文件中的凭证。'
+ credentialsFromFile: '文件中的凭证。',
+
+ // Placeholder 文本
+ originalModelNamePlaceholder: '原始模型名称',
+ mappedModelNamePlaceholder: '映射后的模型名称',
+ userAgentPlaceholder: '留空则透传客户端 User-Agent',
+ authCodePlaceholder: '粘贴从Claude Code授权页面获取的Authorization Code...',
+ leaveEmptyNoUpdate: '留空表示不更新',
+ leaveEmptyNoUpdateKey: '留空表示不更新 API Key',
+ leaveEmptyNoUpdateToken: '留空表示不更新...',
+
+ // 标签和描述
+ customUserAgentOptional: '自定义 User-Agent (可选)',
+ clientIdLabel: '客户端标识 ID',
+ schedulePriorityLabel: '调度优先级 (1-100)',
+ attentionLabel: '注意:',
+ supportedModelsLabel: '支持的模型',
+ newAccessTokenLabel: '新的 Access Token',
+ newRefreshTokenLabel: '新的 Refresh Token',
+ updateTokenLabel: '更新 Token',
+
+ // 按钮文本
+ regenerateBtn: '重新生成',
+ previousStepBtn: '上一步',
+
+ // 描述性文本
+ claudeProLimitation: 'Pro 账号不支持 Claude Opus 4 模型',
+ claude5HourLimitDesc: '5小时使用量接近限制时自动停止调度',
+ claude5HourLimitExplanation: '当系统检测到账户接近5小时使用限制时,自动暂停调度该账户。进入新的时间窗口后会自动恢复调度。',
+ useUnifiedClaudeVersion: '使用统一 Claude Code 版本',
+ unifiedVersionDesc: '开启后将使用从真实 Claude Code 客户端捕获的统一 User-Agent,提高兼容性',
+ currentUnifiedVersion: '💡 当前统一版本:',
+ waitingUserAgent: '⏳ 等待从 Claude Code 客户端捕获 User-Agent',
+ userAgentTip: '💡 提示:如果长时间未能捕获,请确认有 Claude Code 客户端正在使用此账户,',
+ contactDeveloper: '或联系开发者检查 User-Agent 格式是否发生变化',
+ useUnifiedClientId: '使用统一的客户端标识',
+ unifiedClientIdDesc: '开启后将使用固定的客户端标识,使所有请求看起来来自同一个客户端,减少特征',
+ clientIdReplaceDesc: '此ID将替换请求中的user_id客户端部分,保留session部分用于粘性会话',
+
+ // OAuth 步骤文本
+ step1GenerateAuthLink: '步骤1: 生成授权链接',
+ clickButtonGenerate: '点击下方按钮生成授权链接',
+ copyLinkTitle: '复制链接',
+ step2AccessAndAuth: '步骤2: 访问链接并授权',
+ openInBrowser: '在浏览器中打开链接并完成授权',
+ browserAuthDesc: '请在新标签页中打开授权链接,登录您的 Claude 账户并授权 Claude Code。',
+ proxyNotice: '如果您设置了代理,请确保浏览器也使用相同的代理访问授权页面。',
+ step3InputAuthCode: '步骤3: 输入授权码',
+ inputAuthCodeTitle: '输入 Authorization Code',
+ authCompleteDesc: '授权完成后,从返回页面复制 Authorization Code,并粘贴到下方输入框:',
+ pasteAuthCodeDesc: '请粘贴从 Claude Code 授权页面复制的 Authorization Code',
+
+ // AWS 区域参考
+ awsRegionRef: '常用 AWS 区域参考:',
+
+ // 错误信息
+ apiKeyRequired: '请填写 API Key',
+ refreshTokenRequired: '请填写 Refresh Token',
+ accessTokenRequired: '请填写 Access Token',
+ copyFailedManual: '复制失败,请手动复制',
+
+ // 表单描述
+ modelSupportDesc: '留空表示支持所有模型。如果指定模型,请求中的模型不在列表内将不会调度到此账号',
+ modelTypeSelectionDesc: '选择此部署支持的模型类型',
+ userAgentDesc: '留空时将自动使用客户端的 User-Agent,仅在需要固定特定 UA 时填写'
}
}
diff --git a/web/admin-spa/src/i18n/locales/zh-tw.js b/web/admin-spa/src/i18n/locales/zh-tw.js
index 1f877a57..cf1c6e16 100644
--- a/web/admin-spa/src/i18n/locales/zh-tw.js
+++ b/web/admin-spa/src/i18n/locales/zh-tw.js
@@ -1628,6 +1628,70 @@ export default {
createNewGroupOption: '新建群組選項',
// 手動輸入Token提示
- credentialsFromFile: '檔案中的憑證。'
+ credentialsFromFile: '檔案中的憑證。',
+
+ // Placeholder 文字
+ originalModelNamePlaceholder: '原始模型名稱',
+ mappedModelNamePlaceholder: '映射後的模型名稱',
+ userAgentPlaceholder: '留空則透傳用戶端 User-Agent',
+ authCodePlaceholder: '貼上Claude Code授權頁面獲取的Authorization Code...',
+ leaveEmptyNoUpdate: '留空表示不更新',
+ leaveEmptyNoUpdateKey: '留空表示不更新 API Key',
+ leaveEmptyNoUpdateToken: '留空表示不更新...',
+
+ // 標籤和描述
+ customUserAgentOptional: '自定義 User-Agent (可選)',
+ clientIdLabel: '用戶端標識 ID',
+ schedulePriorityLabel: '調度優先級 (1-100)',
+ attentionLabel: '注意:',
+ supportedModelsLabel: '支援的模型',
+ newAccessTokenLabel: '新的 Access Token',
+ newRefreshTokenLabel: '新的 Refresh Token',
+ updateTokenLabel: '更新 Token',
+
+ // 按鈕文字
+ regenerateBtn: '重新產生',
+ previousStepBtn: '上一步',
+
+ // 描述性文字
+ claudeProLimitation: 'Pro 帳戶不支援 Claude Opus 4 模型',
+ claude5HourLimitDesc: '5小時使用量接近限制時自動停止調度',
+ claude5HourLimitExplanation: '當系統檢測到帳戶接近5小時使用限制時,自動暫停調度該帳戶。進入新的時間視窗後會自動恢復調度。',
+ useUnifiedClaudeVersion: '使用統一 Claude Code 版本',
+ unifiedVersionDesc: '開啟後將使用從真實 Claude Code 用戶端捕獲的統一 User-Agent,提高相容性',
+ currentUnifiedVersion: '💡 目前統一版本:',
+ waitingUserAgent: '⏳ 等待從 Claude Code 用戶端捕獲 User-Agent',
+ userAgentTip: '💡 提示:如果長時間未能捕獲,請確認有 Claude Code 用戶端正在使用此帳戶,',
+ contactDeveloper: '或聯繫開發者檢查 User-Agent 格式是否發生變化',
+ useUnifiedClientId: '使用統一的用戶端標識',
+ unifiedClientIdDesc: '開啟後將使用固定的用戶端標識,使所有請求看起來來自同一個用戶端,減少特徵',
+ clientIdReplaceDesc: '此ID將替換請求中的user_id用戶端部分,保留session部分用於黏性工作階段',
+
+ // OAuth 步驟文字
+ step1GenerateAuthLink: '步驟1: 產生授權連結',
+ clickButtonGenerate: '點擊下方按鈕產生授權連結',
+ copyLinkTitle: '複製連結',
+ step2AccessAndAuth: '步驟2: 訪問連結並授權',
+ openInBrowser: '在瀏覽器中開啟連結並完成授權',
+ browserAuthDesc: '請在新分頁中開啟授權連結,登錄您的 Claude 帳戶並授權 Claude Code。',
+ proxyNotice: '如果您設定了代理,請確保瀏覽器也使用相同的代理訪問授權頁面。',
+ step3InputAuthCode: '步驟3: 輸入授權碼',
+ inputAuthCodeTitle: '輸入 Authorization Code',
+ authCompleteDesc: '授權完成後,從返回頁面複製 Authorization Code,並貼上到下方輸入框:',
+ pasteAuthCodeDesc: '請貼上從 Claude Code 授權頁面複製的 Authorization Code',
+
+ // AWS 區域參考
+ awsRegionRef: '常用 AWS 區域參考:',
+
+ // 錯誤訊息
+ apiKeyRequired: '請填寫 API Key',
+ refreshTokenRequired: '請填寫 Refresh Token',
+ accessTokenRequired: '請填寫 Access Token',
+ copyFailedManual: '複製失敗,請手動複製',
+
+ // 表單描述
+ modelSupportDesc: '留空表示支援所有模型。如果指定模型,請求中的模型不在列表內將不會調度到此帳戶',
+ modelTypeSelectionDesc: '選擇此部署支援的模型類型',
+ userAgentDesc: '留空時將自動使用用戶端的 User-Agent,僅在需要固定特定 UA 時填寫'
}
}