-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improving language support for medias #115
Comments
|
When fetching MANGAS :
Manga language can be inferred from website language tag, providing it is UNIQUE and not "Multilingual". Plugins should then have only one language tag : its either "one language" or "multilingual" tag. Manga constructor should be affected.
when fetching CHAPTERS:
|
There are special cases where external elements (sessions tokens, cookies, account parameters) are affecting content's language.
Such plugins may have language settings (to exclude languages) , custom initialization , a way to switch between languages if possible (for requests). As for tags, website plugin should have Multilingual tag. Its possible that website use different ID for the same manga in different language, making it two mangas. If its the contrary we should make sure manga id is unique, maybe by adding langage code. |
Sheep talked about an interesting case : suppose a website add a langage for a manga (not in another manga entry).
|
As of now the language and translation group (if present) must be part of the title. In addition the const manga = new Manga(plugin, ...);
manga.Tags.push(Tags.Language.English);
manga.Tags.push(Tags.Language.French);
const chapter1 = new Chapter(manga, ...);
chapter1.Tags.push(Tags.Language.English);
const chapter2 = new Chapter(manga, ...);
chapter2.Tags.push(Tags.Language.French);
const chapter3 = new Chapter(manga, ...);
chapter3.Tags.push(...manga.Tags.filter(tag => tag.Category === R.Tags_Language)); Some of the use-cases should already be covered with this existing functionality. |
Its good to add language tags to mangas but for now they are not saved, meaning its lost after program is closed. |
related #1034 |
Some random thoughts on how we could have better language support for medias.
Set a default language for a website plugin . Deduced from website unique language tag or manually?
By default children inherit the language property from their parent (no need to modify already done plugins). May add a default arguments in constructors?
What about Extractors? For now they return only ID and / or title. They should return language too. I think about making them return JSON array
{ id : 1234, title : One Piece, language : en_US }
instead of
{ 1234, "One Piece", en_US }
for clarity. This could help avoid errors because i think further. We may have to extract other things in the future and messing with values order will have disastrous effects.
This could event help in other cases : when you have to return a custom ID in copy/paste decorators, you are forced to rewrite FetchManga to match the rest of the code (think "API"). If extractor value got "id", use it instead of default (pathname or pathname+search according to arguments)
This way is more flexible as we can further expand it with stuff for animes : { audio : jp_JP, subtitles : [])
TLDR : Extractors revamping.
Now there are questions :
What to do with multilingual tag?
Language normalization : website use custom codes or values. Exactly what are we using, when , what to store,, how to we translate ? dictionary? where to put it? and many other questions
UI and settings : Having setting by default for subtitles and audio or per plugin?
Dont really have ideas here, i need to think further.
The text was updated successfully, but these errors were encountered: