Handy_Cao 1 天之前
父节点
当前提交
01a3b310d0

+ 6 - 1
public/locales/en-US.json

@@ -1908,6 +1908,11 @@
         "tipps20": "Please activate the fund account first",
         "sellEstimatedFee": "SellEstimatedFee",
         "cangetamount": "Amount Available",
-        "cansellmax": "CanSellMax"
+        "cansellmax": "CanSellMax",
+        "dark": "Dark mode",
+        "closed": "Closed",
+        "actived": "Enabled",
+        "system": "Follow System",
+        "light": "Light mode"
     }
 }

+ 6 - 1
public/locales/th-TH.json

@@ -1911,6 +1911,11 @@
         "tipps20": "請先激活資金賬戶",
         "sellEstimatedFee": "預估手續費",
         "cangetamount": "可獲金額",
-        "cansellmax": "可賣數量"
+        "cansellmax": "可賣數量",
+        "dark": "Dark mode",
+        "closed": "Closed",
+        "actived": "Enabled",
+        "system": "Follow System",
+        "light": "Light mode"
     }
 }

+ 6 - 1
public/locales/vi-VN.json

@@ -1908,6 +1908,11 @@
         "tipps20": "請先激活資金賬戶",
         "sellEstimatedFee": "預估手續費",
         "cangetamount": "可獲金額",
-        "cansellmax": "可賣數量"
+        "cansellmax": "可賣數量",
+        "dark": "Dark mode",
+        "closed": "Closed",
+        "actived": "Enabled",
+        "system": "Follow System",
+        "light": "Light mode"
     }
 }

+ 6 - 1
public/locales/zh-CN.json

@@ -1911,6 +1911,11 @@
         "tipps20": "请先激活资金账户",
         "sellEstimatedFee": "预估手续费",
         "cangetamount": "可获金额",
-        "cansellmax": "可卖数量"
+        "cansellmax": "可卖数量",
+        "dark": "深色模式",
+        "closed": "已关闭",
+        "actived": "已启用",
+        "system": "跟随系统",
+        "light": "浅色模式"
     }
 }

+ 6 - 1
public/locales/zh-TW.json

@@ -1911,6 +1911,11 @@
         "tipps20": "請先激活資金賬戶",
         "sellEstimatedFee": "預估手續費",
         "cangetamount": "可獲金額",
-        "cansellmax": "可賣數量"
+        "cansellmax": "可賣數量",
+        "dark": "深色模式",
+        "closed": "已關閉",
+        "actived": "已啓用",
+        "system": "跟隨系統",
+        "light": "淺色模式"
     }
 }

+ 4 - 4
src/packages/digital/views/setting/index.vue

@@ -29,7 +29,7 @@
         <CellGroup :title="t('mine.system')">
             <Cell is-link :to="{ name: 'setting-theme' }" :value="themeValue">
                 <template #title>
-                    <app-iconfont icon="g-icon-dark">深色模式</app-iconfont>
+                    <app-iconfont icon="g-icon-dark">{{ $t('digital.dark') }}</app-iconfont>
                 </template>
             </Cell>
             <Cell is-link :to="{ name: 'setting-luanguage' }" v-if="globalStore.getSystemInfo('i18nEnabled')">
@@ -76,11 +76,11 @@ const language = computed(() => {
 const themeValue = computed(() => {
     switch (globalStore.appTheme) {
         case AppTheme.Light:
-            return '已关闭'
+            return t('digital.closed')
         case AppTheme.Dark:
-            return '已启用'
+            return t('digital.actived')
         default:
-            return '跟随系统'
+            return t('digital.system')
     }
 })
 

+ 7 - 5
src/packages/digital/views/setting/theme/index.vue

@@ -1,20 +1,20 @@
 <template>
     <app-view class="setting-theme" background="primary">
         <template #header>
-            <app-navbar title="深色模式" />
+            <app-navbar :title="t('digital.dark')" />
         </template>
         <CellGroup>
-            <Cell title="跟随系统" clickable @click="onClick(AppTheme.Default)">
+            <Cell :title="t('digital.system')" clickable @click="onClick(AppTheme.Default)">
                 <template #right-icon v-if="globalStore.appTheme === AppTheme.Default">
                     <img :src="'./img/icons/success.svg'" />
                 </template>
             </Cell>
-            <Cell title="浅色模式" clickable @click="onClick(AppTheme.Light)">
+            <Cell :title="t('digital.light')" clickable @click="onClick(AppTheme.Light)">
                 <template #right-icon v-if="globalStore.appTheme === AppTheme.Light">
                     <img :src="'./img/icons/success.svg'" />
                 </template>
             </Cell>
-            <Cell title="深色模式" clickable @click="onClick(AppTheme.Dark)">
+            <Cell :title="t('digital.dark')" clickable @click="onClick(AppTheme.Dark)">
                 <template #right-icon v-if="globalStore.appTheme === AppTheme.Dark">
                     <img :src="'./img/icons/success.svg'" />
                 </template>
@@ -27,11 +27,13 @@
 import { Cell, CellGroup } from 'vant'
 import { useNavigation } from '@mobile/router/navigation'
 import { AppTheme } from '@/constants/theme'
-import { useGlobalStore } from '@/stores'
+import { i18n, useGlobalStore } from '@/stores'
 
 const { routerBack } = useNavigation()
 const globalStore = useGlobalStore()
 
+const { global: { t } } = i18n
+
 const onClick = (value: AppTheme) => {
     globalStore.setTheme(value)
     routerBack()