More i18n

This commit is contained in:
CzBiX
2020-09-03 02:38:15 +08:00
parent fa9e71fbd0
commit 62bfad1f81
7 changed files with 34 additions and 16 deletions

View File

@@ -66,7 +66,7 @@
class="icon-label"
>
<v-icon>mdi-access-point-network</v-icon>
{{ info.dht_nodes }} nodes
{{ $t('label.dht_nodes', info.dht_nodes) }}
</div>
<v-divider
vertical

View File

@@ -491,13 +491,13 @@ export default class Torrents extends Vue {
await api.reannounceTorrents(this.selectedHashes);
this.showSnackBar({text: 'Reannounced'});
this.showSnackBar({text: tr('label.reannounced')});
}
async recheckTorrents() {
const v = await this.asyncShowDialog({ // TODO: update with i18n usage
title: 'Recheck Torrents',
text: 'Are you sure want to recheck torrents?',
const v = await this.asyncShowDialog({
title: tr('title.recheck_torrents'),
text: tr('dialog.recheck_torrents.msg'),
type: DialogType.OkCancel,
});
@@ -506,7 +506,7 @@ export default class Torrents extends Vue {
}
await api.recheckTorrents(this.selectedHashes);
this.showSnackBar({text: 'Rechecking'});
this.showSnackBar({text: tr('label.rechecking')});
}
async setTorrentLocation() {

View File

@@ -84,7 +84,7 @@
text
@click="back"
v-if="step < 3"
v-text="step == 1 ? 'Cancel' : 'Back'"
v-text="step == 1 ? $t('cancel') : $t('back')"
>
Back
</v-btn>
@@ -93,7 +93,7 @@
color="warning"
:disabled="!canNext"
:loading="submitting"
v-text="[null, 'Next', 'Confirm', 'Close'][step]"
v-text="[null, $t('next'), $t('confirm'), $t('close')][step]"
/>
</v-card-actions>
</v-card>

View File

@@ -10,7 +10,7 @@
<v-icon class="mr-2">
mdi-alert-circle
</v-icon>
<span>Info</span>
<span v-text="$t('info')" />
</v-card-title>
<v-card-text>
<v-tabs v-model="tabSync">
@@ -90,9 +90,8 @@
<v-btn
text
@click="closeDialog"
>
Close
</v-btn>
v-text="$t('close')"
/>
</v-card-actions>
</v-card>
</v-dialog>

View File

@@ -9,7 +9,7 @@
<v-card>
<v-card-title class="headline">
<v-icon class="mr-2">mdi-delta</v-icon>
<span>Logs</span>
<span v-text="$t('logs')" />
</v-card-title>
<v-card-text>
<v-progress-linear
@@ -35,9 +35,8 @@
<v-btn
text
@click="closeDialog"
>
Close
</v-btn>
v-text="$t('close')"
/>
</v-card-actions>
</v-card>
</v-dialog>

View File

@@ -71,6 +71,7 @@ export default {
set_category: 'Set Category',
edit_tracker: 'Edit Tracker',
set_location: 'Set Location',
recheck_torrents: 'Recheck Torrents',
},
label: {
@@ -90,6 +91,12 @@ export default {
deleting: 'Deleting…',
moving: 'Moving…',
moved: 'Moved',
next: 'Next',
back: 'Back',
confirm: 'Confirm',
reannounced: 'Reannounced',
rechecking: 'Rechecking…',
dht_nodes: '%{smart_count} node |||| %{smart_count} nodes',
},
msg: {
@@ -117,6 +124,9 @@ export default {
switch_locale: {
msg: 'Are you sure to switch language to %{lang}?\nThis action will reload page.',
},
recheck_torrents: {
msg: 'Are you sure want to recheck torrents?',
},
rss: {
add_feed: 'Add Feed',
feed_url: 'Feed URL',

View File

@@ -71,6 +71,7 @@ export default {
set_category: '设置分类',
edit_tracker: '编辑 Tracker',
set_location: '修改文件位置',
recheck_torrents: '重新检查种子',
},
label: {
@@ -90,6 +91,12 @@ export default {
deleting: '删除中…',
moving: '移动中…',
moved: '已移动',
next: '下一步',
back: '返回',
confirm: '确定',
reannounced: '已重新通告',
rechecking: '重新检查中…',
dht_nodes: '%{smart_count} 节点',
},
msg: {
@@ -117,6 +124,9 @@ export default {
switch_locale: {
msg: '确定要切换语言为 %{lang} 吗?\n这将会刷新页面。',
},
recheck_torrents: {
msg: '确定要重新检查选中的种子吗?',
},
rss: {
add_feed: '添加订阅',
feed_url: '订阅 URL',