浏览代码

feat: 增加部分翻译

gemercheung 1 年之前
父节点
当前提交
829eff04bd

+ 2 - 0
packages/qjkankan-editor/src/Store/modules/scene.js

@@ -163,9 +163,11 @@ export default {
         });
       }
       if (type === "earth") {
+        console.log("当前场景-earth", earth);
         Array.from(rootState.info.scenes).forEach((item, index) => {
           if (item.type === "pano") {
             rootState.info.scenes[index]["customMask"]["earth"] = { ...earth };
+            console.log("rootState.info.scenes", rootState.info.scenes);
           }
         });
       }

+ 3 - 3
packages/qjkankan-editor/src/config/menu.js

@@ -48,10 +48,10 @@ const PCMenu = [
     hidden: false
   },
   {
-    text: i18n.t("edit_page.cover"),
+    text: i18n.t("edit_page.mask"),
     icon: "mask",
-    link: "/cover",
-    name: "cover",
+    link: "/mask",
+    name: "mask",
     hasPreviewArea: true,
     previewAreaExtraLeft: 0,
     hidden: false

+ 5 - 4
packages/qjkankan-editor/src/lang/_en.json

@@ -662,7 +662,7 @@
     "viewpoint": "Starting Screen",
     "hotspot": "Hotspots",
     "explanation": "Voice Guide",
-    "cover": "遮罩",
+    "mask": "Mask",
     "save": "Save"
   },
   "edit_settings": {
@@ -863,7 +863,7 @@
     "text_num_per_line": "每行显示",
     "words": "字",
     "hotspot_title": "Title",
-    "show_hotspot_title":"Show Title",
+    "show_hotspot_title": "Show Title",
     "title_show_mode": "Display Methods",
     "show_on_hover": "Hovering",
     "always_show": "Show",
@@ -942,8 +942,9 @@
     "loop": "Loop",
     "disabled_tip": "三维场景暂不支持添加讲解"
   },
-  "cover": {
-    "cover_tips": "您可以为当前全景图添加遮罩。"
+  "mask": {
+    "cover_tips": "You can add a mask to the current panorama.",
+    "select_image": "select"
   },
   "style_key": {
     "menu_width": "88px",

+ 4 - 3
packages/qjkankan-editor/src/lang/_zh.json

@@ -662,7 +662,7 @@
     "viewpoint": "视角",
     "hotspot": "热点",
     "explanation": "讲解",
-    "cover": "遮罩",
+    "mask": "遮罩",
     "save": "保存"
   },
   "edit_settings": {
@@ -926,8 +926,9 @@
     "loop": "循环播放",
     "disabled_tip": "三维场景暂不支持添加讲解"
   },
-  "cover": {
-    "cover_tips": "您可以为当前全景图添加遮罩。"
+  "mask": {
+    "cover_tips": "您可以为当前全景图添加遮罩。",
+    "select_image": "选择图片"
   },
   "style_key": {
     "menu_width": "58px",

packages/qjkankan-editor/src/views/cover/index.vue → packages/qjkankan-editor/src/views/mask/index.vue


+ 12 - 7
packages/qjkankan-editor/src/views/cover/setting.vue

@@ -2,15 +2,15 @@
   <div class="cover-panel">
     <template v-if="currentScene.type !== '4dkk'">
       <div class="title">
-        遮罩设置
+        {{ $i18n.t("edit_settings.mask_setting") }}
         <i
           class="iconfont icon-help_i tool-tip-for-editor"
-          v-tooltip="$i18n.t('cover.cover_tips')"
+          v-tooltip="$i18n.t('mask.cover_tips')"
         />
       </div>
       <!-- sky start -->
       <div class="swi-col">
-        <span> 天空遮罩 </span>
+        <span> {{ $i18n.t("edit_settings.sky_mask") }} </span>
         <switcher
           :value="sky.isShow"
           @change="(value) => (sky.isShow = Boolean(value))"
@@ -25,8 +25,13 @@
           @cancel="onClickCancelSkyLogo"
         ></SelectedImage>
         <div class="action">
-          <button @click="onSelectPic('sky')" class="ui-button submit">
-            选择图片
+          <button
+            @click="onSelectPic('sky')"
+            class="ui-button submit"
+            :class="[$lang]"
+          >
+            <!-- 选择图片 -->
+            {{ $i18n.t(`mask.select_image`) }}
           </button>
           <div
             class="ui-remark"
@@ -65,7 +70,7 @@
       <div style="margin: 30px 0"></div>
       <!-- earth start -->
       <div class="swi-col">
-        <span> 地面遮罩 </span>
+        <span> {{ $i18n.t(`edit_settings.bottom_mask`) }} </span>
         <switcher
           :value="earth.isShow"
           @change="(value) => (earth.isShow = Boolean(value))"
@@ -81,7 +86,7 @@
         ></SelectedImage>
         <div class="action">
           <button @click="onSelectPic('earth')" class="ui-button submit">
-            选择图片
+            {{ $i18n.t(`mask.select_image`) }}
           </button>
           <div
             class="ui-remark"

+ 1 - 1
packages/qjkankan-view/src/components/Pano/index.vue

@@ -228,7 +228,7 @@ const handleMasksUpdate = (skyMask, earthMask, app) => {
   }
   if (earthMask) {
     if ("isShow" in earthMask) {
-      app.krpanoDom.set(`hotspot[nadirlogo].visible`, Boolean(skyMask.isShow));
+      app.krpanoDom.set(`hotspot[nadirlogo].visible`, Boolean(earthMask.isShow));
     }
     if (earthMask.icon) {
       app.krpanoDom.set(`hotspot[nadirlogo].url`, earthMask.icon);

+ 1 - 1
packages/qjkankan-view/src/pages/show.vue

@@ -265,7 +265,7 @@ const handleMasksUpdate = (skyMask, earthMask, app) => {
   }
   if (earthMask) {
     if ("isShow" in earthMask) {
-      app.krpanoDom.set(`hotspot[nadirlogo].visible`, Boolean(skyMask.isShow));
+      app.krpanoDom.set(`hotspot[nadirlogo].visible`, Boolean(earthMask.isShow));
     }
     if (earthMask.icon) {
       app.krpanoDom.set(`hotspot[nadirlogo].url`, earthMask.icon);