From 50e95b985a72fcec4a93a2470e9efdfb2620148a Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期四, 02 四月 2026 15:46:09 +0800
Subject: [PATCH] #i18n
---
rsf-design/src/views/system/ai-param/aiParamPage.helpers.js | 46 +++++++++++++++++++++++++++-------------------
1 files changed, 27 insertions(+), 19 deletions(-)
diff --git a/rsf-design/src/views/system/ai-param/aiParamPage.helpers.js b/rsf-design/src/views/system/ai-param/aiParamPage.helpers.js
index f04e148..87622b6 100644
--- a/rsf-design/src/views/system/ai-param/aiParamPage.helpers.js
+++ b/rsf-design/src/views/system/ai-param/aiParamPage.helpers.js
@@ -1,16 +1,18 @@
-const AI_PARAM_REPORT_TITLE = 'AI 鍙傛暟鎶ヨ〃'
+import { $t } from '@/locales'
+
+const AI_PARAM_REPORT_TITLE = () => $t('pages.system.aiParam.reportTitle')
const PROVIDER_OPTIONS = [{ label: 'OPENAI_COMPATIBLE', value: 'OPENAI_COMPATIBLE' }]
const STATUS_OPTIONS = [
- { label: '榛樿', value: 1 },
- { label: '鍊欓��', value: 0 }
+ { label: () => $t('pages.system.aiParam.status.default'), value: 1 },
+ { label: () => $t('pages.system.aiParam.status.candidate'), value: 0 }
]
const VALIDATE_STATUS_META = {
- VALID: { text: '宸叉牎楠�', type: 'success' },
- INVALID: { text: '鏍¢獙澶辫触', type: 'danger' },
- NOT_TESTED: { text: '鏈牎楠�', type: 'info' }
+ VALID: { text: () => $t('pages.system.aiParam.validation.valid'), type: 'success' },
+ INVALID: { text: () => $t('pages.system.aiParam.validation.invalid'), type: 'danger' },
+ NOT_TESTED: { text: () => $t('pages.system.aiParam.validation.notTested'), type: 'info' }
}
function createAiParamSearchState() {
@@ -58,17 +60,21 @@
}
function getAiParamStatusOptions() {
- return STATUS_OPTIONS
+ return STATUS_OPTIONS.map((item) => ({ ...item, label: item.label() }))
}
function getAiParamStatusMeta(status) {
return Number(status) === 1
- ? { text: '榛樿', type: 'success' }
- : { text: '鍊欓��', type: 'info' }
+ ? { text: $t('pages.system.aiParam.status.default'), type: 'success' }
+ : { text: $t('pages.system.aiParam.status.candidate'), type: 'info' }
}
function getAiParamValidateStatusMeta(status) {
- return VALIDATE_STATUS_META[String(status || '').trim()] || { text: status || '鏈煡', type: 'info' }
+ const meta = VALIDATE_STATUS_META[String(status || '').trim()]
+ if (meta) {
+ return { text: meta.text(), type: meta.type }
+ }
+ return { text: status || $t('common.status.unknown'), type: 'info' }
}
function buildAiParamSearchParams(params = {}) {
@@ -150,7 +156,9 @@
validateStatusText: validateMeta.text,
validateStatusType: validateMeta.type,
streamingEnabled: Boolean(record.streamingEnabled),
- streamingText: record.streamingEnabled ? '娴佸紡鍝嶅簲' : '鏍囧噯鍝嶅簲',
+ streamingText: record.streamingEnabled
+ ? $t('pages.system.aiParam.streaming.enabled')
+ : $t('pages.system.aiParam.streaming.disabled'),
'createTime$': normalizeText(record['createTime$']),
'updateTime$': normalizeText(record['updateTime$']),
'lastValidateTime$': normalizeText(record['lastValidateTime$'])
@@ -175,14 +183,14 @@
function getAiParamReportColumns() {
return [
- { label: '鍚嶇О', prop: 'name' },
- { label: '鎻愪緵鏂�', prop: 'providerType' },
- { label: '妯″瀷', prop: 'model' },
- { label: '榛樿鐘舵��', prop: 'statusText' },
- { label: '鏍¢獙鐘舵��', prop: 'validateStatusText' },
- { label: '瓒呮椂鏃堕棿(ms)', prop: 'timeoutMs' },
- { label: '鏇存柊鏃堕棿', prop: 'updateTime' },
- { label: '澶囨敞', prop: 'memo' }
+ { label: $t('pages.system.aiParam.table.name'), prop: 'name' },
+ { label: $t('pages.system.aiParam.table.providerType'), prop: 'providerType' },
+ { label: $t('pages.system.aiParam.table.model'), prop: 'model' },
+ { label: $t('pages.system.aiParam.table.status'), prop: 'statusText' },
+ { label: $t('pages.system.aiParam.table.validateStatus'), prop: 'validateStatusText' },
+ { label: $t('pages.system.aiParam.table.timeoutMs'), prop: 'timeoutMs' },
+ { label: $t('table.updateTime'), prop: 'updateTime' },
+ { label: $t('table.remark'), prop: 'memo' }
]
}
--
Gitblit v1.9.1