Magical Translators: add Spanish language (#10800)
This commit is contained in:
parent
3b3bd91481
commit
f47efdf9ef
|
@ -8,6 +8,7 @@ import okhttp3.Response
|
|||
class MagicalTranslatorsFactory : SourceFactory {
|
||||
override fun createSources() = listOf(
|
||||
MagicalTranslatorsEN(),
|
||||
MagicalTranslatorsES(),
|
||||
MagicalTranslatorsPL(),
|
||||
)
|
||||
}
|
||||
|
@ -35,7 +36,13 @@ abstract class MagicalTranslatorsCommon(lang: String) :
|
|||
|
||||
class MagicalTranslatorsEN : MagicalTranslatorsCommon("en") {
|
||||
override fun filterMangasPage(mangasPage: MangasPage): MangasPage = mangasPage.copy(
|
||||
mangas = mangasPage.mangas.filterNot { it.url.endsWith("-PL") }
|
||||
mangas = mangasPage.mangas.filterNot { it.url.endsWith("-ES") || it.url.endsWith("-PL") }
|
||||
)
|
||||
}
|
||||
|
||||
class MagicalTranslatorsES : MagicalTranslatorsCommon("es") {
|
||||
override fun filterMangasPage(mangasPage: MangasPage): MangasPage = mangasPage.copy(
|
||||
mangas = mangasPage.mangas.filter { it.url.endsWith("-ES") }
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,8 @@ class GuyaGenerator : ThemeSourceGenerator {
|
|||
SingleLang("Guya", "https://guya.moe", "en", overrideVersionCode = 18),
|
||||
SingleLang("Danke fürs Lesen", "https://danke.moe", "en", className = "DankeFursLesen"),
|
||||
SingleLang("Hachirumi", "https://hachirumi.com", "en", isNsfw = true),
|
||||
MultiLang("Magical Translators", "https://mahoushoujobu.com", listOf("en", "pl")),
|
||||
MultiLang("Magical Translators", "https://mahoushoujobu.com", listOf("en", "es", "pl"),
|
||||
overrideVersionCode = 1),
|
||||
)
|
||||
companion object {
|
||||
@JvmStatic
|
||||
|
|
Loading…
Reference in New Issue