Translate some missing strings on MangaDex (#16841)
* Translate some missing strings on MangaDex. * Use bullet points in the list.
This commit is contained in:
parent
c45a9a0daa
commit
c0e01e8dac
|
@ -6,7 +6,7 @@ ext {
|
||||||
extName = 'MangaDex'
|
extName = 'MangaDex'
|
||||||
pkgNameSuffix = 'all.mangadex'
|
pkgNameSuffix = 'all.mangadex'
|
||||||
extClass = '.MangaDexFactory'
|
extClass = '.MangaDexFactory'
|
||||||
extVersionCode = 180
|
extVersionCode = 181
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -335,14 +335,18 @@ class MangaDexHelper(lang: String) {
|
||||||
|
|
||||||
val genreList = MDConstants.tagGroupsOrder.flatMap { genresMap[it].orEmpty() } + nonGenres
|
val genreList = MDConstants.tagGroupsOrder.flatMap { genresMap[it].orEmpty() } + nonGenres
|
||||||
|
|
||||||
var desc = (attr.description[lang] ?: attr.description["en"] ?: "").removeEntitiesAndMarkdown()
|
var desc = (attr.description[lang] ?: attr.description["en"])?.removeEntitiesAndMarkdown() ?: ""
|
||||||
|
|
||||||
if (altTitlesInDesc) {
|
if (altTitlesInDesc) {
|
||||||
val romanizedOriginalLang = MDConstants.romanizedLangCodes[attr.originalLanguage] ?: ""
|
val romanizedOriginalLang = MDConstants.romanizedLangCodes[attr.originalLanguage] ?: ""
|
||||||
val altTitles = attr.altTitles.filter { it.containsKey(lang) || it.containsKey(romanizedOriginalLang) }
|
val altTitles = attr.altTitles
|
||||||
|
.filter { it.containsKey(lang) || it.containsKey(romanizedOriginalLang) }
|
||||||
.mapNotNull { it.values.singleOrNull() }
|
.mapNotNull { it.values.singleOrNull() }
|
||||||
|
.filter(String::isNotEmpty)
|
||||||
|
|
||||||
if (altTitles.isNotEmpty()) {
|
if (altTitles.isNotEmpty()) {
|
||||||
val altTitlesDesc = intl.altTitleText + altTitles.joinToString("\n", "\n")
|
val altTitlesDesc = altTitles
|
||||||
|
.joinToString("\n", "${intl.altTitleText}\n") { "• $it" }
|
||||||
desc += (if (desc.isNullOrBlank()) "" else "\n\n") + altTitlesDesc.removeEntitiesAndMarkdown()
|
desc += (if (desc.isNullOrBlank()) "" else "\n\n") + altTitlesDesc.removeEntitiesAndMarkdown()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -268,14 +268,14 @@ class MangaDexIntl(lang: String) {
|
||||||
}
|
}
|
||||||
|
|
||||||
val altTitlesInDesc: String = when (availableLang) {
|
val altTitlesInDesc: String = when (availableLang) {
|
||||||
// TODO add other languages
|
BRAZILIAN_PORTUGUESE, PORTUGUESE -> "Títulos alternativos na descrição"
|
||||||
else -> "Alternative titles in description"
|
else -> "Alternative titles in description"
|
||||||
}
|
}
|
||||||
|
|
||||||
val altTitlesInDescSummary: String = when (availableLang) {
|
val altTitlesInDescSummary: String = when (availableLang) {
|
||||||
// TODO add other languages
|
BRAZILIAN_PORTUGUESE, PORTUGUESE ->
|
||||||
else ->
|
"Inclui os títulos alternativos das séries no final de cada descrição"
|
||||||
"Include a manga's alternative titles at the end of its description"
|
else -> "Include a manga's alternative titles at the end of its description"
|
||||||
}
|
}
|
||||||
|
|
||||||
val tryUsingFirstVolumeCover: String = when (availableLang) {
|
val tryUsingFirstVolumeCover: String = when (availableLang) {
|
||||||
|
@ -1020,8 +1020,8 @@ class MangaDexIntl(lang: String) {
|
||||||
}
|
}
|
||||||
|
|
||||||
val altTitleText: String = when (availableLang) {
|
val altTitleText: String = when (availableLang) {
|
||||||
// TODO fill in other languages
|
BRAZILIAN_PORTUGUESE, PORTUGUESE -> "Títulos alternativos:"
|
||||||
else -> "Alternative Titles:"
|
else -> "Alternative titles:"
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
Loading…
Reference in New Issue