Machine translation of posts (#4307)
This commit is contained in:
parent
80982d061e
commit
fbb22799dc
38 changed files with 1912 additions and 180 deletions
|
|
@ -49,8 +49,11 @@ data class Status(
|
|||
val pinned: Boolean?,
|
||||
val muted: Boolean?,
|
||||
val poll: Poll?,
|
||||
/** Preview card for links included within status content. */
|
||||
val card: Card?,
|
||||
/** ISO 639 language code for this status. */
|
||||
val language: String?,
|
||||
/** If the current token has an authorized user: The filter and keywords that matched this status. */
|
||||
val filtered: List<FilterResult>?
|
||||
) {
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
package com.keylesspalace.tusky.entity
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
data class MediaTranslation(
|
||||
val id: String,
|
||||
val description: String,
|
||||
)
|
||||
|
||||
/**
|
||||
* Represents the result of machine translating some status content.
|
||||
*
|
||||
* See [doc](https://docs.joinmastodon.org/entities/Translation/).
|
||||
*/
|
||||
data class Translation(
|
||||
val content: String,
|
||||
@SerializedName("spoiler_warning")
|
||||
val spoilerWarning: String?,
|
||||
val poll: List<String>?,
|
||||
@SerializedName("media_attachments")
|
||||
val mediaAttachments: List<MediaTranslation>,
|
||||
@SerializedName("detected_source_language")
|
||||
val detectedSourceLanguage: String,
|
||||
val provider: String,
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue