-
-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #734 from FineFindus/feat/translate-media-upstream
Allow translation of attachments, spoilers and polls
- Loading branch information
Showing
6 changed files
with
99 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 22 additions & 2 deletions
24
mastodon/src/main/java/org/joinmastodon/android/model/Translation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,30 @@ | ||
package org.joinmastodon.android.model; | ||
|
||
import org.joinmastodon.android.api.AllFieldsAreRequired; | ||
|
||
@AllFieldsAreRequired | ||
import org.joinmastodon.android.api.RequiredField; | ||
|
||
public class Translation extends BaseModel{ | ||
@RequiredField | ||
public String content; | ||
@RequiredField | ||
public String detectedSourceLanguage; | ||
@RequiredField | ||
public String provider; | ||
public String spoilerText; | ||
public MediaAttachment[] mediaAttachments; | ||
public PollTranslation poll; | ||
|
||
public static class MediaAttachment { | ||
public String id; | ||
public String description; | ||
} | ||
|
||
public static class PollTranslation { | ||
public String id; | ||
public PollOption[] options; | ||
} | ||
|
||
public static class PollOption { | ||
public String title; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters