Skip to content

Commit b96bcad

Browse files
committed
feat: I18n
1 parent bb5d961 commit b96bcad

File tree

3 files changed

+22
-6
lines changed

3 files changed

+22
-6
lines changed

src/renderer/src/components/MainPage.vue

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @Author : Wang Chao
44
* @Date : 2024-08-21 22:29
55
* @LastAuthor : Wang Chao
6-
* @LastTime : 2024-08-28 14:14
6+
* @LastTime : 2024-08-28 15:56
77
* @desc :
88
-->
99
<!--
@@ -1095,7 +1095,7 @@ function handleSpecialIcon() {
10951095

10961096
<span
10971097
v-if="showIcon"
1098-
:title="isSpecialIcon ? '默认图标' : '特殊图标'"
1098+
:title="isSpecialIcon ? t('tong-yong-tu-biao') : t('bian-cheng-tu-biao')"
10991099
@click="handleSpecialIcon"
11001100
>
11011101
<svg
@@ -1137,7 +1137,10 @@ function handleSpecialIcon() {
11371137
</svg>
11381138
</span>
11391139

1140-
<span :title="onlyEdit ? '恢复默认' : '仅编辑区'" @click="handleOnlyEdit">
1140+
<span
1141+
:title="onlyEdit ? t('hui-fu-mo-ren') : t('jin-bian-ji-qu')"
1142+
@click="handleOnlyEdit"
1143+
>
11411144
<svg
11421145
class="tools-icon"
11431146
width="24"
@@ -1168,7 +1171,10 @@ function handleSpecialIcon() {
11681171
</svg>
11691172
</span>
11701173

1171-
<span :title="onlyPreview ? '恢复默认' : '仅预览区'" @click="handleOnlyPreview">
1174+
<span
1175+
:title="onlyPreview ? t('hui-fu-mo-ren') : t('jin-yu-lan-qu')"
1176+
@click="handleOnlyPreview"
1177+
>
11721178
<svg
11731179
class="tools-icon"
11741180
width="24"

src/renderer/src/locales/en.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,10 @@
9393
"zhong-zhi": "Reset",
9494
"zhong-zhi-cheng-gong": "Reset successful",
9595
"que-ding": "Confirm",
96-
"qu-xiao": "Cancel"
96+
"qu-xiao": "Cancel",
97+
"tong-yong-tu-biao": "Universal Icons",
98+
"bian-cheng-tu-biao": "Programming Icons",
99+
"hui-fu-mo-ren": "Restore Defaults",
100+
"jin-bian-ji-qu": "Edit area only",
101+
"jin-yu-lan-qu": "Preview area only"
97102
}

src/renderer/src/locales/zh.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,10 @@
9393
"zhong-zhi": "重置",
9494
"zhong-zhi-cheng-gong": "重置成功",
9595
"que-ding": "确定",
96-
"qu-xiao": "取消"
96+
"qu-xiao": "取消",
97+
"tong-yong-tu-biao": "通用图标",
98+
"bian-cheng-tu-biao": "编程图标",
99+
"hui-fu-mo-ren": "恢复默认",
100+
"jin-bian-ji-qu": "仅编辑区",
101+
"jin-yu-lan-qu": "仅预览区"
97102
}

0 commit comments

Comments
 (0)