mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-04-24 10:31:09 +08:00
Remove unplugin-vue-i18n and change language file format
去除unplugin-vue-i18n,语言文件改为json格式,把i18n-ally的localespaths设置为"src/locales/lang"就可以用。缺少downloader及calendar及format问题也一并修改。
This commit is contained in:
@@ -124,9 +124,9 @@ async function subscribe() {
|
||||
></ab-setting>
|
||||
|
||||
<div flex="~ justify-end">
|
||||
<ab-button size="small" :loading="analysis.loading" @click="analyser"
|
||||
>{{$t('topbar.add.analyse')}}</ab-button
|
||||
>
|
||||
<ab-button size="small" :loading="analysis.loading" @click="analyser">{{
|
||||
$t('topbar.add.analyse')
|
||||
}}</ab-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -7,7 +7,11 @@ const { user, update } = useAuth();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ab-popup v-model:show="show" :title="$t('topbar.profile.poptitle')" css="w-365px">
|
||||
<ab-popup
|
||||
v-model:show="show"
|
||||
:title="$t('topbar.profile.poptitle')"
|
||||
css="w-365px"
|
||||
>
|
||||
<div space-y-16px>
|
||||
<ab-label :label="$t('topbar.profile.username')">
|
||||
<input
|
||||
@@ -30,7 +34,9 @@ const { user, update } = useAuth();
|
||||
<div line></div>
|
||||
|
||||
<div flex="~ justify-end">
|
||||
<ab-button size="small" @click="update">{{$t('topbar.profile.updatebtn')}}</ab-button>
|
||||
<ab-button size="small" @click="update">{{
|
||||
$t('topbar.profile.updatebtn')
|
||||
}}</ab-button>
|
||||
</div>
|
||||
</div>
|
||||
</ab-popup>
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import type { BangumiRule } from '#/bangumi';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import type { BangumiRule } from '#/bangumi';
|
||||
|
||||
const { t } = useI18n({ useScope: 'global' });
|
||||
const emit = defineEmits<{
|
||||
(e: 'apply', rule: BangumiRule): void;
|
||||
(e: 'enable', id: number): void;
|
||||
@@ -12,7 +11,7 @@ const emit = defineEmits<{
|
||||
opts: { id: number; deleteFile: boolean }
|
||||
): void;
|
||||
}>();
|
||||
|
||||
const { t } = useI18n({ useScope: 'global' });
|
||||
const show = defineModel('show', { default: false });
|
||||
const rule = defineModel<BangumiRule>('rule', {
|
||||
required: true,
|
||||
@@ -72,15 +71,17 @@ const boxSize = computed(() => {
|
||||
<template>
|
||||
<ab-popup v-model:show="show" :title="popupTitle" :css="boxSize">
|
||||
<div v-if="rule.deleted">
|
||||
<div>{{$t('homepage.rule.enablehit')}}</div>
|
||||
<div>{{ $t('homepage.rule.enablehit') }}</div>
|
||||
|
||||
<div line my-8px></div>
|
||||
|
||||
<div fx-cer justify-center space-x-10px>
|
||||
<ab-button size="small" type="warn" @click="() => emitEnable()"
|
||||
>{{$t('homepage.rule.yesbtn')}}</ab-button
|
||||
>
|
||||
<ab-button size="small" @click="() => close()">{{$t('homepage.rule.nobtn')}}</ab-button>
|
||||
<ab-button size="small" type="warn" @click="() => emitEnable()">{{
|
||||
$t('homepage.rule.yesbtn')
|
||||
}}</ab-button>
|
||||
<ab-button size="small" @click="() => close()">{{
|
||||
$t('homepage.rule.nobtn')
|
||||
}}</ab-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -92,29 +93,37 @@ const boxSize = computed(() => {
|
||||
size="small"
|
||||
type="warn"
|
||||
@click="() => showDeleteFileDialog('disable')"
|
||||
>{{$t('homepage.rule.disable')}}</ab-button
|
||||
>{{ $t('homepage.rule.disable') }}</ab-button
|
||||
>
|
||||
<ab-button
|
||||
size="small"
|
||||
type="warn"
|
||||
@click="() => showDeleteFileDialog('delete')"
|
||||
>{{$t('homepage.rule.delete')}}</ab-button
|
||||
>{{ $t('homepage.rule.delete') }}</ab-button
|
||||
>
|
||||
<ab-button size="small" @click="emitApply">{{$t('homepage.rule.apply')}}</ab-button>
|
||||
<ab-button size="small" @click="emitApply">{{
|
||||
$t('homepage.rule.apply')
|
||||
}}</ab-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ab-popup v-model:show="deleteFileDialog.show" :title="$t('homepage.rule.delete')">
|
||||
<div>{{$t('homepage.rule.deletehit')}}</div>
|
||||
<ab-popup
|
||||
v-model:show="deleteFileDialog.show"
|
||||
:title="$t('homepage.rule.delete')"
|
||||
>
|
||||
<div>{{ $t('homepage.rule.deletehit') }}</div>
|
||||
<div line my-8px></div>
|
||||
|
||||
<div fx-cer justify-center space-x-10px>
|
||||
<ab-button size="small" type="warn" @click="() => emitdeleteFile(true)"
|
||||
>{{$t('homepage.rule.yesbtn')}}</ab-button
|
||||
>
|
||||
<ab-button size="small" @click="() => emitdeleteFile(false)"
|
||||
>{{$t('homepage.rule.nobtn')}}</ab-button
|
||||
<ab-button
|
||||
size="small"
|
||||
type="warn"
|
||||
@click="() => emitdeleteFile(true)"
|
||||
>{{ $t('homepage.rule.yesbtn') }}</ab-button
|
||||
>
|
||||
<ab-button size="small" @click="() => emitdeleteFile(false)">{{
|
||||
$t('homepage.rule.nobtn')
|
||||
}}</ab-button>
|
||||
</div>
|
||||
</ab-popup>
|
||||
</ab-popup>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import type { BangumiRule } from '#/bangumi';
|
||||
import type { SettingItem } from '#/components';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const { t } = useI18n({ useScope: 'global' });
|
||||
const rule = defineModel<BangumiRule>('rule', {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { Menu, MenuButton, MenuItem, MenuItems } from '@headlessui/vue';
|
||||
import { Earth, AddOne, More } from '@icon-park/vue-next';
|
||||
import { AddOne, Earth, More } from '@icon-park/vue-next';
|
||||
|
||||
withDefaults(
|
||||
defineProps<{
|
||||
@@ -32,7 +32,7 @@ defineEmits(['clickAdds']);
|
||||
btn-click
|
||||
@click="() => $emit('changeLang')"
|
||||
/>
|
||||
|
||||
|
||||
<AddOne
|
||||
theme="outline"
|
||||
size="24"
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
SettingTwo,
|
||||
} from '@icon-park/vue-next';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
const { t } = useI18n({ useScope: 'global' });
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
open?: boolean;
|
||||
@@ -19,7 +19,7 @@ const props = withDefaults(
|
||||
open: false,
|
||||
}
|
||||
);
|
||||
|
||||
const { t } = useI18n({ useScope: 'global' });
|
||||
const show = ref(props.open);
|
||||
const toggle = () => (show.value = !show.value);
|
||||
const route = useRoute();
|
||||
@@ -89,7 +89,7 @@ const items = [
|
||||
@click="toggle"
|
||||
>
|
||||
<div :class="[!show && 'abs opacity-0']" transition-opacity>
|
||||
<div text-h1>{{$t('sidebar.title')}}</div>
|
||||
<div text-h1>{{ $t('sidebar.title') }}</div>
|
||||
</div>
|
||||
|
||||
<MenuUnfold
|
||||
@@ -139,7 +139,7 @@ const items = [
|
||||
@click="logout"
|
||||
>
|
||||
<Logout :size="24" />
|
||||
<div text-h2>{{$t('sidebar.logout')}}</div>
|
||||
<div text-h2>{{ $t('sidebar.logout') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
Refresh,
|
||||
} from '@icon-park/vue-next';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const { t, locale } = useI18n({ useScope: 'global' });
|
||||
const search = ref('');
|
||||
const show = ref(false);
|
||||
@@ -66,14 +67,14 @@ onUnmounted(() => {
|
||||
offUpdate();
|
||||
});
|
||||
|
||||
function changeLocale(){
|
||||
if(localStorage.getItem('lang') === 'zh-CN'){
|
||||
let newLang = 'en-US';
|
||||
function changeLocale() {
|
||||
if (localStorage.getItem('lang') === 'zh-CN') {
|
||||
const newLang = 'en-US';
|
||||
locale.value = newLang;
|
||||
localStorage.setItem('lang', newLang);
|
||||
location.reload();
|
||||
} else {
|
||||
let newLang = 'zh-CN';
|
||||
const newLang = 'zh-CN';
|
||||
locale.value = newLang;
|
||||
localStorage.setItem('lang', newLang);
|
||||
location.reload();
|
||||
@@ -91,7 +92,7 @@ function changeLocale(){
|
||||
<ab-search v-model:value="search" hidden />
|
||||
|
||||
<div ml-auto>
|
||||
<ab-status-bar
|
||||
<ab-status-bar
|
||||
:items="items"
|
||||
:running="running"
|
||||
@click-add="() => (showAdd = true)"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import type { Downloader, DownloaderType } from '#/config';
|
||||
import type { SettingItem } from '#/components';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const { t } = useI18n({ useScope: 'global' });
|
||||
const { getSettingGroup } = useConfigStore();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import type { BangumiManage, RenameMethod } from '#/config';
|
||||
import type { SettingItem } from '#/components';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const { t } = useI18n({ useScope: 'global' });
|
||||
const { getSettingGroup } = useConfigStore();
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script lang="ts" setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import type { Log, Program } from '#/config';
|
||||
import type { SettingItem } from '#/components';
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const { t } = useI18n({ useScope: 'global' })
|
||||
const { t } = useI18n({ useScope: 'global' });
|
||||
const { getSettingGroup } = useConfigStore();
|
||||
|
||||
const program = getSettingGroup('program');
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import type { Notification, NotificationType } from '#/config';
|
||||
import type { SettingItem } from '#/components';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const { t } = useI18n({ useScope: 'global' });
|
||||
const { getSettingGroup } = useConfigStore();
|
||||
@@ -17,13 +17,13 @@ const notificationType: NotificationType = [
|
||||
const items: SettingItem<Notification>[] = [
|
||||
{
|
||||
configKey: 'enable',
|
||||
label: t("config.notificationset.enable"),
|
||||
label: t('config.notificationset.enable'),
|
||||
type: 'switch',
|
||||
bottomLine: true,
|
||||
},
|
||||
{
|
||||
configKey: 'type',
|
||||
label: t("config.notificationset.type"),
|
||||
label: t('config.notificationset.type'),
|
||||
type: 'select',
|
||||
css: 'w-140px',
|
||||
prop: {
|
||||
@@ -32,7 +32,7 @@ const items: SettingItem<Notification>[] = [
|
||||
},
|
||||
{
|
||||
configKey: 'token',
|
||||
label: t("config.notificationset.token"),
|
||||
label: t('config.notificationset.token'),
|
||||
type: 'input',
|
||||
prop: {
|
||||
type: 'text',
|
||||
@@ -41,7 +41,7 @@ const items: SettingItem<Notification>[] = [
|
||||
},
|
||||
{
|
||||
configKey: 'chat_id',
|
||||
label: t("config.notificationset.chatid"),
|
||||
label: t('config.notificationset.chatid'),
|
||||
type: 'input',
|
||||
prop: {
|
||||
type: 'text',
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import type {
|
||||
RssParser,
|
||||
RssParserLang,
|
||||
@@ -6,7 +7,6 @@ import type {
|
||||
RssParserType,
|
||||
} from '#/config';
|
||||
import type { SettingItem } from '#/components';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const { t } = useI18n({ useScope: 'global' });
|
||||
const { getSettingGroup } = useConfigStore();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import type { Proxy, ProxyType } from '#/config';
|
||||
import type { SettingItem } from '#/components';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const { t } = useI18n({ useScope: 'global' });
|
||||
const { getSettingGroup } = useConfigStore();
|
||||
|
||||
@@ -1,22 +1,28 @@
|
||||
import { createI18n } from 'vue-i18n';
|
||||
import messages from '@intlify/unplugin-vue-i18n/messages'
|
||||
import enUS from './lang/en-US.json';
|
||||
import zhCN from './lang/zh-CN.json';
|
||||
|
||||
//Default language is the same as last setting (undefined is browser language)
|
||||
const messages = {
|
||||
'en-US': enUS,
|
||||
'zh-CN': zhCN,
|
||||
};
|
||||
|
||||
// Default language is the same as last setting (undefined is browser language)
|
||||
let lang = localStorage.getItem('lang');
|
||||
if(lang === null){
|
||||
const navLang = navigator.language;
|
||||
let localLang = navLang || false;
|
||||
lang = localLang || 'en-US';
|
||||
if (lang === null) {
|
||||
const navLang = navigator.language;
|
||||
const localLang = navLang || false;
|
||||
lang = localLang || 'en-US';
|
||||
}
|
||||
localStorage.setItem('lang', lang);
|
||||
|
||||
const i18n = createI18n({
|
||||
legacy: false,
|
||||
locale: lang,
|
||||
globalInjection: true,
|
||||
silentTranslationWarn: true,
|
||||
globalInstall: true,
|
||||
messages
|
||||
})
|
||||
legacy: false,
|
||||
locale: lang,
|
||||
globalInjection: true,
|
||||
silentTranslationWarn: true,
|
||||
globalInstall: true,
|
||||
messages,
|
||||
});
|
||||
|
||||
export default i18n;
|
||||
export default i18n;
|
||||
|
||||
132
webui/src/locales/lang/en-US.json
Normal file
132
webui/src/locales/lang/en-US.json
Normal file
@@ -0,0 +1,132 @@
|
||||
{
|
||||
"login": {
|
||||
"title": "Login",
|
||||
"username": "Username",
|
||||
"password": "Password",
|
||||
"loginbtn": "Login",
|
||||
"default": "Default"
|
||||
},
|
||||
"sidebar": {
|
||||
"title": "Menu",
|
||||
"homepage": "HomePage",
|
||||
"player": "Player",
|
||||
"log": "Log",
|
||||
"config": "Config",
|
||||
"logout": "Logout",
|
||||
"downloader": "Downloader",
|
||||
"calendar": "Calendar"
|
||||
},
|
||||
"topbar": {
|
||||
"start": "Start",
|
||||
"pause": "Pause",
|
||||
"restart": "Restart",
|
||||
"shutdown": "Shutdown",
|
||||
"resetrule": "Reset Rule",
|
||||
"profile": {
|
||||
"title": "Profile",
|
||||
"poptitle": "Change Account",
|
||||
"username": "Username",
|
||||
"password": "Password",
|
||||
"updatebtn": "Update"
|
||||
},
|
||||
"add": {
|
||||
"title": "Add Bangumi",
|
||||
"rsslink": "RSS Link",
|
||||
"placeholder": "Please enter the RSS link",
|
||||
"analyse": "Analyse"
|
||||
}
|
||||
},
|
||||
"homepage": {
|
||||
"title": "Bangumi List",
|
||||
"rule": {
|
||||
"officaltitle": "Official Title",
|
||||
"year": "Year",
|
||||
"season": "Season",
|
||||
"offset": "Offset",
|
||||
"exclude": "Exclude",
|
||||
"enable": "Enable",
|
||||
"disable": "Disable",
|
||||
"delete": "Delete",
|
||||
"apply": "Apply",
|
||||
"yesbtn": "Yes",
|
||||
"nobtn": "No",
|
||||
"enablehit": "Do you want to enable this rule?",
|
||||
"deletehit": "Delete Local File?",
|
||||
"enablerule": "Enable Rule",
|
||||
"editrule": "Edit Rule"
|
||||
}
|
||||
},
|
||||
"player": {
|
||||
"title": "Player",
|
||||
"hit": "Please set up the media player"
|
||||
},
|
||||
"log": {
|
||||
"title": "Log",
|
||||
"reset": "Reset",
|
||||
"copy": "Copy",
|
||||
"contactinfo": "Contact Infomation",
|
||||
"go": "Go",
|
||||
"join": "Join",
|
||||
"bugrepo": "Bug Report"
|
||||
},
|
||||
"config": {
|
||||
"title": "Config",
|
||||
"normalset": {
|
||||
"title": "Normal Setting",
|
||||
"rssintvl": "Interval Time of Rss",
|
||||
"renameintvl": "Interval Time of Rename",
|
||||
"webport": "WebUI Port",
|
||||
"debug": "Debug"
|
||||
},
|
||||
"parserset": {
|
||||
"title": "Parser Setting",
|
||||
"enable": "Enable",
|
||||
"source": "Source",
|
||||
"token": "Token",
|
||||
"url": "Custom Url",
|
||||
"language": "Language",
|
||||
"type": "Parser Type",
|
||||
"exclude": "Exclude"
|
||||
},
|
||||
"downloaderset": {
|
||||
"title": "Downloader Setting",
|
||||
"type": "Downloader Type",
|
||||
"host": "Host",
|
||||
"username": "Username",
|
||||
"password": "Password",
|
||||
"path": "Download Path",
|
||||
"ssl": "SSL"
|
||||
},
|
||||
"manageset": {
|
||||
"title": "Manage Setting",
|
||||
"enable": "Enable",
|
||||
"method": "Rename Method",
|
||||
"eps": "EPS complete",
|
||||
"grouptag": "Add Group Tag",
|
||||
"deletebadtorr": "Delete Bad Torrent"
|
||||
},
|
||||
"notificationset": {
|
||||
"title": "Notification Setting",
|
||||
"enable": "Enable",
|
||||
"type": "Type",
|
||||
"token": "Token",
|
||||
"chatid": "Chat ID"
|
||||
},
|
||||
"proxyset": {
|
||||
"title": "Proxy Setting",
|
||||
"enable": "Enable",
|
||||
"type": "Proxy Type",
|
||||
"host": "Host",
|
||||
"port": "Port",
|
||||
"username": "Username",
|
||||
"password": "Password"
|
||||
},
|
||||
"mediaplayerset": {
|
||||
"title": "Media Player Setting",
|
||||
"type": "type",
|
||||
"url": "url"
|
||||
},
|
||||
"cancel": "Cancel",
|
||||
"apply": "Apply"
|
||||
}
|
||||
}
|
||||
@@ -1,127 +0,0 @@
|
||||
login:
|
||||
title: 'Login'
|
||||
username: 'Username'
|
||||
password: 'Password'
|
||||
loginbtn: 'Login'
|
||||
default: 'Default'
|
||||
|
||||
sidebar:
|
||||
title: 'Menu'
|
||||
homepage: 'HomePage'
|
||||
player: 'Player'
|
||||
log: 'Log'
|
||||
config: 'Config'
|
||||
logout: 'Logout'
|
||||
|
||||
topbar:
|
||||
start: 'Start'
|
||||
pause: 'Pause'
|
||||
restart: 'Restart'
|
||||
shutdown: 'Shutdown'
|
||||
resetrule: 'Reset Rule'
|
||||
|
||||
profile:
|
||||
title: 'Profile'
|
||||
poptitle: 'Change Account'
|
||||
username: 'Username'
|
||||
password: 'Password'
|
||||
updatebtn: 'Update'
|
||||
|
||||
add:
|
||||
title: 'Add Bangumi'
|
||||
rsslink: 'RSS Link'
|
||||
placeholder: 'Please enter the RSS link'
|
||||
analyse: 'Analyse'
|
||||
|
||||
homepage:
|
||||
title: 'Bangumi List'
|
||||
rule:
|
||||
officaltitle: 'Official Title'
|
||||
year: 'Year'
|
||||
season: 'Season'
|
||||
offset: 'Offset'
|
||||
exclude: 'Exclude'
|
||||
enable: 'Enable'
|
||||
disable: 'Disable'
|
||||
delete: 'Delete'
|
||||
apply: 'Apply'
|
||||
yesbtn: 'Yes'
|
||||
nobtn: 'No'
|
||||
enablehit: 'Do you want to enable this rule?'
|
||||
deletehit: 'Delete Local File?'
|
||||
enablerule: 'Enable Rule'
|
||||
editrule: 'Edit Rule'
|
||||
|
||||
player:
|
||||
title: 'Player'
|
||||
hit: 'Please set up the media player'
|
||||
|
||||
log:
|
||||
title: 'Log'
|
||||
reset: 'Reset'
|
||||
copy: 'Copy'
|
||||
contactinfo: 'Contact Infomation'
|
||||
go: 'Go'
|
||||
join: 'Join'
|
||||
bugrepo: 'Bug Report'
|
||||
|
||||
config:
|
||||
title: 'Config'
|
||||
normalset:
|
||||
title: 'Normal Setting'
|
||||
rssintvl: 'Interval Time of Rss'
|
||||
renameintvl: 'Interval Time of Rename'
|
||||
webport: 'WebUI Port'
|
||||
debug: 'Debug'
|
||||
|
||||
parserset:
|
||||
title: 'Parser Setting'
|
||||
enable: 'Enable'
|
||||
source: 'Source'
|
||||
token: 'Token'
|
||||
url: 'Custom Url'
|
||||
language: 'Language'
|
||||
type: 'Parser Type'
|
||||
exclude: 'Exclude'
|
||||
|
||||
downloaderset:
|
||||
title: 'Downloader Setting'
|
||||
type: 'Downloader Type'
|
||||
host: 'Host'
|
||||
username: 'Username'
|
||||
password: 'Password'
|
||||
path: 'Download Path'
|
||||
ssl: 'SSL'
|
||||
|
||||
manageset:
|
||||
title: 'Manage Setting'
|
||||
enable: 'Enable'
|
||||
method: 'Rename Method'
|
||||
eps: 'EPS complete'
|
||||
grouptag: 'Add Group Tag'
|
||||
deletebadtorr: 'Delete Bad Torrent'
|
||||
|
||||
notificationset:
|
||||
title: 'Notification Setting'
|
||||
enable: 'Enable'
|
||||
type: 'Type'
|
||||
token: 'Token'
|
||||
chatid: 'Chat ID'
|
||||
|
||||
proxyset:
|
||||
title: 'Proxy Setting'
|
||||
enable: 'Enable'
|
||||
type: 'Proxy Type'
|
||||
host: 'Host'
|
||||
port: 'Port'
|
||||
username: 'Username'
|
||||
password: 'Password'
|
||||
|
||||
mediaplayerset:
|
||||
title: 'Media Player Setting'
|
||||
type: 'type'
|
||||
url: 'url'
|
||||
|
||||
cancel: 'Cancel'
|
||||
apply: 'Apply'
|
||||
|
||||
132
webui/src/locales/lang/zh-CN.json
Normal file
132
webui/src/locales/lang/zh-CN.json
Normal file
@@ -0,0 +1,132 @@
|
||||
{
|
||||
"login": {
|
||||
"title": "登录",
|
||||
"username": "用户名",
|
||||
"password": "密码",
|
||||
"loginbtn": "登录",
|
||||
"default": "默认账号密码 "
|
||||
},
|
||||
"sidebar": {
|
||||
"title": "菜单",
|
||||
"homepage": "主页",
|
||||
"player": "播放器",
|
||||
"log": "日志",
|
||||
"config": "设置",
|
||||
"logout": "退出",
|
||||
"calendar": "日历",
|
||||
"downloader": "下载器"
|
||||
},
|
||||
"topbar": {
|
||||
"start": "启动",
|
||||
"pause": "暂停",
|
||||
"restart": "重启",
|
||||
"shutdown": "关闭",
|
||||
"resetrule": "重置规则",
|
||||
"profile": {
|
||||
"title": "账户资料",
|
||||
"poptitle": "修改账户信息",
|
||||
"username": "用户名",
|
||||
"password": "密码",
|
||||
"updatebtn": "更新"
|
||||
},
|
||||
"add": {
|
||||
"title": "添加番剧",
|
||||
"rsslink": "RSS链接",
|
||||
"placeholder": "请输入RSS链接",
|
||||
"analyse": "分析"
|
||||
}
|
||||
},
|
||||
"homepage": {
|
||||
"title": "番剧列表",
|
||||
"rule": {
|
||||
"officaltitle": "官方名称",
|
||||
"year": "年份",
|
||||
"season": "季度",
|
||||
"offset": "偏移",
|
||||
"exclude": "排除",
|
||||
"enable": "启用",
|
||||
"disable": "禁用",
|
||||
"delete": "删除",
|
||||
"apply": "应用",
|
||||
"yesbtn": "是",
|
||||
"nobtn": "否",
|
||||
"enablehit": "确定要让规则生效吗?",
|
||||
"deletehit": "删除本地文件?",
|
||||
"enablerule": "启用规则",
|
||||
"editrule": "编辑规则"
|
||||
}
|
||||
},
|
||||
"player": {
|
||||
"title": "播放器",
|
||||
"hit": "请设置播放器地址"
|
||||
},
|
||||
"log": {
|
||||
"title": "日志",
|
||||
"reset": "重置",
|
||||
"copy": "复制",
|
||||
"contactinfo": "联系方式",
|
||||
"go": "访问",
|
||||
"join": "加入",
|
||||
"bugrepo": "Bug反馈"
|
||||
},
|
||||
"config": {
|
||||
"title": "系统设置",
|
||||
"normalset": {
|
||||
"title": "一般设置",
|
||||
"rssintvl": "RSS间隔",
|
||||
"renameintvl": "重命名间隔",
|
||||
"webport": "网页端口",
|
||||
"debug": "调试"
|
||||
},
|
||||
"parserset": {
|
||||
"title": "解析设置",
|
||||
"enable": "启用",
|
||||
"source": "数据源",
|
||||
"token": "Token",
|
||||
"url": "自定义网址",
|
||||
"language": "语言",
|
||||
"type": "解析类型",
|
||||
"exclude": "排除"
|
||||
},
|
||||
"downloaderset": {
|
||||
"title": "下载设置",
|
||||
"type": "下载器类型",
|
||||
"host": "下载器地址",
|
||||
"username": "用户名",
|
||||
"password": "密码",
|
||||
"path": "下载地址",
|
||||
"ssl": "SSL"
|
||||
},
|
||||
"manageset": {
|
||||
"title": "番剧管理设置",
|
||||
"enable": "启用",
|
||||
"method": "重命名方式",
|
||||
"eps": "EPS完成",
|
||||
"grouptag": "添加组标签",
|
||||
"deletebadtorr": "删除坏种"
|
||||
},
|
||||
"notificationset": {
|
||||
"title": "推送设置",
|
||||
"enable": "启用",
|
||||
"type": "类型",
|
||||
"token": "Token",
|
||||
"chatid": "Chat ID"
|
||||
},
|
||||
"proxyset": {
|
||||
"title": "代理设置",
|
||||
"enable": "启用",
|
||||
"type": "类型",
|
||||
"host": "地址",
|
||||
"port": "端口",
|
||||
"username": "用户名",
|
||||
"password": "密码"
|
||||
},
|
||||
"mediaplayerset": {
|
||||
"title": "播放器设置",
|
||||
"type": "类型",
|
||||
"url": "播放器地址"
|
||||
},
|
||||
"cancel": "取消",
|
||||
"apply": "应用"
|
||||
}
|
||||
}
|
||||
@@ -1,126 +0,0 @@
|
||||
login:
|
||||
title: '登录'
|
||||
username: '用户名'
|
||||
password: '密码'
|
||||
loginbtn: '登录'
|
||||
default: '默认账号密码 '
|
||||
|
||||
sidebar:
|
||||
title: '菜单'
|
||||
homepage: '主页'
|
||||
player: '播放器'
|
||||
log: '日志'
|
||||
config: '设置'
|
||||
logout: '退出'
|
||||
|
||||
topbar:
|
||||
start: '启动'
|
||||
pause: '暂停'
|
||||
restart: '重启'
|
||||
shutdown: '关闭'
|
||||
resetrule: '重置规则'
|
||||
|
||||
profile:
|
||||
title: '账户资料'
|
||||
poptitle: '修改账户信息'
|
||||
username: '用户名'
|
||||
password: '密码'
|
||||
updatebtn: '更新'
|
||||
|
||||
add:
|
||||
title: '添加番剧'
|
||||
rsslink: 'RSS链接'
|
||||
placeholder: '请输入RSS链接'
|
||||
analyse: '分析'
|
||||
|
||||
homepage:
|
||||
title: '番剧列表'
|
||||
rule:
|
||||
officaltitle: '官方名称'
|
||||
year: '年份'
|
||||
season: '季度'
|
||||
offset: '偏移'
|
||||
exclude: '排除'
|
||||
enable: '启用'
|
||||
disable: '禁用'
|
||||
delete: '删除'
|
||||
apply: '应用'
|
||||
yesbtn: '是'
|
||||
nobtn: '否'
|
||||
enablehit: '确定要让规则生效吗?'
|
||||
deletehit: '删除本地文件?'
|
||||
enablerule: '启用规则'
|
||||
editrule: '编辑规则'
|
||||
|
||||
player:
|
||||
title: '播放器'
|
||||
hit: '请设置播放器地址'
|
||||
|
||||
log:
|
||||
title: '日志'
|
||||
reset: '重置'
|
||||
copy: '复制'
|
||||
contactinfo: '联系方式'
|
||||
go: '访问'
|
||||
join: '加入'
|
||||
bugrepo: 'Bug反馈'
|
||||
|
||||
config:
|
||||
title: '系统设置'
|
||||
normalset:
|
||||
title: '一般设置'
|
||||
rssintvl: 'RSS间隔'
|
||||
renameintvl: '重命名间隔'
|
||||
webport: '网页端口'
|
||||
debug: '调试'
|
||||
|
||||
parserset:
|
||||
title: '解析设置'
|
||||
enable: '启用'
|
||||
source: '数据源'
|
||||
token: 'Token'
|
||||
url: '自定义网址'
|
||||
language: '语言'
|
||||
type: '解析类型'
|
||||
exclude: '排除'
|
||||
|
||||
downloaderset:
|
||||
title: '下载设置'
|
||||
type: '下载器类型'
|
||||
host: '下载器地址'
|
||||
username: '用户名'
|
||||
password: '密码'
|
||||
path: '下载地址'
|
||||
ssl: 'SSL'
|
||||
|
||||
manageset:
|
||||
title: '番剧管理设置'
|
||||
enable: '启用'
|
||||
method: '重命名方式'
|
||||
eps: 'EPS完成'
|
||||
grouptag: '添加组标签'
|
||||
deletebadtorr: '删除坏种'
|
||||
|
||||
notificationset:
|
||||
title: '推送设置'
|
||||
enable: '启用'
|
||||
type: '类型'
|
||||
token: 'Token'
|
||||
chatid: 'Chat ID'
|
||||
|
||||
proxyset:
|
||||
title: '代理设置'
|
||||
enable: '启用'
|
||||
type: '类型'
|
||||
host: '地址'
|
||||
port: '端口'
|
||||
username: '用户名'
|
||||
password: '密码'
|
||||
|
||||
mediaplayerset:
|
||||
title: '播放器设置'
|
||||
type: '类型'
|
||||
url: '播放器地址'
|
||||
|
||||
cancel: '取消'
|
||||
apply: '应用'
|
||||
@@ -13,12 +13,11 @@ definePage({
|
||||
<ab-sidebar />
|
||||
|
||||
<div layout-content>
|
||||
|
||||
<RouterView v-slot="{ Component }">
|
||||
<KeepAlive>
|
||||
<component :is="Component" />
|
||||
</KeepAlive>
|
||||
</RouterView>
|
||||
<RouterView v-slot="{ Component }">
|
||||
<KeepAlive>
|
||||
<component :is="Component" />
|
||||
</KeepAlive>
|
||||
</RouterView>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
@@ -105,7 +105,7 @@ definePage({
|
||||
:season="i.season"
|
||||
@click="() => open(i)"
|
||||
></ab-bangumi-card>
|
||||
|
||||
|
||||
<ab-edit-rule
|
||||
v-model:show="editRule.show"
|
||||
v-model:rule="editRule.item"
|
||||
|
||||
@@ -15,26 +15,28 @@ definePage({
|
||||
<div grid="~ cols-2" gap-20px mb-auto>
|
||||
<div space-y-20px>
|
||||
<config-normal></config-normal>
|
||||
|
||||
|
||||
<config-parser></config-parser>
|
||||
|
||||
|
||||
<config-download></config-download>
|
||||
|
||||
|
||||
<config-manage></config-manage>
|
||||
</div>
|
||||
|
||||
|
||||
<div space-y-20px>
|
||||
<config-notification></config-notification>
|
||||
|
||||
|
||||
<config-proxy></config-proxy>
|
||||
|
||||
|
||||
<config-player></config-player>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div fx-cer justify-end gap-8px mt-20px>
|
||||
<ab-button type="warn" @click="getConfig">{{$t('config.cancel')}}</ab-button>
|
||||
<ab-button @click="setConfig">{{$t('config.apply')}}</ab-button>
|
||||
<ab-button type="warn" @click="getConfig">{{
|
||||
$t('config.cancel')
|
||||
}}</ab-button>
|
||||
<ab-button @click="setConfig">{{ $t('config.apply') }}</ab-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -29,13 +29,15 @@ definePage({
|
||||
>
|
||||
<pre text-main>{{ log }}</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<div flex="~ justify-end" space-x-10px mt-12px>
|
||||
<ab-button type="warn" size="small" @click="reset">{{$t('log.reset')}}</ab-button>
|
||||
<ab-button size="small" @click="copy">{{$t('log.copy')}}</ab-button>
|
||||
<ab-button type="warn" size="small" @click="reset">{{
|
||||
$t('log.reset')
|
||||
}}</ab-button>
|
||||
<ab-button size="small" @click="copy">{{ $t('log.copy') }}</ab-button>
|
||||
</div>
|
||||
</ab-container>
|
||||
|
||||
|
||||
<div grow w-500px space-y-20px>
|
||||
<ab-container :title="$t('log.contactinfo')">
|
||||
<div space-y-12px>
|
||||
@@ -45,44 +47,44 @@ definePage({
|
||||
link="https://github.com/EstrellaXD/Auto_Bangumi"
|
||||
target="_blank"
|
||||
>
|
||||
{{$t('log.go')}}
|
||||
{{ $t('log.go') }}
|
||||
</ab-button>
|
||||
</ab-label>
|
||||
|
||||
|
||||
<ab-label label="WebUI Repo">
|
||||
<ab-button
|
||||
size="small"
|
||||
link="https://github.com/Rewrite0/Auto_Bangumi_WebUI"
|
||||
target="_blank"
|
||||
>
|
||||
{{$t('log.go')}}
|
||||
{{ $t('log.go') }}
|
||||
</ab-button>
|
||||
</ab-label>
|
||||
|
||||
|
||||
<div line></div>
|
||||
|
||||
|
||||
<ab-label label="Twitter">
|
||||
<ab-button
|
||||
size="small"
|
||||
link="https://twitter.com/Estrella_Pan"
|
||||
target="_blank"
|
||||
>
|
||||
{{$t('log.go')}}
|
||||
{{ $t('log.go') }}
|
||||
</ab-button>
|
||||
</ab-label>
|
||||
|
||||
|
||||
<ab-label label="Telegram Group">
|
||||
<ab-button
|
||||
size="small"
|
||||
link="https://t.me/autobangumi"
|
||||
target="_blank"
|
||||
>
|
||||
{{$t('log.join')}}
|
||||
{{ $t('log.join') }}
|
||||
</ab-button>
|
||||
</ab-label>
|
||||
</div>
|
||||
</ab-container>
|
||||
|
||||
|
||||
<ab-container :title="$t('log.bugrepo')">
|
||||
<div space-y-12px>
|
||||
<ab-button
|
||||
@@ -94,9 +96,9 @@ definePage({
|
||||
link="https://github.com/EstrellaXD/Auto_Bangumi/issues"
|
||||
>Github Issue</ab-button
|
||||
>
|
||||
|
||||
|
||||
<div line></div>
|
||||
|
||||
|
||||
<ab-button
|
||||
mx-auto
|
||||
text-16px
|
||||
|
||||
@@ -11,11 +11,11 @@ const { url } = storeToRefs(usePlayerStore());
|
||||
<div overflow-auto mt-12px flex-grow>
|
||||
<template v-if="url === ''">
|
||||
<div wh-full f-cer text-h1 text-primary>
|
||||
<RouterLink to="/config" hover:underline
|
||||
>{{ $t('player.hit')}}</RouterLink
|
||||
>
|
||||
<RouterLink to="/config" hover:underline>{{
|
||||
$t('player.hit')
|
||||
}}</RouterLink>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
<iframe
|
||||
v-else
|
||||
:src="url"
|
||||
|
||||
@@ -32,13 +32,15 @@ definePage({
|
||||
<div line></div>
|
||||
|
||||
<div flex="~ justify-end">
|
||||
<ab-button size="small" @click="login">{{$t('login.loginbtn')}}</ab-button>
|
||||
<ab-button size="small" @click="login">{{
|
||||
$t('login.loginbtn')
|
||||
}}</ab-button>
|
||||
</div>
|
||||
</div>
|
||||
</ab-container>
|
||||
|
||||
<div bg="#C7C4AB" text-white rounded-4px py-4px px-2em text-main>
|
||||
<div>{{$t('login.default')}}: admin adminadmin</div>
|
||||
<div>{{ $t('login.default') }}: admin adminadmin</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user