mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Change i18n to define api
This commit is contained in:
parent
2cbebd7d95
commit
cf9ac6f849
@ -1,9 +1,13 @@
|
||||
import { defaultLanguageCode, languageCodeToName } from '@/core/utils/i18n'
|
||||
import { ComponentMetadata, componentsTags } from '../types'
|
||||
import { translateProviderNames, translateProviders } from './machine-translator/translators'
|
||||
import { defineComponentMetadata } from '@/components/define'
|
||||
import { componentsTags } from '../types'
|
||||
import {
|
||||
translateProviderNames,
|
||||
translateProviders,
|
||||
} from './machine-translator/translators'
|
||||
import { startTranslate } from './dom-translator'
|
||||
|
||||
export const component: ComponentMetadata = {
|
||||
export const component = defineComponentMetadata({
|
||||
name: 'i18n',
|
||||
displayName: '多语言',
|
||||
configurable: false,
|
||||
@ -14,7 +18,8 @@ export const component: ComponentMetadata = {
|
||||
componentsTags.general,
|
||||
],
|
||||
description: {
|
||||
'zh-CN': '安装其他语言包可以更换界面语言, 机器翻译选择可以设定其他一些功能如`动态翻译`, `评论翻译`使用的翻译器. 机器翻译的选择不影响界面语言.',
|
||||
'zh-CN':
|
||||
'安装其他语言包可以更换界面语言, 机器翻译选择可以设定其他一些功能如`动态翻译`, `评论翻译`使用的翻译器. 机器翻译的选择不影响界面语言.',
|
||||
},
|
||||
options: {
|
||||
language: {
|
||||
@ -30,4 +35,4 @@ export const component: ComponentMetadata = {
|
||||
},
|
||||
// 相关功能好像全挂了, 先隐藏了
|
||||
hidden: true,
|
||||
}
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user