Machine translation of posts (#4307)

This commit is contained in:
Willow 2024-03-09 16:12:18 +01:00 committed by GitHub
commit fbb22799dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 1912 additions and 180 deletions

View file

@ -44,13 +44,14 @@ import java.io.File;
},
// Note: Starting with version 54, database versions in Tusky are always even.
// This is to reserve odd version numbers for use by forks.
version = 56,
version = 58,
autoMigrations = {
@AutoMigration(from = 48, to = 49),
@AutoMigration(from = 49, to = 50, spec = AppDatabase.MIGRATION_49_50.class),
@AutoMigration(from = 50, to = 51),
@AutoMigration(from = 51, to = 52),
@AutoMigration(from = 53, to = 54) // hasDirectMessageBadge in AccountEntity
@AutoMigration(from = 53, to = 54), // hasDirectMessageBadge in AccountEntity
@AutoMigration(from = 56, to = 58) // translationEnabled in InstanceEntity/InstanceInfoEntity
}
)
public abstract class AppDatabase extends RoomDatabase {

View file

@ -38,7 +38,8 @@ data class InstanceEntity(
val maxMediaAttachments: Int?,
val maxFields: Int?,
val maxFieldNameLength: Int?,
val maxFieldValueLength: Int?
val maxFieldValueLength: Int?,
val translationEnabled: Boolean?,
)
@TypeConverters(Converters::class)
@ -62,5 +63,6 @@ data class InstanceInfoEntity(
val maxMediaAttachments: Int?,
val maxFields: Int?,
val maxFieldNameLength: Int?,
val maxFieldValueLength: Int?
val maxFieldValueLength: Int?,
val translationEnabled: Boolean?,
)