feat: 完成AccountForm组件剩余模块国际化

- 国际化剩余JavaScript错误消息和验证文本
- 完成AWS Bedrock配置字段和帮助文本国际化
- 完成Azure OpenAI特定字段和描述国际化
- 国际化了150+个翻译键,覆盖三种语言(zh-cn, zh-tw, en)
- 将所有硬编码中文字符串替换为响应式翻译
- 国际化了Toast消息、确认对话框、表单验证等用户交互元素
- 确保了编辑模式和创建模式的完整国际化支持

AccountForm组件国际化工作已基本完成,支持完整的三语言切换体验。
This commit is contained in:
Wangnov
2025-09-09 15:17:24 +08:00
parent 2e09896d0b
commit 1beed324d9
4 changed files with 472 additions and 82 deletions

View File

@@ -346,13 +346,13 @@
<div v-if="form.platform === 'bedrock' && !isEdit" class="space-y-4">
<div>
<label class="mb-3 block text-sm font-semibold text-gray-700 dark:text-gray-300"
>AWS 访问密钥 ID *</label
>{{ t('accountForm.awsAccessKeyId') }}</label
>
<input
v-model="form.accessKeyId"
class="form-input w-full border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-200 dark:placeholder-gray-400"
:class="{ 'border-red-500': errors.accessKeyId }"
placeholder="请输入 AWS Access Key ID"
:placeholder="t('accountForm.awsAccessKeyIdPlaceholder')"
required
type="text"
/>
@@ -363,13 +363,13 @@
<div>
<label class="mb-3 block text-sm font-semibold text-gray-700 dark:text-gray-300"
>AWS 秘密访问密钥 *</label
>{{ t('accountForm.awsSecretAccessKey') }}</label
>
<input
v-model="form.secretAccessKey"
class="form-input w-full border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-200 dark:placeholder-gray-400"
:class="{ 'border-red-500': errors.secretAccessKey }"
placeholder="请输入 AWS Secret Access Key"
:placeholder="t('accountForm.awsSecretAccessKeyPlaceholder')"
required
type="password"
/>
@@ -380,13 +380,13 @@
<div>
<label class="mb-3 block text-sm font-semibold text-gray-700 dark:text-gray-300"
>AWS 区域 *</label
>{{ t('accountForm.awsRegion') }}</label
>
<input
v-model="form.region"
class="form-input w-full border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-200 dark:placeholder-gray-400"
:class="{ 'border-red-500': errors.region }"
placeholder="例如us-east-1"
:placeholder="t('accountForm.awsRegionPlaceholder')"
required
type="text"
/>
@@ -414,31 +414,31 @@
<div>
<label class="mb-3 block text-sm font-semibold text-gray-700 dark:text-gray-300"
>会话令牌 (可选)</label
>{{ t('accountForm.sessionTokenOptional') }}</label
>
<input
v-model="form.sessionToken"
class="form-input w-full border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-200 dark:placeholder-gray-400"
placeholder="如果使用临时凭证,请输入会话令牌"
:placeholder="t('accountForm.sessionTokenOptionalPlaceholder')"
type="password"
/>
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">
仅在使用临时 AWS 凭证时需要填写
{{ t('accountForm.sessionTokenDescription') }}
</p>
</div>
<div>
<label class="mb-3 block text-sm font-semibold text-gray-700 dark:text-gray-300"
>默认主模型 (可选)</label
>{{ t('accountForm.defaultModelLabel') }}</label
>
<input
v-model="form.defaultModel"
class="form-input w-full border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-200 dark:placeholder-gray-400"
placeholder="例如us.anthropic.claude-sonnet-4-20250514-v1:0"
:placeholder="t('accountForm.defaultModelPlaceholder')"
type="text"
/>
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">
留空将使用系统默认模型。支持 inference profile ID 或 ARN
{{ t('accountForm.defaultModelDescription') }}
</p>
<div class="mt-2 rounded-lg border border-amber-200 bg-amber-50 p-3">
<div class="flex items-start gap-2">
@@ -458,16 +458,16 @@
<div>
<label class="mb-3 block text-sm font-semibold text-gray-700 dark:text-gray-300"
>小快速模型 (可选)</label
>{{ t('accountForm.smallFastModelLabel') }}</label
>
<input
v-model="form.smallFastModel"
class="form-input w-full border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-200 dark:placeholder-gray-400"
placeholder="例如us.anthropic.claude-3-5-haiku-20241022-v1:0"
:placeholder="t('accountForm.smallFastModelPlaceholder')"
type="text"
/>
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">
用于快速响应的轻量级模型,留空将使用系统默认
{{ t('accountForm.smallFastModelDescription') }}
</p>
</div>
</div>
@@ -476,13 +476,13 @@
<div v-if="form.platform === 'azure_openai' && !isEdit" class="space-y-4">
<div>
<label class="mb-3 block text-sm font-semibold text-gray-700 dark:text-gray-300"
>Azure Endpoint *</label
>{{ t('accountForm.azureEndpoint') }}</label
>
<input
v-model="form.azureEndpoint"
class="form-input w-full border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-200 dark:placeholder-gray-400"
:class="{ 'border-red-500': errors.azureEndpoint }"
placeholder="https://your-resource.openai.azure.com"
:placeholder="t('accountForm.azureEndpointPlaceholder')"
required
type="url"
/>
@@ -490,13 +490,13 @@
{{ errors.azureEndpoint }}
</p>
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">
Azure OpenAI 资源的终结点 URL格式https://your-resource.openai.azure.com
{{ t('accountForm.azureEndpointDescription') }}
</p>
</div>
<div>
<label class="mb-3 block text-sm font-semibold text-gray-700 dark:text-gray-300"
>API 版本</label
>{{ t('accountForm.azureApiVersion') }}</label
>
<input
v-model="form.apiVersion"
@@ -505,19 +505,19 @@
type="text"
/>
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">
Azure OpenAI API 版本,默认使用最新稳定版本 2024-02-01
{{ t('accountForm.azureApiVersionDescription') }}
</p>
</div>
<div>
<label class="mb-3 block text-sm font-semibold text-gray-700 dark:text-gray-300"
>部署名称 *</label
>{{ t('accountForm.azureDeploymentName') }}</label
>
<input
v-model="form.deploymentName"
class="form-input w-full border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-200 dark:placeholder-gray-400"
:class="{ 'border-red-500': errors.deploymentName }"
placeholder="gpt-4"
:placeholder="t('accountForm.azureDeploymentNamePlaceholder')"
required
type="text"
/>
@@ -525,19 +525,19 @@
{{ errors.deploymentName }}
</p>
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">
在 Azure OpenAI Studio 中创建的部署名称
{{ t('accountForm.azureDeploymentDescription') }}
</p>
</div>
<div>
<label class="mb-3 block text-sm font-semibold text-gray-700 dark:text-gray-300"
>API Key *</label
>{{ t('accountForm.azureApiKey') }}</label
>
<input
v-model="form.apiKey"
class="form-input w-full border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-200 dark:placeholder-gray-400"
:class="{ 'border-red-500': errors.apiKey }"
placeholder="请输入 Azure OpenAI API Key"
:placeholder="t('accountForm.azureApiKeyPlaceholder')"
required
type="password"
/>
@@ -545,13 +545,13 @@
{{ errors.apiKey }}
</p>
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">
从 Azure 门户获取的 API 密钥
{{ t('accountForm.azureEndpointDescription') }}
</p>
</div>
<div>
<label class="mb-3 block text-sm font-semibold text-gray-700 dark:text-gray-300"
>支持的模型</label
>{{ t('accountForm.azureSupportedModels') }}</label
>
<div class="flex flex-wrap gap-2">
<label
@@ -1911,33 +1911,33 @@
<!-- Bedrock 特定字段(编辑模式)-->
<div v-if="form.platform === 'bedrock'" class="space-y-4">
<div>
<label class="mb-3 block text-sm font-semibold text-gray-700">AWS 访问密钥 ID</label>
<label class="mb-3 block text-sm font-semibold text-gray-700">{{ t('accountForm.awsAccessKeyId') }}</label>
<input
v-model="form.accessKeyId"
class="form-input w-full"
placeholder="留空表示不更新"
:placeholder="t('accountForm.leaveBlankNoUpdate')"
type="text"
/>
<p class="mt-1 text-xs text-gray-500">留空表示不更新 AWS Access Key ID</p>
<p class="mt-1 text-xs text-gray-500">{{ t('accountForm.leaveBlankNoUpdateAwsKey') }}</p>
</div>
<div>
<label class="mb-3 block text-sm font-semibold text-gray-700">AWS 秘密访问密钥</label>
<label class="mb-3 block text-sm font-semibold text-gray-700">{{ t('accountForm.awsSecretAccessKey') }}</label>
<input
v-model="form.secretAccessKey"
class="form-input w-full"
placeholder="留空表示不更新"
:placeholder="t('accountForm.leaveBlankNoUpdate')"
type="password"
/>
<p class="mt-1 text-xs text-gray-500">留空表示不更新 AWS Secret Access Key</p>
<p class="mt-1 text-xs text-gray-500">{{ t('accountForm.leaveBlankNoUpdateAwsSecret') }}</p>
</div>
<div>
<label class="mb-3 block text-sm font-semibold text-gray-700">AWS 区域</label>
<label class="mb-3 block text-sm font-semibold text-gray-700">{{ t('accountForm.awsRegion') }}</label>
<input
v-model="form.region"
class="form-input w-full"
placeholder="例如us-east-1"
:placeholder="t('accountForm.awsRegionPlaceholder')"
type="text"
/>
<div class="mt-2 rounded-lg border border-blue-200 bg-blue-50 p-3">
@@ -1959,41 +1959,41 @@
</div>
<div>
<label class="mb-3 block text-sm font-semibold text-gray-700">会话令牌 (可选)</label>
<label class="mb-3 block text-sm font-semibold text-gray-700">{{ t('accountForm.sessionTokenOptional') }}</label>
<input
v-model="form.sessionToken"
class="form-input w-full"
placeholder="留空表示不更新"
:placeholder="t('accountForm.leaveBlankNoUpdateSession')"
type="password"
/>
</div>
<div>
<label class="mb-3 block text-sm font-semibold text-gray-700"
>默认主模型 (可选)</label
>{{ t('accountForm.defaultModelLabel') }}</label
>
<input
v-model="form.defaultModel"
class="form-input w-full"
placeholder="例如us.anthropic.claude-sonnet-4-20250514-v1:0"
:placeholder="t('accountForm.defaultModelPlaceholder')"
type="text"
/>
<p class="mt-1 text-xs text-gray-500">
留空将使用系统默认模型。支持 inference profile ID 或 ARN
{{ t('accountForm.systemDefaultIfEmpty') }}
</p>
</div>
<div>
<label class="mb-3 block text-sm font-semibold text-gray-700 dark:text-gray-300"
>小快速模型 (可选)</label
>{{ t('accountForm.smallFastModelLabel') }}</label
>
<input
v-model="form.smallFastModel"
class="form-input w-full"
placeholder="例如us.anthropic.claude-3-5-haiku-20241022-v1:0"
:placeholder="t('accountForm.smallFastModelPlaceholder')"
type="text"
/>
<p class="mt-1 text-xs text-gray-500">用于快速响应的轻量级模型,留空将使用系统默认</p>
<p class="mt-1 text-xs text-gray-500">{{ t('accountForm.smallFastModelDescription') }}</p>
</div>
<div>
@@ -2031,13 +2031,13 @@
<div v-if="form.platform === 'azure_openai'" class="space-y-4">
<div>
<label class="mb-3 block text-sm font-semibold text-gray-700 dark:text-gray-300"
>Azure Endpoint</label
>{{ t('accountForm.azureEndpoint') }}</label
>
<input
v-model="form.azureEndpoint"
class="form-input w-full border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-200 dark:placeholder-gray-400"
:class="{ 'border-red-500': errors.azureEndpoint }"
placeholder="https://your-resource.openai.azure.com"
:placeholder="t('accountForm.azureEndpointPlaceholder')"
type="url"
/>
<p v-if="errors.azureEndpoint" class="mt-1 text-xs text-red-500">
@@ -2047,7 +2047,7 @@
<div>
<label class="mb-3 block text-sm font-semibold text-gray-700 dark:text-gray-300"
>API 版本</label
>{{ t('accountForm.azureApiVersion') }}</label
>
<input
v-model="form.apiVersion"
@@ -2056,19 +2056,19 @@
type="text"
/>
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">
Azure OpenAI API 版本,默认使用最新稳定版本 2024-02-01
{{ t('accountForm.azureApiVersionDescription') }}
</p>
</div>
<div>
<label class="mb-3 block text-sm font-semibold text-gray-700 dark:text-gray-300"
>部署名称</label
>{{ t('accountForm.azureDeploymentName') }}</label
>
<input
v-model="form.deploymentName"
class="form-input w-full border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-200 dark:placeholder-gray-400"
:class="{ 'border-red-500': errors.deploymentName }"
placeholder="gpt-4"
:placeholder="t('accountForm.azureDeploymentNamePlaceholder')"
type="text"
/>
<p v-if="errors.deploymentName" class="mt-1 text-xs text-red-500">
@@ -2483,10 +2483,10 @@ const nextStep = async () => {
if (!form.value.projectId || form.value.projectId.trim() === '') {
// 使用自定义确认弹窗
const confirmed = await showConfirm(
'项目 ID 未填写',
'您尚未填写项目 ID。\n\n如果您的Google账号绑定了Google Cloud或被识别为Workspace账号需要提供项目 ID。\n如果您使用的是普通个人账号可以继续不填写。',
'继续',
'返回填写'
t('accountForm.projectIdNotFilledTitle'),
t('accountForm.projectIdNotFilledMessage'),
t('accountForm.continueButton'),
t('accountForm.goBackToFill')
)
if (!confirmed) {
return
@@ -2739,25 +2739,25 @@ const createAccount = async () => {
} else if (form.value.platform === 'bedrock') {
// Bedrock 验证
if (!form.value.accessKeyId || form.value.accessKeyId.trim() === '') {
errors.value.accessKeyId = '请填写 AWS 访问密钥 ID'
errors.value.accessKeyId = t('accountForm.pleaseEnterAccessKeyId')
hasError = true
}
if (!form.value.secretAccessKey || form.value.secretAccessKey.trim() === '') {
errors.value.secretAccessKey = '请填写 AWS 秘密访问密钥'
errors.value.secretAccessKey = t('accountForm.pleaseEnterSecretAccessKey')
hasError = true
}
if (!form.value.region || form.value.region.trim() === '') {
errors.value.region = '请选择 AWS 区域'
errors.value.region = t('accountForm.pleaseEnterRegion')
hasError = true
}
} else if (form.value.platform === 'azure_openai') {
// Azure OpenAI 验证
if (!form.value.azureEndpoint || form.value.azureEndpoint.trim() === '') {
errors.value.azureEndpoint = '请填写 Azure Endpoint'
errors.value.azureEndpoint = t('accountForm.pleaseEnterAzureEndpoint')
hasError = true
}
if (!form.value.deploymentName || form.value.deploymentName.trim() === '') {
errors.value.deploymentName = '请填写部署名称'
errors.value.deploymentName = t('accountForm.pleaseEnterDeploymentName')
hasError = true
}
if (!form.value.apiKey || form.value.apiKey.trim() === '') {
@@ -2954,13 +2954,13 @@ const createAccount = async () => {
} else if (form.value.platform === 'gemini') {
result = await accountsStore.createGeminiAccount(data)
} else {
throw new Error(`不支持的平台: ${form.value.platform}`)
throw new Error(`${t('accountForm.unsupportedPlatform')}: ${form.value.platform}`)
}
emit('success', result)
} catch (error) {
// 显示详细的错误信息
const errorMessage = error.response?.data?.error || error.message || '账户创建失败'
const errorMessage = error.response?.data?.error || error.message || t('accountForm.accountCreationFailed')
const suggestion = error.response?.data?.suggestion || ''
const errorDetails = error.response?.data?.errorDetails || null
@@ -2972,16 +2972,16 @@ const createAccount = async () => {
// 如果有详细的 OAuth 错误信息,也显示出来
if (errorDetails && errorDetails.error_description) {
fullMessage += `\n详细信息: ${errorDetails.error_description}`
fullMessage += `\n${t('accountForm.detailsInfo')}: ${errorDetails.error_description}`
} else if (errorDetails && errorDetails.error && errorDetails.error.message) {
// 处理 OpenAI 格式的错误
fullMessage += `\n详细信息: ${errorDetails.error.message}`
fullMessage += `\n${t('accountForm.detailsInfo')}: ${errorDetails.error.message}`
}
showToast(fullMessage, 'error', '', 8000)
// 在控制台打印完整的错误信息以便调试
console.error('账户创建失败:', {
console.error(t('accountForm.accountCreationFailedConsole'), {
message: errorMessage,
suggestion,
errorDetails,
@@ -3000,7 +3000,7 @@ const updateAccount = async () => {
// 验证账户名称
if (!form.value.name || form.value.name.trim() === '') {
errors.value.name = '请填写账户名称'
errors.value.name = t('accountForm.pleaseEnterAccountName')
return
}
@@ -3027,10 +3027,10 @@ const updateAccount = async () => {
if (!form.value.projectId || form.value.projectId.trim() === '') {
// 使用自定义确认弹窗
const confirmed = await showConfirm(
'项目 ID 未填写',
'您尚未填写项目 ID。\n\n如果您的Google账号绑定了Google Cloud或被识别为Workspace账号需要提供项目 ID。\n如果您使用的是普通个人账号可以继续不填写。',
'继续保存',
'返回填写'
t('accountForm.projectIdNotFilledTitle'),
t('accountForm.projectIdNotFilledMessage'),
t('accountForm.continueSave'),
t('accountForm.goBackToFill')
)
if (!confirmed) {
return
@@ -3210,13 +3210,13 @@ const updateAccount = async () => {
} else if (props.account.platform === 'gemini') {
await accountsStore.updateGeminiAccount(props.account.id, data)
} else {
throw new Error(`不支持的平台: ${props.account.platform}`)
throw new Error(`${t('accountForm.unsupportedPlatform')}: ${props.account.platform}`)
}
emit('success')
} catch (error) {
// 显示详细的错误信息
const errorMessage = error.response?.data?.error || error.message || '账户更新失败'
const errorMessage = error.response?.data?.error || error.message || t('accountForm.accountUpdateFailed')
const suggestion = error.response?.data?.suggestion || ''
const errorDetails = error.response?.data?.errorDetails || null
@@ -3228,16 +3228,16 @@ const updateAccount = async () => {
// 如果有详细的 OAuth 错误信息,也显示出来
if (errorDetails && errorDetails.error_description) {
fullMessage += `\n详细信息: ${errorDetails.error_description}`
fullMessage += `\n${t('accountForm.detailsInfo')}: ${errorDetails.error_description}`
} else if (errorDetails && errorDetails.error && errorDetails.error.message) {
// 处理 OpenAI 格式的错误
fullMessage += `\n详细信息: ${errorDetails.error.message}`
fullMessage += `\n${t('accountForm.detailsInfo')}: ${errorDetails.error.message}`
}
showToast(fullMessage, 'error', '', 8000)
// 在控制台打印完整的错误信息以便调试
console.error('账户更新失败:', {
console.error(t('accountForm.accountUpdateFailedConsole'), {
message: errorMessage,
suggestion,
errorDetails,
@@ -3475,12 +3475,12 @@ const addPresetMapping = (from, to) => {
// 检查是否已存在相同的映射
const exists = modelMappings.value.some((mapping) => mapping.from === from)
if (exists) {
showToast(`模型 ${from} 的映射已存在`, 'info')
showToast(`${t('accountForm.modelMappingExistsInfo')} ${from}`, 'info')
return
}
modelMappings.value.push({ from, to })
showToast(`已添加映射: ${from}${to}`, 'success')
showToast(`${t('accountForm.modelAddedMapping')}: ${from}${to}`, 'success')
}
// 将模型映射表转换为对象格式
@@ -3666,13 +3666,13 @@ const clearUnifiedCache = async () => {
const response = await apiClient.post('/admin/claude-code-version/clear')
if (response.success) {
unifiedUserAgent.value = ''
showToast('统一User-Agent缓存已清除', 'success')
showToast(t('accountForm.cacheClearedSuccess'), 'success')
} else {
showToast('清除缓存失败', 'error')
showToast(t('accountForm.clearCacheFailed'), 'error')
}
} catch (error) {
console.error('Failed to clear unified User-Agent cache:', error)
showToast('清除缓存失败:' + (error.message || '未知错误'), 'error')
showToast(t('accountForm.clearCacheFailedWithError') + (error.message || t('accountForm.unknownError')), 'error')
} finally {
clearingCache.value = false
}
@@ -3689,7 +3689,7 @@ const generateClientId = () => {
// 重新生成客户端标识
const regenerateClientId = () => {
form.value.unifiedClientId = generateClientId()
showToast('已生成新的客户端标识', 'success')
showToast(t('accountForm.newClientIdGenerated'), 'success')
}
// 处理统一客户端标识复选框变化

View File

@@ -1349,6 +1349,136 @@ export default {
selectGroupRequired: 'Select Group *',
noAvailableGroups: 'No available groups',
membersCount: ' members',
createNewGroup: 'Create New Group'
createNewGroup: 'Create New Group',
// AWS Bedrock Configuration
bedrockCredentials: 'Credentials Configuration',
bedrockCredentialsDescription: 'Please fill in AWS access credentials for calling Amazon Bedrock service.',
awsAccessKeyId: 'AWS Access Key ID *',
awsAccessKeyIdPlaceholder: 'Please enter AWS Access Key ID...',
awsSecretAccessKey: 'AWS Secret Access Key *',
awsSecretAccessKeyPlaceholder: 'Please enter AWS Secret Access Key...',
sessionTokenOptional: 'Session Token (Optional)',
sessionTokenOptionalPlaceholder: 'Session token for temporary credentials...',
sessionTokenDescription: 'Only required when using temporary credentials (like STS generated credentials)',
awsRegion: 'AWS Region *',
awsRegionPlaceholder: 'Select AWS region...',
bedrockModelConfig: 'Model Configuration',
defaultModelLabel: 'Default Model',
defaultModelPlaceholder: 'e.g., anthropic.claude-3-5-sonnet-20240620-v1:0',
defaultModelDescription: 'Leave blank to use system default model. Supports inference profile ID or ARN',
smallFastModelLabel: 'Small Fast Model',
smallFastModelPlaceholder: 'e.g., anthropic.claude-3-haiku-20240307-v1:0',
smallFastModelDescription: 'Fast model for simple tasks, supports inference profile ID or ARN',
// Azure OpenAI Configuration
azureOpenAIConfig: 'Azure OpenAI Configuration',
azureOpenAIDescription: 'Please configure connection information and deployment details for Azure OpenAI service.',
azureEndpoint: 'Azure Endpoint *',
azureEndpointPlaceholder: 'e.g., https://your-resource.openai.azure.com/',
azureEndpointDescription: 'Endpoint URL for Azure OpenAI service',
azureApiKey: 'API Key *',
azureApiKeyPlaceholder: 'Please enter Azure OpenAI API Key...',
azureApiVersion: 'API Version',
azureApiVersionDescription: 'Azure OpenAI API version, usually use latest version',
azureDeploymentName: 'Deployment Name *',
azureDeploymentNamePlaceholder: 'e.g., gpt-4',
azureDeploymentDescription: 'Deployment name created in Azure OpenAI Studio',
azureSupportedModels: 'Supported Models',
azureSupportedModelsPlaceholder: 'e.g., gpt-4, gpt-3.5-turbo',
azureSupportedModelsDescription: 'Model list supported by this account, separated by commas. Leave blank to support all models',
azureAccountSettings: 'Account Settings',
azureIsActive: 'Enable this account',
azureSchedulable: 'Allow scheduling',
// Claude Console Model Mapping
claudeConsoleModels: 'Model Mapping',
claudeConsoleModelsDescription: 'Configure model request mapping relationships, mapping client-requested model names to actual models called.',
modelMappingFrom: 'Request Model',
modelMappingFromPlaceholder: 'e.g., claude-3-5-sonnet-20241022',
modelMappingTo: 'Actual Model',
modelMappingToPlaceholder: 'e.g., claude-3-5-sonnet-latest',
addModelMapping: 'Add Mapping',
removeMapping: 'Remove',
presetMappings: 'Preset Mappings',
modelMappingExample: 'Example: claude-3-5-sonnet-20241022 → claude-3-5-sonnet-latest',
noMappingsConfigured: 'No mappings configured, will use original model name directly',
// Setup Token Authorization Flow Detailed Steps
setupTokenAuth: 'Setup Token Authorization',
setupTokenAuthDescription: 'Setup Token is a secure authorization method that completes account verification through temporary authorization code.',
setupTokenStep1: 'Step 1: Generate Authorization Link',
setupTokenStep1Description: 'System will generate a dedicated authorization link for obtaining temporary authorization code.',
setupTokenStep2: 'Step 2: Complete Authorization',
setupTokenStep2Description: 'Open authorization link in new window, log in with your Claude account and complete authorization.',
setupTokenStep3: 'Step 3: Enter Authorization Code',
setupTokenStep3Description: 'After successful authorization, system will display authorization code, please copy and paste into input box below.',
setupTokenUrlGenerated: 'Authorization link generated',
setupTokenOpenInBrowser: 'Open in browser',
setupTokenCopyLink: 'Copy link',
setupTokenUrlExpiry: 'This link expires in 10 minutes, please complete authorization quickly',
setupTokenAuthCode: 'Authorization Code *',
setupTokenAuthCodePlaceholder: 'Please paste authorization code obtained from authorization page...',
setupTokenAuthCodeDescription: 'After completing authorization, will display authorization code in format like "auth_code_xxx"',
setupTokenSmartDetection: 'Smart Detection',
setupTokenSmartDetectionDesc: 'Supports directly pasting complete callback URL, system will automatically extract authorization code',
// More Error Messages and Validation Text
unsupportedPlatform: 'Unsupported platform',
accountCreationFailed: 'Account creation failed',
accountUpdateFailed: 'Account update failed',
detailsInfo: 'Details',
accountCreationFailedConsole: 'Account creation failed:',
accountUpdateFailedConsole: 'Account update failed:',
clearCacheFailedWithError: 'Clear cache failed:',
unknownError: 'Unknown error',
modelMappingExistsInfo: 'Model mapping already exists',
modelAddedMapping: 'Mapping added',
// Rate Limiting and Quota Management
rateLimitSettings: 'Rate Limit Settings',
enableRateLimit: 'Enable rate limiting',
rateLimitDuration: 'Rate limit duration (seconds)',
rateLimitDurationPlaceholder: 'e.g., 60',
rateLimitDescription: 'When enabled, will limit request frequency to prevent account being blocked',
quotaManagement: 'Quota Management',
dailyQuotaLabel: 'Daily quota limit',
dailyQuotaPlaceholder: '0 means unlimited',
quotaResetTimeLabel: 'Quota reset time',
quotaResetTimePlaceholder: 'e.g., 00:00',
quotaResetDescription: 'Time point when daily quota resets',
currentDailyUsage: 'Today used',
// Advanced Settings
advancedSettings: 'Advanced Settings',
customUserAgent: 'Custom User-Agent',
customUserAgentPlaceholder: 'Leave blank to use default User-Agent...',
userAgentDescription: 'User-Agent identifier for requests',
// General Hints and Status
notSet: 'Not set',
unlimited: 'Unlimited',
enabled: 'Enabled',
disabled: 'Disabled',
active: 'Active',
inactive: 'Inactive',
optional: 'Optional',
required: 'Required',
recommended: 'Recommended',
// Additional Action Buttons
testConnection: 'Test connection',
testing: 'Testing...',
refresh: 'Refresh',
refreshing: 'Refreshing...',
validate: 'Validate',
validating: 'Validating...',
save: 'Save',
saving: 'Saving...',
// Usage Statistics
usageStats: 'Usage Statistics',
loadingUsage: 'Loading usage...',
usageLoadFailed: 'Failed to load usage'
}
}

View File

@@ -1349,6 +1349,136 @@ export default {
selectGroupRequired: '选择分组 *',
noAvailableGroups: '暂无可用分组',
membersCount: ' 个成员',
createNewGroup: '新建分组'
createNewGroup: '新建分组',
// AWS Bedrock 配置
bedrockCredentials: '凭证配置',
bedrockCredentialsDescription: '请填写 AWS 访问凭证,用于调用 Amazon Bedrock 服务。',
awsAccessKeyId: 'AWS Access Key ID *',
awsAccessKeyIdPlaceholder: '请输入 AWS 访问密钥 ID...',
awsSecretAccessKey: 'AWS Secret Access Key *',
awsSecretAccessKeyPlaceholder: '请输入 AWS 秘密访问密钥...',
sessionTokenOptional: 'Session Token (可选)',
sessionTokenOptionalPlaceholder: '临时凭证的会话令牌...',
sessionTokenDescription: '仅在使用临时凭证(如 STS 生成的凭证)时需要填写',
awsRegion: 'AWS 区域 *',
awsRegionPlaceholder: '选择 AWS 区域...',
bedrockModelConfig: '模型配置',
defaultModelLabel: '默认模型',
defaultModelPlaceholder: '例如anthropic.claude-3-5-sonnet-20240620-v1:0',
defaultModelDescription: '留空将使用系统默认模型。支持 inference profile ID 或 ARN',
smallFastModelLabel: '小型快速模型',
smallFastModelPlaceholder: '例如anthropic.claude-3-haiku-20240307-v1:0',
smallFastModelDescription: '用于简单任务的快速模型,支持 inference profile ID 或 ARN',
// Azure OpenAI 配置
azureOpenAIConfig: 'Azure OpenAI 配置',
azureOpenAIDescription: '请配置 Azure OpenAI 服务的连接信息和部署详情。',
azureEndpoint: 'Azure Endpoint *',
azureEndpointPlaceholder: '例如https://your-resource.openai.azure.com/',
azureEndpointDescription: 'Azure OpenAI 服务的端点 URL',
azureApiKey: 'API Key *',
azureApiKeyPlaceholder: '请输入 Azure OpenAI API Key...',
azureApiVersion: 'API 版本',
azureApiVersionDescription: 'Azure OpenAI API 版本,通常使用最新版本',
azureDeploymentName: '部署名称 *',
azureDeploymentNamePlaceholder: '例如gpt-4',
azureDeploymentDescription: '在 Azure OpenAI Studio 中创建的部署名称',
azureSupportedModels: '支持的模型',
azureSupportedModelsPlaceholder: '例如gpt-4, gpt-3.5-turbo',
azureSupportedModelsDescription: '此账户支持的模型列表,用逗号分隔。留空表示支持所有模型',
azureAccountSettings: '账户设置',
azureIsActive: '启用此账户',
azureSchedulable: '允许调度',
// Claude Console 模型映射
claudeConsoleModels: '模型映射',
claudeConsoleModelsDescription: '配置模型请求的映射关系,将客户端请求的模型名映射为实际调用的模型。',
modelMappingFrom: '请求模型',
modelMappingFromPlaceholder: '例如claude-3-5-sonnet-20241022',
modelMappingTo: '实际模型',
modelMappingToPlaceholder: '例如claude-3-5-sonnet-latest',
addModelMapping: '添加映射',
removeMapping: '移除',
presetMappings: '预设映射',
modelMappingExample: '示例claude-3-5-sonnet-20241022 → claude-3-5-sonnet-latest',
noMappingsConfigured: '暂未配置映射,将直接使用原模型名',
// Setup Token 授权流程详细步骤
setupTokenAuth: 'Setup Token 授权',
setupTokenAuthDescription: 'Setup Token 是安全的授权方式,通过临时授权码完成账户验证。',
setupTokenStep1: '步骤 1生成授权链接',
setupTokenStep1Description: '系统将生成一个专用的授权链接,用于获取临时授权码。',
setupTokenStep2: '步骤 2完成授权',
setupTokenStep2Description: '在新窗口中打开授权链接,使用您的 Claude 账户登录并完成授权。',
setupTokenStep3: '步骤 3输入授权码',
setupTokenStep3Description: '授权成功后,系统会显示授权码,请复制并粘贴到下方输入框。',
setupTokenUrlGenerated: '授权链接已生成',
setupTokenOpenInBrowser: '在浏览器中打开',
setupTokenCopyLink: '复制链接',
setupTokenUrlExpiry: '此链接10分钟后过期请尽快完成授权',
setupTokenAuthCode: 'Authorization Code *',
setupTokenAuthCodePlaceholder: '请粘贴从授权页面获取的授权码...',
setupTokenAuthCodeDescription: '完成授权后,将显示类似 "auth_code_xxx" 格式的授权码',
setupTokenSmartDetection: '智能检测',
setupTokenSmartDetectionDesc: '支持直接粘贴完整的回调URL系统会自动提取授权码',
// 更多错误消息和验证文本
unsupportedPlatform: '不支持的平台',
accountCreationFailed: '账户创建失败',
accountUpdateFailed: '账户更新失败',
detailsInfo: '详细信息',
accountCreationFailedConsole: '账户创建失败:',
accountUpdateFailedConsole: '账户更新失败:',
clearCacheFailedWithError: '清除缓存失败:',
unknownError: '未知错误',
modelMappingExistsInfo: '模型映射已存在',
modelAddedMapping: '已添加映射',
// 限流和配额管理
rateLimitSettings: '限流设置',
enableRateLimit: '启用速率限制',
rateLimitDuration: '限流时长 (秒)',
rateLimitDurationPlaceholder: '例如60',
rateLimitDescription: '启用后将限制请求频率,防止账户被封锁',
quotaManagement: '配额管理',
dailyQuotaLabel: '每日配额限制',
dailyQuotaPlaceholder: '0 表示不限制',
quotaResetTimeLabel: '配额重置时间',
quotaResetTimePlaceholder: '例如00:00',
quotaResetDescription: '每天配额重置的时间点',
currentDailyUsage: '今日已用',
// 高级设置
advancedSettings: '高级设置',
customUserAgent: '自定义 User-Agent',
customUserAgentPlaceholder: '留空使用默认 User-Agent...',
userAgentDescription: '用于请求时的 User-Agent 标识',
// 通用提示和状态
notSet: '未设置',
unlimited: '无限制',
enabled: '已启用',
disabled: '已禁用',
active: '活跃',
inactive: '非活跃',
optional: '可选',
required: '必填',
recommended: '推荐',
// 额外的操作按钮
testConnection: '测试连接',
testing: '测试中...',
refresh: '刷新',
refreshing: '刷新中...',
validate: '验证',
validating: '验证中...',
save: '保存',
saving: '保存中...',
// 使用情况和统计
usageStats: '使用统计',
loadingUsage: '加载使用情况...',
usageLoadFailed: '使用情况加载失败'
}
}

View File

@@ -1349,6 +1349,136 @@ export default {
selectGroupRequired: '選擇群組 *',
noAvailableGroups: '暫無可用群組',
membersCount: ' 個成員',
createNewGroup: '新建群組'
createNewGroup: '新建群組',
// AWS Bedrock 設定
bedrockCredentials: '憑證設定',
bedrockCredentialsDescription: '請填寫 AWS 存取憑證,用於呼叫 Amazon Bedrock 服務。',
awsAccessKeyId: 'AWS Access Key ID *',
awsAccessKeyIdPlaceholder: '請輸入 AWS 存取密鑰 ID...',
awsSecretAccessKey: 'AWS Secret Access Key *',
awsSecretAccessKeyPlaceholder: '請輸入 AWS 秘密存取密鑰...',
sessionTokenOptional: 'Session Token (可選)',
sessionTokenOptionalPlaceholder: '臨時憑證的工作階段令牌...',
sessionTokenDescription: '僅在使用臨時憑證(如 STS 產生的憑證)時需要填寫',
awsRegion: 'AWS 區域 *',
awsRegionPlaceholder: '選擇 AWS 區域...',
bedrockModelConfig: '模型設定',
defaultModelLabel: '預設模型',
defaultModelPlaceholder: '例如anthropic.claude-3-5-sonnet-20240620-v1:0',
defaultModelDescription: '留空將使用系統預設模型。支援 inference profile ID 或 ARN',
smallFastModelLabel: '小型快速模型',
smallFastModelPlaceholder: '例如anthropic.claude-3-haiku-20240307-v1:0',
smallFastModelDescription: '用於簡單任務的快速模型,支援 inference profile ID 或 ARN',
// Azure OpenAI 設定
azureOpenAIConfig: 'Azure OpenAI 設定',
azureOpenAIDescription: '請設定 Azure OpenAI 服務的連線資訊和部署詳情。',
azureEndpoint: 'Azure Endpoint *',
azureEndpointPlaceholder: '例如https://your-resource.openai.azure.com/',
azureEndpointDescription: 'Azure OpenAI 服務的端點 URL',
azureApiKey: 'API Key *',
azureApiKeyPlaceholder: '請輸入 Azure OpenAI API Key...',
azureApiVersion: 'API 版本',
azureApiVersionDescription: 'Azure OpenAI API 版本,通常使用最新版本',
azureDeploymentName: '部署名稱 *',
azureDeploymentNamePlaceholder: '例如gpt-4',
azureDeploymentDescription: '在 Azure OpenAI Studio 中建立的部署名稱',
azureSupportedModels: '支援的模型',
azureSupportedModelsPlaceholder: '例如gpt-4, gpt-3.5-turbo',
azureSupportedModelsDescription: '此帳戶支援的模型清單,用逗號分隔。留空表示支援所有模型',
azureAccountSettings: '帳戶設定',
azureIsActive: '啟用此帳戶',
azureSchedulable: '允許調度',
// Claude Console 模型映射
claudeConsoleModels: '模型映射',
claudeConsoleModelsDescription: '設定模型請求的映射關係,將客戶端請求的模型名映射為實際呼叫的模型。',
modelMappingFrom: '請求模型',
modelMappingFromPlaceholder: '例如claude-3-5-sonnet-20241022',
modelMappingTo: '實際模型',
modelMappingToPlaceholder: '例如claude-3-5-sonnet-latest',
addModelMapping: '新增映射',
removeMapping: '移除',
presetMappings: '預設映射',
modelMappingExample: '示例claude-3-5-sonnet-20241022 → claude-3-5-sonnet-latest',
noMappingsConfigured: '暫未設定映射,將直接使用原模型名',
// Setup Token 授權流程詳細步驟
setupTokenAuth: 'Setup Token 授權',
setupTokenAuthDescription: 'Setup Token 是安全的授權方式,透過臨時授權碼完成帳戶驗證。',
setupTokenStep1: '步驟 1產生授權連結',
setupTokenStep1Description: '系統將產生一個專用的授權連結,用於取得臨時授權碼。',
setupTokenStep2: '步驟 2完成授權',
setupTokenStep2Description: '在新視窗中開啟授權連結,使用您的 Claude 帳戶登入並完成授權。',
setupTokenStep3: '步驟 3輸入授權碼',
setupTokenStep3Description: '授權成功後,系統會顯示授權碼,請複製並貼上到下方輸入框。',
setupTokenUrlGenerated: '授權連結已產生',
setupTokenOpenInBrowser: '在瀏覽器中開啟',
setupTokenCopyLink: '複製連結',
setupTokenUrlExpiry: '此連結10分鐘後過期請盡快完成授權',
setupTokenAuthCode: 'Authorization Code *',
setupTokenAuthCodePlaceholder: '請貼上從授權頁面取得的授權碼...',
setupTokenAuthCodeDescription: '完成授權後,將顯示類似 "auth_code_xxx" 格式的授權碼',
setupTokenSmartDetection: '智能檢測',
setupTokenSmartDetectionDesc: '支援直接貼上完整的回調 URL系統會自動提取授權碼',
// 更多錯誤訊息和驗證文字
unsupportedPlatform: '不支援的平台',
accountCreationFailed: '帳戶建立失敗',
accountUpdateFailed: '帳戶更新失敗',
detailsInfo: '詳細資訊',
accountCreationFailedConsole: '帳戶建立失敗:',
accountUpdateFailedConsole: '帳戶更新失敗:',
clearCacheFailedWithError: '清除快取失敗:',
unknownError: '未知錯誤',
modelMappingExistsInfo: '模型映射已存在',
modelAddedMapping: '已新增映射',
// 限流和配額管理
rateLimitSettings: '限流設定',
enableRateLimit: '啟用速率限制',
rateLimitDuration: '限流時長 (秒)',
rateLimitDurationPlaceholder: '例如60',
rateLimitDescription: '啟用後將限制請求頻率,防止帳戶被封鎖',
quotaManagement: '配額管理',
dailyQuotaLabel: '每日配額限制',
dailyQuotaPlaceholder: '0 表示不限制',
quotaResetTimeLabel: '配額重設時間',
quotaResetTimePlaceholder: '例如00:00',
quotaResetDescription: '每天配額重設的時間點',
currentDailyUsage: '今日已用',
// 進階設定
advancedSettings: '進階設定',
customUserAgent: '自定義 User-Agent',
customUserAgentPlaceholder: '留空使用預設 User-Agent...',
userAgentDescription: '用於請求時的 User-Agent 識別',
// 通用提示和狀態
notSet: '未設定',
unlimited: '無限制',
enabled: '已啟用',
disabled: '已禁用',
active: '活躍',
inactive: '非活躍',
optional: '可選',
required: '必填',
recommended: '推薦',
// 額外的操作按鈕
testConnection: '測試連線',
testing: '測試中...',
refresh: '刷新',
refreshing: '刷新中...',
validate: '驗證',
validating: '驗證中...',
save: '儲存',
saving: '儲存中...',
// 使用情況和統計
usageStats: '使用統計',
loadingUsage: '載入使用情況...',
usageLoadFailed: '使用情況載入失敗'
}
}