Fix wrong language in originalLanguage tag. (#9600)
This commit is contained in:
parent
b9b91cf35a
commit
31e563c9ab
|
@ -6,7 +6,7 @@ ext {
|
||||||
extName = 'MangaDex'
|
extName = 'MangaDex'
|
||||||
pkgNameSuffix = 'all.mangadex'
|
pkgNameSuffix = 'all.mangadex'
|
||||||
extClass = '.MangaDexFactory'
|
extClass = '.MangaDexFactory'
|
||||||
extVersionCode = 140
|
extVersionCode = 141
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -183,8 +183,8 @@ class MangaDexHelper() {
|
||||||
val altTitle = it.asMdMap()
|
val altTitle = it.asMdMap()
|
||||||
altTitle[lang] ?: altTitle["en"] != null
|
altTitle[lang] ?: altTitle["en"] != null
|
||||||
}?.asMdMap()?.values?.singleOrNull()
|
}?.asMdMap()?.values?.singleOrNull()
|
||||||
?: titleMap["ja"] // romaji titles are sometimes ja (and are not altTitles)
|
?: titleMap["ja"] // romaji titles are sometimes ja (and are not altTitles)
|
||||||
?: titleMap.values.firstOrNull() // use literally anything from title as a last resort
|
?: titleMap.values.firstOrNull() // use literally anything from title as a last resort
|
||||||
title = cleanString(dirtyTitle ?: "")
|
title = cleanString(dirtyTitle ?: "")
|
||||||
|
|
||||||
coverFileName?.let {
|
coverFileName?.let {
|
||||||
|
@ -213,10 +213,14 @@ class MangaDexHelper() {
|
||||||
"Content rating: " + tempContentRating.capitalize(Locale.US)
|
"Content rating: " + tempContentRating.capitalize(Locale.US)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val dexLocale = Locale.forLanguageTag(lang)
|
||||||
|
|
||||||
val nonGenres = listOf(
|
val nonGenres = listOf(
|
||||||
(attr.publicationDemographic ?: "").capitalize(Locale.US),
|
(attr.publicationDemographic ?: "").capitalize(Locale.US),
|
||||||
contentRating,
|
contentRating,
|
||||||
Locale(attr.originalLanguage ?: "").displayLanguage
|
Locale(attr.originalLanguage ?: "")
|
||||||
|
.getDisplayLanguage(dexLocale)
|
||||||
|
.capitalize(dexLocale)
|
||||||
)
|
)
|
||||||
|
|
||||||
val authors = mangaDataDto.relationships.filter { relationshipDto ->
|
val authors = mangaDataDto.relationships.filter { relationshipDto ->
|
||||||
|
|
Loading…
Reference in New Issue