Skip to content

Commit

Permalink
feat: I18n
Browse files Browse the repository at this point in the history
  • Loading branch information
itchaox committed Aug 28, 2024
1 parent bb5d961 commit b96bcad
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
14 changes: 10 additions & 4 deletions src/renderer/src/components/MainPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @Author : Wang Chao
* @Date : 2024-08-21 22:29
* @LastAuthor : Wang Chao
* @LastTime : 2024-08-28 14:14
* @LastTime : 2024-08-28 15:56
* @desc :
-->
<!--
Expand Down Expand Up @@ -1095,7 +1095,7 @@ function handleSpecialIcon() {

<span
v-if="showIcon"
:title="isSpecialIcon ? '默认图标' : '特殊图标'"
:title="isSpecialIcon ? t('tong-yong-tu-biao') : t('bian-cheng-tu-biao')"
@click="handleSpecialIcon"
>
<svg
Expand Down Expand Up @@ -1137,7 +1137,10 @@ function handleSpecialIcon() {
</svg>
</span>

<span :title="onlyEdit ? '恢复默认' : '仅编辑区'" @click="handleOnlyEdit">
<span
:title="onlyEdit ? t('hui-fu-mo-ren') : t('jin-bian-ji-qu')"
@click="handleOnlyEdit"
>
<svg
class="tools-icon"
width="24"
Expand Down Expand Up @@ -1168,7 +1171,10 @@ function handleSpecialIcon() {
</svg>
</span>

<span :title="onlyPreview ? '恢复默认' : '仅预览区'" @click="handleOnlyPreview">
<span
:title="onlyPreview ? t('hui-fu-mo-ren') : t('jin-yu-lan-qu')"
@click="handleOnlyPreview"
>
<svg
class="tools-icon"
width="24"
Expand Down
7 changes: 6 additions & 1 deletion src/renderer/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,10 @@
"zhong-zhi": "Reset",
"zhong-zhi-cheng-gong": "Reset successful",
"que-ding": "Confirm",
"qu-xiao": "Cancel"
"qu-xiao": "Cancel",
"tong-yong-tu-biao": "Universal Icons",
"bian-cheng-tu-biao": "Programming Icons",
"hui-fu-mo-ren": "Restore Defaults",
"jin-bian-ji-qu": "Edit area only",
"jin-yu-lan-qu": "Preview area only"
}
7 changes: 6 additions & 1 deletion src/renderer/src/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,10 @@
"zhong-zhi": "重置",
"zhong-zhi-cheng-gong": "重置成功",
"que-ding": "确定",
"qu-xiao": "取消"
"qu-xiao": "取消",
"tong-yong-tu-biao": "通用图标",
"bian-cheng-tu-biao": "编程图标",
"hui-fu-mo-ren": "恢复默认",
"jin-bian-ji-qu": "仅编辑区",
"jin-yu-lan-qu": "仅预览区"
}

0 comments on commit b96bcad

Please sign in to comment.