Skip to content

Conversation

nikclayton
Copy link
Contributor

On the Play Store variant allow the user to choose how translation should be performed:

  • Server only (current behaviour)
  • Server first, then on-device if server fails (new default)
  • On-device only

To do this:

Put translation functionality behind a new TranslationService interface, with different implementations for the google and non-google builds. The non-google implementation has the current behaviour, the google build depends on MlKit, and uses it to perform the translation.

On all builds show a new preference that allows the user to choose the translation backend to use. On non-google builds this only allows the user to choose "Server only". On google builds the user can choose from the other two options.

On the google build show additional preferences that allow the user to decide whether language packs can be downloaded using mobile data, and manage the available language packs; downloading new ones or deleting existing ones.

Provide TranslationModelManagerFragment to provide the UI that allows the the user to manage the language packs.

If the user changes their preferred language their translation backend preference is reset to "Server only" if MlKit cannot translate to their language.

On-device translation allows direct messages to be translated, which is not possible with server-side translation. Remove the code that special-cased direct message display and allow translation. As a side effect the full range of status menu options (e.g., downloading attachments) are now available on direct messages.

On the Play Store variant allow the user to choose how translation should
be performed:

- Server only (current behaviour)
- Server first, then on-device if server fails (new default)
- On-device only

To do this:

Put translation functionality behind a new `TranslationService` interface,
with different implementations for the `google` and non-google builds. The
non-google implementation has the current behaviour, the `google` build
depends on MlKit, and uses it to perform the translation.

On all builds show a new preference that allows the user to choose the
translation backend to use. On non-google builds this only allows the
user to choose "Server only". On `google` builds the user can choose from
the other two options.

On the `google` build show additional preferences that allow the user
to decide whether language packs can be downloaded using mobile data, and
manage the available language packs; downloading new ones or deleting
existing ones.

Provide `TranslationModelManagerFragment` to provide the UI that allows
the the user to manage the language packs.

If the user changes their preferred language their translation backend
preference is reset to "Server only" if MlKit cannot translate to their
language.

On-device translation allows direct messages to be translated, which is
not possible with server-side translation. Remove the code that
special-cased direct message display and allow translation. As a side
effect the full range of status menu options (e.g., downloading attachments)
are now available on direct messages.
@nikclayton nikclayton merged commit b48fbca into pachli:main Aug 18, 2025
27 checks passed
@nikclayton nikclayton deleted the translate-mlkit branch August 24, 2025 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant