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/config/configPage.helpers.js |   36 ++++++++++++++++++++++++------------
 1 files changed, 24 insertions(+), 12 deletions(-)

diff --git a/rsf-design/src/views/system/config/configPage.helpers.js b/rsf-design/src/views/system/config/configPage.helpers.js
index 4564433..02c3ff6 100644
--- a/rsf-design/src/views/system/config/configPage.helpers.js
+++ b/rsf-design/src/views/system/config/configPage.helpers.js
@@ -1,9 +1,9 @@
 const CONFIG_TYPE_OPTIONS = [
-  { label: 'boolean', value: 1 },
-  { label: 'number', value: 2 },
-  { label: 'string', value: 3 },
-  { label: 'json', value: 4 },
-  { label: 'date', value: 5 }
+  { labelKey: 'pages.system.config.types.boolean', fallback: 'boolean', value: 1 },
+  { labelKey: 'pages.system.config.types.number', fallback: 'number', value: 2 },
+  { labelKey: 'pages.system.config.types.string', fallback: 'string', value: 3 },
+  { labelKey: 'pages.system.config.types.json', fallback: 'json', value: 4 },
+  { labelKey: 'pages.system.config.types.date', fallback: 'date', value: 5 }
 ]
 
 export function createConfigSearchState() {
@@ -36,19 +36,28 @@
   }
 }
 
-export function getConfigTypeOptions() {
-  return CONFIG_TYPE_OPTIONS
+export function getConfigTypeOptions(t) {
+  return CONFIG_TYPE_OPTIONS.map((item) => ({
+    label: typeof t === 'function' ? t(item.labelKey) : item.fallback,
+    value: item.value
+  }))
 }
 
 export function getConfigTypeMeta(type) {
   const normalizedType = Number(type)
-  return CONFIG_TYPE_OPTIONS.find((item) => item.value === normalizedType) || { label: '-', value: normalizedType || '' }
+  return (
+    CONFIG_TYPE_OPTIONS.find((item) => item.value === normalizedType) || {
+      labelKey: 'common.placeholder.empty',
+      fallback: '--',
+      value: normalizedType || ''
+    }
+  )
 }
 
 export function getConfigStatusMeta(status) {
   return Number(status) === 1
-    ? { text: '姝e父', type: 'success', bool: true }
-    : { text: '鍐荤粨', type: 'danger', bool: false }
+    ? { textKey: 'common.status.normal', fallback: 'Normal', type: 'success', bool: true }
+    : { textKey: 'common.status.frozen', fallback: 'Frozen', type: 'danger', bool: false }
 }
 
 export function buildConfigSearchParams(params = {}) {
@@ -100,6 +109,7 @@
 }
 
 export function normalizeConfigListRow(record = {}) {
+  const typeMeta = getConfigTypeMeta(record.type)
   const statusMeta = getConfigStatusMeta(record.status)
   return {
     ...record,
@@ -109,8 +119,10 @@
     val: record.val || '',
     content: record.content || '',
     memo: record.memo || '',
-    typeText: record['type$'] || getConfigTypeMeta(record.type).label,
-    statusText: record['status$'] || statusMeta.text,
+    typeTextKey: typeMeta.labelKey,
+    typeText: typeMeta.fallback,
+    statusTextKey: statusMeta.textKey,
+    statusText: statusMeta.fallback,
     statusType: statusMeta.type,
     statusBool: record.statusBool ?? statusMeta.bool,
     updateTimeText: record['updateTime$'] || record.updateTime || '',

--
Gitblit v1.9.1