main.phraseapp.internal.xml.Models.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-client Show documentation
Show all versions of gradle-client Show documentation
JVM client to interact with Phrase via its API.
The newest version!
package phraseapp.internal.xml
interface Translation {
fun accept(visitor: Visitor)
}
interface StringsTranslationNode: Translation {
val key: String
val comment: CommentTranslation
val translatable: Boolean
}
data class Resource(val strings: List) : Translation {
override fun accept(visitor: Visitor) {
visitor.visit(this)
}
}
data class StringTranslation(
override val key: String,
val value: String,
override val comment: CommentTranslation = CommentTranslation(""),
override val translatable: Boolean = true
) : StringsTranslationNode {
override fun accept(visitor: Visitor) {
visitor.visit(this)
}
}
data class StringsArrayTranslation(
override val key: String,
val values: List,
override val comment: CommentTranslation = CommentTranslation(""),
override val translatable: Boolean = true
) : StringsTranslationNode {
override fun accept(visitor: Visitor) {
visitor.visit(this)
}
}
data class PluralsTranslation(
override val key: String,
val plurals: List,
override val comment: CommentTranslation = CommentTranslation(""),
override val translatable: Boolean = true
) : StringsTranslationNode {
override fun accept(visitor: Visitor) {
visitor.visit(this)
}
}
data class CommentTranslation(val text: String) : Translation {
override fun accept(visitor: Visitor) {
visitor.visit(this)
}
}