From 9381a2a9735e110afb7970dd40b00a54633e6523 Mon Sep 17 00:00:00 2001
From: Rewrite0 <49576640+Rewrite0@users.noreply.github.com>
Date: Wed, 14 Jun 2023 21:09:09 +0800
Subject: [PATCH] fix: Change key name and translation
---
webui/src/components/ab-add-bangumi.vue | 2 +-
webui/src/components/ab-change-account.vue | 4 +-
webui/src/components/ab-edit-rule.vue | 16 ++---
webui/src/components/ab-rule.vue | 2 +-
webui/src/components/layout/ab-topbar.vue | 2 +-
.../components/setting/config-download.vue | 14 ++--
.../src/components/setting/config-manage.vue | 12 ++--
.../src/components/setting/config-normal.vue | 10 +--
.../setting/config-notification.vue | 10 +--
.../src/components/setting/config-parser.vue | 16 ++---
.../src/components/setting/config-player.vue | 6 +-
webui/src/components/setting/config-proxy.vue | 14 ++--
webui/src/locales/lang/en-US.json | 54 +++++++--------
webui/src/locales/lang/zh-CN.json | 68 +++++++++----------
webui/src/pages/index/log.vue | 4 +-
webui/src/pages/login.vue | 2 +-
16 files changed, 118 insertions(+), 118 deletions(-)
diff --git a/webui/src/components/ab-add-bangumi.vue b/webui/src/components/ab-add-bangumi.vue
index 5b380ab7..77a73ebb 100644
--- a/webui/src/components/ab-add-bangumi.vue
+++ b/webui/src/components/ab-add-bangumi.vue
@@ -115,7 +115,7 @@ async function subscribe() {
@@ -35,7 +35,7 @@ const { user, update } = useAuth();
{{
- $t('topbar.profile.updatebtn')
+ $t('topbar.profile.update_btn')
}}
diff --git a/webui/src/components/ab-edit-rule.vue b/webui/src/components/ab-edit-rule.vue
index 0602cd3d..898aad87 100644
--- a/webui/src/components/ab-edit-rule.vue
+++ b/webui/src/components/ab-edit-rule.vue
@@ -53,9 +53,9 @@ function emitEnable() {
const popupTitle = computed(() => {
if (rule.value.deleted) {
- return t('homepage.rule.enablerule');
+ return t('homepage.rule.enable_rule');
} else {
- return t('homepage.rule.editrule');
+ return t('homepage.rule.edit_rule');
}
});
@@ -71,16 +71,16 @@ const boxSize = computed(() => {
-
{{ $t('homepage.rule.enablehit') }}
+
{{ $t('homepage.rule.enable_hit') }}
emitEnable()">{{
- $t('homepage.rule.yesbtn')
+ $t('homepage.rule.yes_btn')
}}
close()">{{
- $t('homepage.rule.nobtn')
+ $t('homepage.rule.no_btn')
}}
@@ -111,7 +111,7 @@ const boxSize = computed(() => {
v-model:show="deleteFileDialog.show"
:title="$t('homepage.rule.delete')"
>
- {{ $t('homepage.rule.deletehit') }}
+ {{ $t('homepage.rule.delete_hit') }}
@@ -119,10 +119,10 @@ const boxSize = computed(() => {
size="small"
type="warn"
@click="() => emitdeleteFile(true)"
- >{{ $t('homepage.rule.yesbtn') }}{{ $t('homepage.rule.yes_btn') }}
emitdeleteFile(false)">{{
- $t('homepage.rule.nobtn')
+ $t('homepage.rule.no_btn')
}}
diff --git a/webui/src/components/ab-rule.vue b/webui/src/components/ab-rule.vue
index 1baf825c..f4e40a63 100644
--- a/webui/src/components/ab-rule.vue
+++ b/webui/src/components/ab-rule.vue
@@ -11,7 +11,7 @@ const rule = defineModel('rule', {
const items: SettingItem[] = [
{
configKey: 'official_title',
- label: t('homepage.rule.officaltitle'),
+ label: t('homepage.rule.offical_title'),
type: 'input',
prop: {
type: 'text',
diff --git a/webui/src/components/layout/ab-topbar.vue b/webui/src/components/layout/ab-topbar.vue
index b110f61f..4f629455 100644
--- a/webui/src/components/layout/ab-topbar.vue
+++ b/webui/src/components/layout/ab-topbar.vue
@@ -45,7 +45,7 @@ const items = [
},
{
id: 5,
- label: t('topbar.resetrule'),
+ label: t('topbar.reset_rule'),
icon: Format,
handle: resetRule,
},
diff --git a/webui/src/components/setting/config-download.vue b/webui/src/components/setting/config-download.vue
index 09d2db82..56834022 100644
--- a/webui/src/components/setting/config-download.vue
+++ b/webui/src/components/setting/config-download.vue
@@ -12,7 +12,7 @@ const downloaderType: DownloaderType = ['qbittorrent'];
const items: SettingItem[] = [
{
configKey: 'type',
- label: t('config.downloaderset.type'),
+ label: t('config.downloader_set.type'),
type: 'select',
css: 'w-115px',
prop: {
@@ -21,7 +21,7 @@ const items: SettingItem[] = [
},
{
configKey: 'host',
- label: t('config.downloaderset.host'),
+ label: t('config.downloader_set.host'),
type: 'input',
prop: {
type: 'text',
@@ -30,7 +30,7 @@ const items: SettingItem[] = [
},
{
configKey: 'username',
- label: t('config.downloaderset.username'),
+ label: t('config.downloader_set.username'),
type: 'input',
prop: {
type: 'text',
@@ -39,7 +39,7 @@ const items: SettingItem[] = [
},
{
configKey: 'password',
- label: t('config.downloaderset.password'),
+ label: t('config.downloader_set.password'),
type: 'input',
prop: {
type: 'text',
@@ -49,7 +49,7 @@ const items: SettingItem[] = [
},
{
configKey: 'path',
- label: t('config.downloaderset.path'),
+ label: t('config.downloader_set.path'),
type: 'input',
prop: {
type: 'text',
@@ -58,14 +58,14 @@ const items: SettingItem[] = [
},
{
configKey: 'ssl',
- label: t('config.downloaderset.ssl'),
+ label: t('config.downloader_set.ssl'),
type: 'switch',
},
];
-
+
[] = [
{
configKey: 'enable',
- label: t('config.manageset.enable'),
+ label: t('config.manage_set.enable'),
type: 'switch',
},
{
configKey: 'rename_method',
- label: t('config.manageset.method'),
+ label: t('config.manage_set.method'),
type: 'select',
prop: {
items: renameMethod,
@@ -26,24 +26,24 @@ const items: SettingItem[] = [
},
{
configKey: 'eps_complete',
- label: t('config.manageset.eps'),
+ label: t('config.manage_set.eps'),
type: 'switch',
},
{
configKey: 'group_tag',
- label: t('config.manageset.grouptag'),
+ label: t('config.manage_set.group_tag'),
type: 'switch',
},
{
configKey: 'remove_bad_torrent',
- label: t('config.manageset.deletebadtorr'),
+ label: t('config.manage_set.delete_bad_torrent'),
type: 'switch',
},
];
-
+
[] = [
{
configKey: 'rss_time',
- label: t('config.normalset.rssintvl'),
+ label: t('config.normal_set.rss_interval'),
type: 'input',
css: 'w-72px',
prop: {
@@ -22,7 +22,7 @@ const programItems: SettingItem[] = [
},
{
configKey: 'rename_time',
- label: t('config.normalset.renameintvl'),
+ label: t('config.normal_set.rename_interval'),
type: 'input',
css: 'w-72px',
prop: {
@@ -32,7 +32,7 @@ const programItems: SettingItem[] = [
},
{
configKey: 'webui_port',
- label: t('config.normalset.webport'),
+ label: t('config.normal_set.web_port'),
type: 'input',
css: 'w-72px',
prop: {
@@ -45,13 +45,13 @@ const programItems: SettingItem[] = [
const logItems: SettingItem = {
configKey: 'debug_enable',
- label: t('config.normalset.debug'),
+ label: t('config.normal_set.debug'),
type: 'switch',
};
-
+
[] = [
{
configKey: 'enable',
- label: t('config.notificationset.enable'),
+ label: t('config.notification_set.enable'),
type: 'switch',
bottomLine: true,
},
{
configKey: 'type',
- label: t('config.notificationset.type'),
+ label: t('config.notification_set.type'),
type: 'select',
css: 'w-140px',
prop: {
@@ -32,7 +32,7 @@ const items: SettingItem[] = [
},
{
configKey: 'token',
- label: t('config.notificationset.token'),
+ label: t('config.notification_set.token'),
type: 'input',
prop: {
type: 'text',
@@ -41,7 +41,7 @@ const items: SettingItem[] = [
},
{
configKey: 'chat_id',
- label: t('config.notificationset.chatid'),
+ label: t('config.notification_set.chat_id'),
type: 'input',
prop: {
type: 'text',
@@ -52,7 +52,7 @@ const items: SettingItem[] = [
-
+
[] = [
{
configKey: 'enable',
- label: t('config.parserset.enable'),
+ label: t('config.parser_set.enable'),
type: 'switch',
},
{
configKey: 'type',
- label: t('config.parserset.source'),
+ label: t('config.parser_set.source'),
type: 'select',
css: 'w-115px',
prop: {
@@ -35,7 +35,7 @@ const items: SettingItem[] = [
},
{
configKey: 'token',
- label: t('config.parserset.token'),
+ label: t('config.parser_set.token'),
type: 'input',
prop: {
type: 'text',
@@ -44,7 +44,7 @@ const items: SettingItem[] = [
},
{
configKey: 'custom_url',
- label: t('config.parserset.url'),
+ label: t('config.parser_set.url'),
type: 'input',
prop: {
type: 'text',
@@ -54,7 +54,7 @@ const items: SettingItem[] = [
},
{
configKey: 'language',
- label: t('config.parserset.language'),
+ label: t('config.parser_set.language'),
type: 'select',
prop: {
items: langs,
@@ -62,7 +62,7 @@ const items: SettingItem[] = [
},
{
configKey: 'parser_type',
- label: t('config.parserset.type'),
+ label: t('config.parser_set.type'),
type: 'select',
prop: {
items: parserMethods,
@@ -70,14 +70,14 @@ const items: SettingItem[] = [
},
{
configKey: 'filter',
- label: t('config.parserset.exclude'),
+ label: t('config.parser_set.exclude'),
type: 'dynamic-tags',
},
];
-
+
-
+
diff --git a/webui/src/components/setting/config-proxy.vue b/webui/src/components/setting/config-proxy.vue
index 04407b4e..c4cc8cdf 100644
--- a/webui/src/components/setting/config-proxy.vue
+++ b/webui/src/components/setting/config-proxy.vue
@@ -12,12 +12,12 @@ const proxyType: ProxyType = ['http', 'https', 'socks5'];
const items: SettingItem[] = [
{
configKey: 'enable',
- label: t('config.proxyset.enable'),
+ label: t('config.proxy_set.enable'),
type: 'switch',
},
{
configKey: 'type',
- label: t('config.proxyset.type'),
+ label: t('config.proxy_set.type'),
type: 'select',
prop: {
items: proxyType,
@@ -26,7 +26,7 @@ const items: SettingItem[] = [
},
{
configKey: 'host',
- label: t('config.proxyset.host'),
+ label: t('config.proxy_set.host'),
type: 'input',
prop: {
type: 'text',
@@ -35,7 +35,7 @@ const items: SettingItem[] = [
},
{
configKey: 'port',
- label: t('config.proxyset.port'),
+ label: t('config.proxy_set.port'),
type: 'input',
prop: {
type: 'text',
@@ -44,7 +44,7 @@ const items: SettingItem[] = [
},
{
configKey: 'username',
- label: t('config.proxyset.username'),
+ label: t('config.proxy_set.username'),
type: 'input',
prop: {
type: 'text',
@@ -53,7 +53,7 @@ const items: SettingItem[] = [
},
{
configKey: 'password',
- label: t('config.proxyset.password'),
+ label: t('config.proxy_set.password'),
type: 'input',
prop: {
type: 'text',
@@ -64,7 +64,7 @@ const items: SettingItem[] = [
-
+
-
+
-
+
{{
- $t('login.loginbtn')
+ $t('login.login_btn')
}}