Browse Source

fix: 中文文案

wzl 1 year ago
parent
commit
6b00a985c9

+ 1 - 1
packages/core/src/form/add_combo_box.js

@@ -124,7 +124,7 @@ export default class AddComboBox {
         fontSize: '14',
         lineWidth: '1',
         style: '0',
-        options: this.layer.annotationStore.$t('rightPanel.item') + '1,' + this.layer.annotationStore.$t('rightPanel.item') + '2',
+        options: this.layer.annotationStore.$t('rightPanel.option') + '1,' + this.layer.annotationStore.$t('rightPanel.option') + '2',
         select: '1'
       }
 

+ 1 - 1
packages/core/src/form/add_list_box.js

@@ -124,7 +124,7 @@ export default class AddListBox {
         fontSize: '14',
         lineWidth: '1',
         style: '0',
-        options: this.layer.annotationStore.$t('rightPanel.item') + '1,' + this.layer.annotationStore.$t('rightPanel.item') + '2',
+        options: this.layer.annotationStore.$t('rightPanel.option') + '1,' + this.layer.annotationStore.$t('rightPanel.option') + '2',
         select: '1'
       }
 

+ 4 - 0
packages/webview/locales/en.json

@@ -39,6 +39,7 @@
     "setPassword": "Set Password",
     "removePassword": "Remove Password",
 
+    "openFile": "Open File",
     "search": "Search",
     "rightPanel": "Right Panel",
     "viewSetting": "View Setting",
@@ -134,6 +135,7 @@
     "defaultChecked": "Button is checked by default",
     "item": "Item",
     "itemList": "Item List",
+    "option": "Item",
     "selectAction": "Select Action",
     "none": "None",
     "goPage": "Go To Pages",
@@ -155,7 +157,9 @@
     "encrypt": "Encrypt",
     "supportTip": "Support: Numbers, letters, {'@'}, $, !, %, ?, & ",
     "removePwdSuccess": "Password Removed Successfully!",
+    "removePwdFailure": "Failed to Remove the Password.",
     "setPwdSuccess": "Set the Password for the File Successfully!",
+    "setPwdFailure": "Failed to Set Passwords for this Document.",
     "note": [
       "Note:",
       "- All changes will take effect after downloading.",

+ 4 - 0
packages/webview/locales/zh-CN.json

@@ -40,6 +40,7 @@
     "setPassword": "设置密码",
     "removePassword": "移除密码",
 
+    "openFile": "上传文档",
     "search": "搜索",
     "rightPanel": "右侧面板",
     "viewSetting": "页面显示",
@@ -134,6 +135,7 @@
     "star": "星形",
     "defaultChecked": "预设为已选取",
     "item": "项目",
+    "option": "选项",
     "itemList": "项目清单",
     "selectAction": "选择动作",
     "none": "无",
@@ -156,7 +158,9 @@
     "encrypt": "加密",
     "supportTip": "支持字符:数字、字母、{'@'}、$、!、%、?、& ",
     "removePwdSuccess": "密码已移除!",
+    "removePwdFailure": "密码移除失败!",
     "setPwdSuccess": "密码设置成功!",
+    "setPwdFailure": "密码设置失败!",
     "note": [
       "注意:",
       "- 所有更改将在下载后生效。",

+ 1 - 1
packages/webview/src/components/DownloadButton/DownloadButton.vue

@@ -1,5 +1,5 @@
 <template>
-  <Button @click="downloadFile">
+  <Button @click="downloadFile" :title="$t('header.download')">
     <Download />
   </Button>
 </template>

+ 1 - 0
packages/webview/src/components/OpenFileButton/OpenFileButton.vue

@@ -2,6 +2,7 @@
   <Button
     v-bind="{ ...item }"
     @click="onClick"
+    :title="$t('header.openFile')"
   >
   <Icon
     glyph="icon-open-file"

+ 1 - 1
packages/webview/src/components/Password/SetPassword.vue

@@ -71,7 +71,7 @@
     const data = await core.setPassword(password.value)
     closeSetPassword()
     if (!data) {
-      window.$message.error(instance.$t('passwordDialog.removePwdSuccess'), {
+      window.$message.error(instance.$t('passwordDialog.setPwdFailure'), {
         duration: 3000,
         icon: () => h('img', { src: MessageError })
       })

+ 2 - 1
packages/webview/src/components/PrintButton/PrintButton.vue

@@ -1,7 +1,8 @@
 <template>
   <Button
     v-bind="{ ...item }"
-    @click="handlePrint">
+    @click="handlePrint"
+    :title="$t('header.print')">
     <Print />
   </Button>
 </template>

+ 1 - 1
packages/webview/src/components/SecuritySelect/SecuritySelect.vue

@@ -68,7 +68,7 @@
     loading.value = true
     const data = await core.removePassword()
     if (!data) {
-      window.$message.error('Remove Password Failure', {
+      window.$message.error(instance.$t('passwordDialog.removePwdFailure'), {
         duration: 3000,
         icon: () => h('img', { src: MessageError })
       })

+ 1 - 1
packages/webview/src/components/StickyNoteButton/StickyNoteButton.vue

@@ -3,7 +3,7 @@
     :isActive="activeTool === 'text'"
     v-bind="{ ...item }"
     :onClick="onClick"
-    title="Note"
+    :title="$t('header.note')"
   >
     <Note />
   </Button>