mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-01-23 14:48:13 -05:00
🚧 WIP: renderer i18n
This commit is contained in:
parent
cc73fe7bce
commit
be32ed0e52
@ -43,19 +43,19 @@
|
|||||||
<template v-if="searchText">
|
<template v-if="searchText">
|
||||||
<template v-if="!item.hasInstall">
|
<template v-if="!item.hasInstall">
|
||||||
<span class="config-button install" v-if="!item.ing" @click="installPlugin(item)">
|
<span class="config-button install" v-if="!item.ing" @click="installPlugin(item)">
|
||||||
安装
|
{{ $T('PLUGIN_INSTALL') }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else-if="item.ing" class="config-button ing">
|
<span v-else-if="item.ing" class="config-button ing">
|
||||||
安装中
|
{{ $T('PLUGIN_INSTALLING') }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<span v-else class="config-button ing">
|
<span v-else class="config-button ing">
|
||||||
已安装
|
{{ $T('PLUGIN_INSTALLED') }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<span v-if="item.ing" class="config-button ing">
|
<span v-if="item.ing" class="config-button ing">
|
||||||
进行中
|
{{ $T('PLUGIN_DOING_SOMETHING') }}
|
||||||
</span>
|
</span>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<i
|
<i
|
||||||
@ -77,12 +77,14 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row v-show="needReload" class="reload-mask" :class="{ 'cut-width': pluginList.length > 6 }">
|
<el-row v-show="needReload" class="reload-mask" :class="{ 'cut-width': pluginList.length > 6 }">
|
||||||
<el-button type="primary" @click="reloadApp" size="mini" round>重启以生效</el-button>
|
<el-button type="primary" @click="reloadApp" size="mini" round>{{ $T('TIPS_NEED_RELOAD') }}</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
:modal-append-to-body="false"
|
:modal-append-to-body="false"
|
||||||
:title="`配置${configName}`"
|
:title="$T('CONFIG_THING', {
|
||||||
|
c: configName
|
||||||
|
})"
|
||||||
width="70%"
|
width="70%"
|
||||||
>
|
>
|
||||||
<config-form
|
<config-form
|
||||||
@ -93,8 +95,8 @@
|
|||||||
>
|
>
|
||||||
</config-form>
|
</config-form>
|
||||||
<span slot="footer">
|
<span slot="footer">
|
||||||
<el-button @click="dialogVisible = false" round>取消</el-button>
|
<el-button @click="dialogVisible = false" round>{{ $T('CANCEL') }}</el-button>
|
||||||
<el-button type="primary" @click="handleConfirmConfig" round>确定</el-button>
|
<el-button type="primary" @click="handleConfirmConfig" round>{{ $T('CONFIRM') }}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
@ -138,8 +140,7 @@ export default class extends Vue {
|
|||||||
pluginNameList: string[] = []
|
pluginNameList: string[] = []
|
||||||
loading = true
|
loading = true
|
||||||
needReload = false
|
needReload = false
|
||||||
pluginListToolTip = '插件列表'
|
pluginListToolTip = this.$T('PLUGIN_LIST')importLocalPluginToolTip = this.$T('PLUGIN_IMPORT_LOCAL')
|
||||||
importLocalPluginToolTip = '导入本地插件'
|
|
||||||
id = ''
|
id = ''
|
||||||
os = ''
|
os = ''
|
||||||
defaultLogo: string = 'this.src="https://cdn.jsdelivr.net/gh/Molunerfinn/PicGo@dev/public/roundLogo.png"'
|
defaultLogo: string = 'this.src="https://cdn.jsdelivr.net/gh/Molunerfinn/PicGo@dev/public/roundLogo.png"'
|
||||||
@ -264,9 +265,9 @@ export default class extends Vue {
|
|||||||
|
|
||||||
installPlugin (item: IPicGoPlugin) {
|
installPlugin (item: IPicGoPlugin) {
|
||||||
if (!item.gui) {
|
if (!item.gui) {
|
||||||
this.$confirm('该插件未对可视化界面进行优化, 是否继续安装?', '提示', {
|
this.$confirm(this.$T('TIPS_PLUGIN_NOT_GUI_IMPLEMENT'), this.$T('TIPS_NOTICE'), {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: this.$T('CONFIRM'),
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: this.$T('CANCEL'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
item.ing = true
|
item.ing = true
|
||||||
@ -309,8 +310,8 @@ export default class extends Vue {
|
|||||||
needReload: true
|
needReload: true
|
||||||
})
|
})
|
||||||
this.needReload = true
|
this.needReload = true
|
||||||
const successNotification = new Notification('更新成功', {
|
const successNotification = new Notification(this.$T('PLUGIN_UPDATE_SUCCEED'), {
|
||||||
body: '请点击此通知重启应用以生效'
|
body: this.$T('TIPS_NEED_RELOAD')
|
||||||
})
|
})
|
||||||
successNotification.onclick = () => {
|
successNotification.onclick = () => {
|
||||||
this.reloadApp()
|
this.reloadApp()
|
||||||
@ -342,8 +343,8 @@ export default class extends Vue {
|
|||||||
})
|
})
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
const successNotification = new Notification('设置结果', {
|
const successNotification = new Notification(this.$T('SETTINGS_RESULT'), {
|
||||||
body: '设置成功'
|
body: this.$T('TIPS_SET_SUCCEED')
|
||||||
})
|
})
|
||||||
successNotification.onclick = () => {
|
successNotification.onclick = () => {
|
||||||
return true
|
return true
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
@submit.native.prevent
|
@submit.native.prevent
|
||||||
>
|
>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="文件改名"
|
:label="$T('FILE_RENAME')"
|
||||||
>
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="fileName"
|
v-model="fileName"
|
||||||
@ -15,8 +15,8 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<el-row>
|
<el-row>
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<el-button @click="cancel" round size="mini">取消</el-button>
|
<el-button @click="cancel" round size="mini">{{ $T('CANCEL') }}</el-button>
|
||||||
<el-button type="primary" @click="confirmName" round size="mini">确定</el-button>
|
<el-button type="primary" @click="confirmName" round size="mini">{{ $T('CONFIRM') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="shortcut-page">
|
<div id="shortcut-page">
|
||||||
<div class="view-title">
|
<div class="view-title">
|
||||||
快捷键设置
|
{{ $T('SETTINGS_SET_SHORTCUT') }}
|
||||||
</div>
|
</div>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="20" :offset="2">
|
<el-col :span="20" :offset="2">
|
||||||
@ -10,7 +10,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="快捷键名称"
|
:label="$T('SHORTCUT_NAME')"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.label ? scope.row.label : scope.row.name }}
|
{{ scope.row.label ? scope.row.label : scope.row.name }}
|
||||||
@ -18,24 +18,24 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
width="160px"
|
width="160px"
|
||||||
label="快捷键绑定"
|
:label="$T('SHORTCUT_BIND')"
|
||||||
prop="key"
|
prop="key"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="状态"
|
:label="$T('SHORTCUT_STATUS')"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag
|
<el-tag
|
||||||
size="mini"
|
size="mini"
|
||||||
:type="scope.row.enable ? 'success' : 'danger'"
|
:type="scope.row.enable ? 'success' : 'danger'"
|
||||||
>
|
>
|
||||||
{{ scope.row.enable ? '已启用' : '已禁用' }}
|
{{ scope.row.enable ? $T('SHORTCUT_ENABLED') : $T('SHORTCUT_DISABLED') }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="来源"
|
:label="$T('SHORTCUT_SOURCE')"
|
||||||
width="100px"
|
width="100px"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -43,7 +43,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="操作"
|
:label="$T('SHORTCUT_HANDLE')"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@ -53,14 +53,14 @@
|
|||||||
disabled: scope.row.enable
|
disabled: scope.row.enable
|
||||||
}"
|
}"
|
||||||
type="text">
|
type="text">
|
||||||
{{ scope.row.enable ? '禁用' : '启用' }}
|
{{ scope.row.enable ? $T('SHORTCUT_DISABLE') : $T('SHORTCUT_ENABLE') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
class="edit"
|
class="edit"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="openKeyBindingDialog(scope.row, scope.$index)"
|
@click="openKeyBindingDialog(scope.row, scope.$index)"
|
||||||
type="text">
|
type="text">
|
||||||
编辑
|
{{ $T('SHORTCUT_EDIT') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -68,7 +68,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="修改上传快捷键"
|
:title="$T('SHORTCUT_CHANGE_UPLOAD')"
|
||||||
:visible.sync="keyBindingVisible"
|
:visible.sync="keyBindingVisible"
|
||||||
:modal-append-to-body="false"
|
:modal-append-to-body="false"
|
||||||
>
|
>
|
||||||
@ -76,9 +76,7 @@
|
|||||||
label-position="top"
|
label-position="top"
|
||||||
label-width="80px"
|
label-width="80px"
|
||||||
>
|
>
|
||||||
<el-form-item
|
<el-form-item>
|
||||||
label="快捷上传"
|
|
||||||
>
|
|
||||||
<el-input
|
<el-input
|
||||||
class="align-center"
|
class="align-center"
|
||||||
@keydown.native.prevent="keyDetect($event)"
|
@keydown.native.prevent="keyDetect($event)"
|
||||||
@ -88,8 +86,12 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer">
|
<span slot="footer">
|
||||||
<el-button @click="cancelKeyBinding" round>取消</el-button>
|
<el-button @click="cancelKeyBinding" round>
|
||||||
<el-button type="primary" @click="confirmKeyBinding" round>确定</el-button>
|
{{ $T('CANCEL') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button type="primary" @click="confirmKeyBinding" round>
|
||||||
|
{{ $T('CONFIRM') }}
|
||||||
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
@ -50,6 +50,7 @@ export const ZH_CN = {
|
|||||||
CHANGE_IMAGE_URL_SUCCEED: '修改图片URL成功',
|
CHANGE_IMAGE_URL_SUCCEED: '修改图片URL成功',
|
||||||
COPY_LINK_SUCCEED: '复制链接成功',
|
COPY_LINK_SUCCEED: '复制链接成功',
|
||||||
BATCH_COPY_LINK_SUCCEED: '批量复制链接成功',
|
BATCH_COPY_LINK_SUCCEED: '批量复制链接成功',
|
||||||
|
FILE_RENAME: '文件改名',
|
||||||
|
|
||||||
// settings
|
// settings
|
||||||
SETTINGS_OPEN_CONFIG_FILE: '打开配置文件',
|
SETTINGS_OPEN_CONFIG_FILE: '打开配置文件',
|
||||||
@ -99,6 +100,18 @@ export const ZH_CN = {
|
|||||||
SETTINGS_LOG_LEVEL_NONE: '不记录日志-None',
|
SETTINGS_LOG_LEVEL_NONE: '不记录日志-None',
|
||||||
SETTINGS_RESULT: '设置结果',
|
SETTINGS_RESULT: '设置结果',
|
||||||
|
|
||||||
|
SHORTCUT_NAME: '快捷键名称',
|
||||||
|
SHORTCUT_BIND: '快捷键绑定',
|
||||||
|
SHORTCUT_STATUS: '状态',
|
||||||
|
SHORTCUT_ENABLED: '已启用',
|
||||||
|
SHORTCUT_DISABLED: '已禁用',
|
||||||
|
SHORTCUT_SOURCE: '已禁用',
|
||||||
|
SHORTCUT_HANDLE: '操作',
|
||||||
|
SHORTCUT_ENABLE: '启用',
|
||||||
|
SHORTCUT_DISABLE: '禁用',
|
||||||
|
SHORTCUT_EDIT: '编辑',
|
||||||
|
SHORTCUT_CHANGE_UPLOAD: '修改上传快捷键',
|
||||||
|
|
||||||
// plugins
|
// plugins
|
||||||
PLUGIN_SEARCH_PLACEHOLDER: '搜索npm上的PicGo插件,或者点击上方按钮查看优秀插件列表',
|
PLUGIN_SEARCH_PLACEHOLDER: '搜索npm上的PicGo插件,或者点击上方按钮查看优秀插件列表',
|
||||||
PLUGIN_INSTALL: '安装',
|
PLUGIN_INSTALL: '安装',
|
||||||
|
Loading…
Reference in New Issue
Block a user