feat: add danmuku plugin documentation and i18n setup guide

- Created a new documentation file for the danmuku plugin with code examples.
- Added comprehensive i18n setup instructions, including default language settings, language imports, and examples for adding and modifying languages.
- Updated the structure and content of the i18n documentation to enhance clarity and usability.
This commit is contained in:
Harvey Zack committed 2025-09-06 13:48:25 +08:00
1 parent 18475f08fd
commit 5b1cebb334
82 files changed
+268 -174

No files matched your search

+1 -1
View File
@@ -189,4 +189,4 @@ export default class Artplayer extends Player {
plugin: (this: Artplayer, art: Artplayer) => unknown | Promise<unknown>,
) => Promise<Artplayer['plugins']> | Artplayer['plugins']
} & Record<string, unknown>
}
}
+16 -16
View File
@@ -1,18 +1,18 @@
type I18nKeys
= | 'en'
| 'zh-cn'
| 'zh-tw'
| 'pl'
| 'cs'
| 'es'
| 'fa'
| 'fr'
| 'id'
| 'ru'
| 'tr'
| 'ar'
| 'vi'
| (string & Record<never, never>)
| 'zh-cn'
| 'zh-tw'
| 'pl'
| 'cs'
| 'es'
| 'fa'
| 'fr'
| 'id'
| 'ru'
| 'tr'
| 'ar'
| 'vi'
| (string & Record<never, never>)
interface I18nValue {
'Video Info': string
@@ -55,8 +55,8 @@ interface I18nValue {
export type I18n = Partial<Record<I18nKeys, Partial<I18nValue>>>
declare module "artplayer/i18n/*" {
declare module 'artplayer/i18n/*' {
const lang: Partial<I18nValue>
// @ts-ignore
// @ts-expect-error TS2666
export default lang
}
}