-
等待上传
+ {{ $T('WAIT_TO_UPLOAD') }}
-
@@ -39,7 +39,7 @@ import { PASTE_TEXT } from '#/events/constants'
export default class extends Vue {
files: IResult[] = []
notification = {
- title: '复制链接成功',
+ title: this.$T('COPY_LINK_SUCCEED'),
body: '',
icon: ''
}
diff --git a/src/renderer/pages/Upload.vue b/src/renderer/pages/Upload.vue
index d29681f5..4740146e 100644
--- a/src/renderer/pages/Upload.vue
+++ b/src/renderer/pages/Upload.vue
@@ -3,7 +3,7 @@
@@ -30,7 +30,7 @@
-
+
剪贴板图片
+ {{ $T('CLIPBOARD_PICTURE') }}
URL
@@ -131,7 +131,7 @@ export default class extends Vue {
if (isUrl(str)) {
ipcRenderer.send('uploadChoosedFiles', [{ path: str }])
} else {
- this.$message.error('请拖入合法的图片文件或者图片URL地址')
+ this.$message.error(this.$T('TIPS_DRAG_VALID_PICTURE_OR_URL'))
}
} else {
this.ipcSendFiles(e.dataTransfer!.files)
@@ -150,7 +150,7 @@ export default class extends Vue {
}
])
} else {
- this.$message.error('请拖入合法的图片文件或者图片URL地址')
+ this.$message.error(this.$T('TIPS_DRAG_VALID_PICTURE_OR_URL'))
}
}
@@ -193,8 +193,8 @@ export default class extends Vue {
const str = await navigator.clipboard.readText()
this.$bus.$emit(SHOW_INPUT_BOX, {
value: isUrl(str) ? str : '',
- title: '请输入URL',
- placeholder: 'http://或者https://开头'
+ title: this.$T('TIPS_INPUT_URL'),
+ placeholder: this.$T('TIPS_HTTP_PREFIX')
})
}
@@ -205,7 +205,7 @@ export default class extends Vue {
path: val
}])
} else {
- this.$message.error('请输入合法的URL')
+ this.$message.error(this.$T('TIPS_INPUT_VALID_URL'))
}
}
diff --git a/src/renderer/pages/picbeds/Others.vue b/src/renderer/pages/picbeds/Others.vue
index e41ec68f..8369bdd2 100644
--- a/src/renderer/pages/picbeds/Others.vue
+++ b/src/renderer/pages/picbeds/Others.vue
@@ -3,7 +3,7 @@
- 确定
- 设为默认图床
+ {{ $T('CONFIRM') }}
+ {{ $T('SETTINGS_SET_DEFAULT_PICBED') }}
@@ -60,8 +60,8 @@ export default class extends Vue {
this.saveConfig({
[`picBed.${this.type}`]: result
})
- const successNotification = new Notification('设置结果', {
- body: '设置成功'
+ const successNotification = new Notification(this.$T('SETTINGS_RESULT'), {
+ body: this.$T('TIPS_SET_SUCCEED')
})
successNotification.onclick = () => {
return true
@@ -76,8 +76,8 @@ export default class extends Vue {
})
// @ts-ignore 来自mixin的数据
this.defaultPicBed = type
- const successNotification = new Notification('设置默认图床', {
- body: '设置成功'
+ const successNotification = new Notification(this.$T('SETTINGS_DEFAULT_PICBED'), {
+ body: this.$T('TIPS_SET_SUCCEED')
})
successNotification.onclick = () => {
return true
diff --git a/src/renderer/pages/picbeds/SMMS.vue b/src/renderer/pages/picbeds/SMMS.vue
index 28ed043d..3bf7437c 100644
--- a/src/renderer/pages/picbeds/SMMS.vue
+++ b/src/renderer/pages/picbeds/SMMS.vue
@@ -17,7 +17,7 @@
:rules="{
required: true, message: 'Token不能为空', trigger: 'blur'
}">
-
+
diff --git a/src/renderer/utils/ConfirmButtonMixin.ts b/src/renderer/utils/ConfirmButtonMixin.ts
index ea10ae77..c30425a3 100644
--- a/src/renderer/utils/ConfirmButtonMixin.ts
+++ b/src/renderer/utils/ConfirmButtonMixin.ts
@@ -16,8 +16,8 @@ export default class extends Vue {
'picBed.uploader': type
})
this.defaultPicBed = type
- const successNotification = new Notification('设置默认图床', {
- body: '设置成功'
+ const successNotification = new Notification(this.$T('SETTINGS_DEFAULT_PICBED'), {
+ body: this.$T('TIPS_SET_SUCCEED')
})
successNotification.onclick = () => {
return true
diff --git a/src/universal/i18n/zh-CN.ts b/src/universal/i18n/zh-CN.ts
index eb90328f..d2917fd0 100644
--- a/src/universal/i18n/zh-CN.ts
+++ b/src/universal/i18n/zh-CN.ts
@@ -53,6 +53,7 @@ export const ZH_CN = {
FILE_RENAME: '文件改名',
// settings
+ SETTINGS: '设置',
SETTINGS_OPEN_CONFIG_FILE: '打开配置文件',
SETTINGS_CLICK_TO_OPEN: '点击打开',
SETTINGS_SET_LOG_FILE: '设置日志文件',
@@ -99,7 +100,11 @@ export const ZH_CN = {
SETTINGS_LOG_LEVEL_WARN: '提醒-Warn',
SETTINGS_LOG_LEVEL_NONE: '不记录日志-None',
SETTINGS_RESULT: '设置结果',
+ SETTINGS_DEFAULT_PICBED: '设置默认图床',
+ SETTINGS_SET_DEFAULT_PICBED: '设为默认图床',
+ SETTINGS_NOT_CONFIG_OPTIONS: '暂无配置项',
+ // shortcut page
SHORTCUT_NAME: '快捷键名称',
SHORTCUT_BIND: '快捷键绑定',
SHORTCUT_STATUS: '状态',
@@ -112,6 +117,22 @@ export const ZH_CN = {
SHORTCUT_EDIT: '编辑',
SHORTCUT_CHANGE_UPLOAD: '修改上传快捷键',
+ // tray page
+ WAIT_TO_UPLOAD: '等待上传',
+ ALREADY_UPLOAD: '已上传',
+
+ // uload page
+ PICTURE_UPLOAD: '图片上传',
+ DRAG_FILE_TO_HERE: '将文件拖拽到此处,或',
+ CLICK_TO_UPLOAD: '点击上传',
+ LINK_FORMAT: '链接格式',
+ CUSTOM: '自定义',
+ CLIPBOARD_PICTURE: '剪贴板图片',
+ TIPS_DRAG_VALID_PICTURE_OR_URL: '请拖入合法的图片文件或者图片URL地址',
+ TIPS_INPUT_URL: '请输入URL',
+ TIPS_HTTP_PREFIX: 'http://或者https://开头',
+ TIPS_INPUT_VALID_URL: '请输入合法的URL',
+
// plugins
PLUGIN_SEARCH_PLACEHOLDER: '搜索npm上的PicGo插件,或者点击上方按钮查看优秀插件列表',
PLUGIN_INSTALL: '安装',
diff --git a/src/universal/types/extra-vue.d.ts b/src/universal/types/extra-vue.d.ts
index 505ab8c8..6d968ac2 100644
--- a/src/universal/types/extra-vue.d.ts
+++ b/src/universal/types/extra-vue.d.ts
@@ -22,5 +22,7 @@ declare module 'vue/types/vue' {
$T: typeof import('#/i18n/index').T
saveConfig(data: IObj | string, value?: any): void
getConfig(key?: string): Promise
+ setDefaultPicBed(picBed: string): void
+ defaultPicBed: string
}
}
已上传
+ {{ $T('ALREADY_UPLOAD') }}
- 图片上传 - {{ picBedName }}
+ {{ $T('PICTURE_UPLOAD') }} - {{ picBedName }}
- 将文件拖到此处,或 点击上传
+ {{ $T('DRAG_FILE_TO_HERE') }} {{ $T('CLICK_TO_UPLOAD') }}
- 链接格式
+ {{ $T('LINK_FORMAT') }}
- 快捷上传
+ {{ $T('QUICK_UPLOAD') }}
-
- {{ picBedName }}设置
+ {{ picBedName }}{{ $T('SETTINGS') }}
- 设为默认图床
+ {{ $T('SETTINGS_SET_DEFAULT_PICBED') }}
暂无配置项
- {{ $T('SETTINGS_NOT_CONFIG_OPTIONS') }}
+