Преглед изворни кода

feat : vscode i18n Ally 方便管理

gemercheung пре 1 година
родитељ
комит
6eafd1fdf3

+ 2 - 1
.gitignore

@@ -15,9 +15,10 @@ pnpm-debug.log*
 
 # Editor directories and files
 .idea
-.vscode
+
 *.suo
 *.ntvs*
 *.njsproj
 *.sln
 *.sw?
+!.vscode/extensions.json

+ 3 - 0
.vscode/extensions.json

@@ -0,0 +1,3 @@
+{
+  "recommendations": ["lokalise.i18n-ally"]
+}

+ 25 - 0
.vscode/settings.json

@@ -0,0 +1,25 @@
+{
+  "auto-close-tag.activationOnLanguage": ["xml", "html", "krpano-xml"],
+  "cSpell.words": ["handleclearify", "Krpano"],
+
+  "i18n-ally.localesPaths": [
+    "packages/qjkankan-editor/src/lang",
+    "packages/qjkankan-view/src/locales"
+  ],
+
+  "i18n-ally.keystyle": "nested",
+  // "i18n-ally.pathMatcher": "{locale}/{namespaces}.{ext}",
+  "i18n-ally.namespace": true,
+
+  "i18n-ally.enabledParsers": ["json", "js"],
+
+  "i18n-ally.sortKeys": true,
+
+  "i18n-ally.enabledFrameworks": ["vue", "react"],
+
+  "i18n-ally.sourceLanguage": "zh",
+
+  "i18n-ally.displayLanguage": "zh",
+
+  "i18n-ally.extract.keygenStyle": "camelCase"
+}

+ 1 - 1
packages/qjkankan-editor/package.json

@@ -36,7 +36,7 @@
     "vue-awesome-swiper": "^4.1.1",
     "vue-cropperjs": "^4.2.0",
     "vue-demi": "^0.14.5",
-    "vue-i18n": "^8.22.3",
+    "vue-i18n": "^8.25.0",
     "vue-marquee-text-component": "1.2.0",
     "vue-photo-preview": "^1.1.3",
     "vue-router": "^3.4.9",

+ 14 - 0
packages/qjkankan-editor/src/Store/modules/navigation.js

@@ -0,0 +1,14 @@
+export default {
+  namespaced: true,
+  state() {
+    return {
+      currentCatalogRoot: {},
+      //当前二级分组
+      currentSecondary: {},
+      //二级分组
+      secondaryList: {},
+      //当前场景分组
+      currentScenesList: {},
+    };
+  },
+};

packages/qjkankan-editor/src/lang/_en.json → packages/qjkankan-editor/src/lang/en.json


+ 2 - 2
packages/qjkankan-editor/src/lang/index.js

@@ -1,7 +1,7 @@
 import Vue from 'vue'
 import VueI18n from 'vue-i18n'
-import zh from './_zh.json'
-import en from './_en.json'
+import zh from './zh.json'
+import en from './en.json'
 import config from '@/config'
 import browser from '@/utils/browser'
 

packages/qjkankan-editor/src/lang/_zh.json → packages/qjkankan-editor/src/lang/zh.json


+ 2 - 2
yarn.lock

@@ -17123,9 +17123,9 @@ vue-i18n@9, vue-i18n@^9.1.10:
     "@intlify/vue-devtools" "9.2.2"
     "@vue/devtools-api" "^6.2.1"
 
-vue-i18n@^8.22.3:
+vue-i18n@^8.25.0:
   version "8.28.2"
-  resolved "http://192.168.0.47:4873/vue-i18n/-/vue-i18n-8.28.2.tgz#913558066e274395c0a9f40b2f3393d5c2636840"
+  resolved "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-8.28.2.tgz#913558066e274395c0a9f40b2f3393d5c2636840"
   integrity sha512-C5GZjs1tYlAqjwymaaCPDjCyGo10ajUphiwA922jKt9n7KPpqR7oM1PCwYzhB/E7+nT3wfdG3oRre5raIT1rKA==
 
 "vue-loader-v16@npm:vue-loader@^16.1.0":