commonMain.com.bselzer.gw2.v2.intl.translation.WvwRankTranslator.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of v2-intl-jvm Show documentation
Show all versions of v2-intl-jvm Show documentation
Internalization support by mapping translations from Guild Wars 2 API models.
package com.bselzer.gw2.v2.intl.translation
import com.bselzer.gw2.v2.intl.model.Translation
import com.bselzer.gw2.v2.model.wvw.rank.WvwRank
import com.bselzer.ktx.function.collection.addTo
class WvwRankTranslator : Translator {
override fun texts(model: WvwRank): List = listOf(model.title)
override fun translations(default: WvwRank, translated: WvwRank, language: String) = buildList {
Translation(
default = default.title,
translated = translated.title,
language = language
).addTo(this)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy