瀏覽代碼

refactor: simplify monitor tab naming and clean up localization files

- Replaced dynamic translation for monitor tab names with static names for consistency.
- Removed unused localization strings for "监控组" in both English and Chinese JSON files to streamline the localization process.
yb 2 周之前
父節點
當前提交
4a0490c2f3
共有 3 個文件被更改,包括 6 次插入11 次删除
  1. 2 5
      src/composables/useMonitorStore.ts
  2. 2 3
      src/locales/en.json
  3. 2 3
      src/locales/zh-cn.json

+ 2 - 5
src/composables/useMonitorStore.ts

@@ -1,7 +1,4 @@
 import { ref, computed } from 'vue'
-import { useI18n } from 'vue-i18n'
-
-const { t } = useI18n()
 
 export interface GridSlot {
   position: number
@@ -29,7 +26,7 @@ function generateId(): string {
 function createDefaultTab(): MonitorTab {
   return {
     id: generateId(),
-    name: t('监控组') + ' ' + '1',
+    name: 'Tab-1',
     gridSize: 2,
     slots: []
   }
@@ -84,7 +81,7 @@ export function useMonitorStore() {
   function addTab() {
     const newTab: MonitorTab = {
       id: generateId(),
-      name: t('监控组') + ' ' + `${tabs.value.length + 1}`,
+      name: `Tab ${tabs.value.length + 1}`,
       gridSize: 2,
       slots: []
     }

+ 2 - 3
src/locales/en.json

@@ -111,6 +111,5 @@
   "iframe 模式": "iframe Mode",
   "是": "Yes",
   "否": "No",
-  "快速测试": "Quick Test",
-  "监控组": "Monitor Group"
-}
+  "快速测试": "Quick Test"
+}

+ 2 - 3
src/locales/zh-cn.json

@@ -114,6 +114,5 @@
   "iframe 模式": "iframe 模式",
   "是": "是",
   "否": "否",
-  "Video Test": "视频测试",
-  "监控组": "监控组"
-}
+  "Video Test": "视频测试"
+}