feat: add danmuku plugin documentation and i18n setup guide

- Created a new documentation file for the danmuku plugin with code examples.
- Added comprehensive i18n (internationalization) setup instructions, including default language settings, language imports, and examples for adding and modifying languages.
- Updated the structure of the i18n documentation for better clarity and usability.
This commit is contained in:
Harvey Zack committed 2025-09-06 12:38:24 +08:00
1 parent 736a6c1973
commit 811d83f463
51 files changed
+93 -111

No files matched your search

+18 -37
View File
@@ -709,20 +709,20 @@ export interface Icons {
}
type I18nKeys
= | 'en'
| 'zh-cn'
| 'zh-tw'
| 'pl'
| 'cs'
| 'es'
| 'fa'
| 'fr'
| 'id'
| 'ru'
| 'tr'
| 'ar'
| 'vi'
| (string & Record<never, never>)
= | 'en'
| 'zh-cn'
| 'zh-tw'
| 'pl'
| 'cs'
| 'es'
| 'fa'
| 'fr'
| 'id'
| 'ru'
| 'tr'
| 'ar'
| 'vi'
| (string & Record<never, never>)
interface I18nValue {
'Video Info': string
@@ -765,6 +765,10 @@ interface I18nValue {
export type I18n = Partial<Record<I18nKeys, Partial<I18nValue>>>
declare module "artplayer/i18n/*" {
const lang: Partial<I18nValue>
export default lang
}
@@ -1142,19 +1146,6 @@ export type {
export default class Artplayer extends Player {
constructor(option: Option, readyCallback?: (this: Artplayer, art: Artplayer) => unknown)
get Config(): Config
get Events(): Events
get Utils(): Utils
get Player(): Player
get Option(): Option
get Subtitle(): Subtitle
get Icons(): Icons
get Template(): Template
get I18n(): I18n
get Setting(): Setting
get SettingOption(): SettingOption
get Component(): Component
static readonly instances: Artplayer[]
static readonly version: string
static readonly env: string
@@ -1318,15 +1309,5 @@ export default class Artplayer extends Player {
) => Promise<Artplayer['plugins']> | Artplayer['plugins']
} & Record<string, unknown>
}
declare module "artplayer/i18n/*" {
const lang: Partial<I18n>;
export default lang;
}
declare module "artplayer/dist/i18n/*" {
const lang: Partial<I18n>;
export default lang;
}
export = Artplayer;
export as namespace Artplayer;