Update lang codes in a few extensions (#10562)

* Update WebtoonsTranslateGenerator.kt

* Update WebtoonsTranslateFactory.kt

* Update BatoToFactory.kt

* Update build.gradle

* Update MangaParkFactory.kt

* Update build.gradle

* Update WebtoonsTranslateFactory.kt

* Update WebtoonsTranslateGenerator.kt

* Update BatoToFactory.kt

* Update MangaParkFactory.kt

* Update BatoTo.kt

* Update MangaPark.kt

* Update BatoTo.kt

* Update MangaPark.kt

* Update ToomicsFactory.kt

* Update build.gradle

* Update NHentaiComFactory.kt

* Update NHentaiCom.kt

* Update build.gradle

* Update BatoToFactory.kt

* Update BatoTo.kt

* Update MangaPark.kt

* Update MangaParkFactory.kt
This commit is contained in:
jopejoe1 2022-01-24 10:43:20 +13:00 committed by GitHub
parent 818b9094fb
commit b6602ec955
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 43 additions and 20 deletions

View File

@ -41,10 +41,10 @@ class WebtoonsTranslateFactory : SourceFactory {
)
}
class WebtoonsTranslateEN : WebtoonsTranslate("Webtoons.com Translations", "https://translate.webtoons.com", "en", "ENG")
class WebtoonsTranslateZH_CMN : WebtoonsTranslate("Webtoons.com Translations", "https://translate.webtoons.com", "zh-hans", "CMN") {
class WebtoonsTranslateZH_CMN : WebtoonsTranslate("Webtoons.com Translations", "https://translate.webtoons.com", "zh-Hans", "CMN") {
override val id: Long = 5196522547754842244
}
class WebtoonsTranslateZH_CMY : WebtoonsTranslate("Webtoons.com Translations", "https://translate.webtoons.com", "zh-hant", "CMT") {
class WebtoonsTranslateZH_CMY : WebtoonsTranslate("Webtoons.com Translations", "https://translate.webtoons.com", "zh-Hant", "CMT") {
override val id: Long = 1016181401146312893
}
class WebtoonsTranslateTH : WebtoonsTranslate("Webtoons.com Translations", "https://translate.webtoons.com", "th", "THA")

View File

@ -11,7 +11,7 @@ class WebtoonsTranslateGenerator : ThemeSourceGenerator {
override val baseVersionCode: Int = 2
override val sources = listOf(
MultiLang("Webtoons.com Translations", "https://translate.webtoons.com", listOf("en", "zh-hans", "zh-hant", "th", "id", "fr", "vi", "ru", "ar", "fil", "de", "hi", "it", "ja", "pt-BR", "tr", "ms", "pl", "pt", "bg", "da", "nl", "ro", "mn", "el", "lt", "cs", "sv", "bn", "fa", "uk", "es"), className = "WebtoonsTranslateFactory", pkgName = "webtoonstranslate", overrideVersionCode = 1),
MultiLang("Webtoons.com Translations", "https://translate.webtoons.com", listOf("en", "zh-Hans", "zh-Hant", "th", "id", "fr", "vi", "ru", "ar", "fil", "de", "hi", "it", "ja", "pt-BR", "tr", "ms", "pl", "pt", "bg", "da", "nl", "ro", "mn", "el", "lt", "cs", "sv", "bn", "fa", "uk", "es"), className = "WebtoonsTranslateFactory", pkgName = "webtoonstranslate", overrideVersionCode = 2),
)
companion object {

View File

@ -6,7 +6,7 @@ ext {
extName = 'Bato.to'
pkgNameSuffix = 'all.batoto'
extClass = '.BatoToFactory'
extVersionCode = 20
extVersionCode = 21
isNsfw = true
}

View File

@ -44,7 +44,7 @@ import java.util.Locale
import java.util.concurrent.TimeUnit
open class BatoTo(
override val lang: String,
final override val lang: String,
private val siteLang: String
) : ConfigurableSource, ParsedHttpSource() {
@ -54,6 +54,12 @@ open class BatoTo(
override val name: String = "Bato.to"
override val baseUrl: String = getMirrorPref()!!
override val id: Long = when(lang){
"zh-Hans" -> 2818874445640189582
"zh-Hant" -> 38886079663327225
"ro-MD" -> 8871355786189601023
else -> super.id
}
override fun setupPreferenceScreen(screen: PreferenceScreen) {
val mirrorPref = ListPreference(screen.context).apply {

View File

@ -55,8 +55,8 @@ private val languages = listOf(
LanguageOption("km"),
LanguageOption("ca"),
LanguageOption("ceb"),
LanguageOption("zh-rHK", "zh_hk"),
LanguageOption("zh-rTW", "zh_tw"),
LanguageOption("zh-Hans", "zh_hk"),
LanguageOption("zh-Hant", "zh_tw"),
LanguageOption("hr"),
LanguageOption("en-US", "en_us"),
LanguageOption("eo"),
@ -85,7 +85,7 @@ private val languages = listOf(
LanguageOption("mt"),
LanguageOption("mi"),
LanguageOption("mr"),
LanguageOption("mo"),
LanguageOption("mo", "ro-MD"),
LanguageOption("mn"),
LanguageOption("ne"),
LanguageOption("no"),

View File

@ -6,7 +6,7 @@ ext {
extName = 'MangaPark v3'
pkgNameSuffix = 'all.mangapark'
extClass = '.MangaParkFactory'
extVersionCode = 13
extVersionCode = 14
isNsfw = true
}

View File

@ -33,7 +33,7 @@ import java.util.Locale
import java.util.concurrent.TimeUnit
open class MangaPark(
override val lang: String,
final override val lang: String,
private val siteLang: String
) : ParsedHttpSource() {
@ -42,6 +42,13 @@ open class MangaPark(
override val baseUrl: String = "https://v35.mangapark.net" // temporary url change to keep the ext working after update return to https://mangapark.net or https://v36.mangapark.net at later date
override val supportsLatest = true
override val id: Long = when(lang){
"zh-Hans" -> 6306867705763005424
"zh-Hant" -> 4563855043528673539
"ro-MD" -> 7298853649198357919
else -> super.id
}
private val json: Json by injectLazy()

View File

@ -54,8 +54,8 @@ private val languages = listOf(
LanguageOption("km"),
LanguageOption("ca"),
LanguageOption("ceb"),
LanguageOption("zh-rHK", "zh_hk"),
LanguageOption("zh-rTW", "zh_tw"),
LanguageOption("zh-Hans", "zh_hk"),
LanguageOption("zh-Hant", "zh_tw"),
LanguageOption("hr"),
LanguageOption("en-US", "en_us"),
LanguageOption("eo"),
@ -84,7 +84,7 @@ private val languages = listOf(
LanguageOption("mt"),
LanguageOption("mi"),
LanguageOption("mr"),
LanguageOption("mo"),
LanguageOption("mo", "ro-MD"),
LanguageOption("mn"),
LanguageOption("ne"),
LanguageOption("no"),

View File

@ -5,7 +5,7 @@ ext {
extName = 'nHentai.com (unoriginal)'
pkgNameSuffix = 'all.nhentaicom'
extClass = '.NHentaiComFactory'
extVersionCode = 2
extVersionCode = 3
isNsfw = true
}

View File

@ -30,6 +30,7 @@ class NHentaiCom(override val lang: String) : HttpSource() {
override val id = when (lang) {
"en" -> 5591830863732393712
"cs" -> 1144495813995437124
else -> super.id
}
@ -47,7 +48,7 @@ class NHentaiCom(override val lang: String) : HttpSource() {
"zh" -> "2"
"ja" -> "3"
"other" -> "4"
"cz" -> "5"
"cs" -> "5"
"ar" -> "6"
"sk" -> "7"
"eo" -> "8"

View File

@ -8,5 +8,5 @@ class NHentaiComFactory : SourceFactory {
}
private val languages = listOf(
"all", "en", "zh", "ja", "other", "eo", "cz", "ar", "sk"
"all", "en", "zh", "ja", "other", "eo", "cs", "ar", "sk"
)

View File

@ -5,7 +5,7 @@ ext {
extName = 'Toomics'
pkgNameSuffix = 'all.toomics'
extClass = '.ToomicsFactory'
extVersionCode = 6
extVersionCode = 7
}
apply from: "$rootDir/common.gradle"

View File

@ -20,9 +20,18 @@ class ToomicsFactory : SourceFactory {
}
class ToomicsEnglish : ToomicsGlobal("en", SimpleDateFormat("MMM dd, yyyy", Locale.ENGLISH))
class ToomicsSimplifiedChinese : ToomicsGlobal("sc", SimpleDateFormat("yyyy.MM.dd", Locale.SIMPLIFIED_CHINESE), "zh", "简体")
class ToomicsTraditionalChinese : ToomicsGlobal("tc", SimpleDateFormat("yyyy.MM.dd", Locale.TRADITIONAL_CHINESE), "zh", "繁體")
class ToomicsSpanishLA : ToomicsGlobal("mx", SimpleDateFormat("d MMM, yyyy", Locale("es", "419")), "es", "LA")
class ToomicsSimplifiedChinese : ToomicsGlobal("sc", SimpleDateFormat("yyyy.MM.dd", Locale.SIMPLIFIED_CHINESE), "zh-Hans") {
// Hardcode the id because the language wasn't specific.
override val id: Long = 2191753978421234924
}
class ToomicsTraditionalChinese : ToomicsGlobal("tc", SimpleDateFormat("yyyy.MM.dd", Locale.TRADITIONAL_CHINESE), "zh-Hant") {
// Hardcode the id because the language wasn't specific.
override val id: Long = 371640888113435809
}
class ToomicsSpanishLA : ToomicsGlobal("mx", SimpleDateFormat("d MMM, yyyy", Locale("es", "419")), "es-419") {
// Hardcode the id because the language wasn't specific.
override val id: Long = 7362369816539610504
}
class ToomicsSpanish : ToomicsGlobal("es", SimpleDateFormat("d MMM, yyyy", Locale("es", "419")), "es")
class ToomicsItalian : ToomicsGlobal("it", SimpleDateFormat("d MMM, yyyy", Locale.ITALIAN))
class ToomicsGerman : ToomicsGlobal("de", SimpleDateFormat("d. MMM yyyy", Locale.GERMAN))