Skip to content

feat: added on-device local as an option for translation#1143

Merged
spacecowboy merged 5 commits into
spacecowboy:masterfrom
JaredTweed:master
May 19, 2026
Merged

feat: added on-device local as an option for translation#1143
spacecowboy merged 5 commits into
spacecowboy:masterfrom
JaredTweed:master

Conversation

@JaredTweed

Copy link
Copy Markdown
Contributor

What does this change?

Added local translation as a provider option. I tested it, and it works. This enables people to translate articles without an API key.

Checklist

  • Ran ./gradlew ktlintFormat and committed the result
  • If the Room schema changed: added a MIGRATION_N_N+1 in AppDatabase.kt
  • If the Room schema changed: added a migration test in app/src/androidTest/.../db/room/

Screenshots (if UI change)

Screenshot_20260518-173356

@spacecowboy

Copy link
Copy Markdown
Owner

Looks good. What is bergamot (besides a citrus fruit)?

@JaredTweed

Copy link
Copy Markdown
Contributor Author

@spacecowboy Sorry, that was the translator I tried to use originally, but I switched it to the on-device version (and I forgot to clean the remnants of that until just now). The PR is now cleaned and there are no unnecessary files.

@spacecowboy spacecowboy changed the title Added local translation as a provider option. feat: added on-device local as an option for translation May 19, 2026
@spacecowboy

Copy link
Copy Markdown
Owner

thanks!

@spacecowboy spacecowboy merged commit 4464170 into spacecowboy:master May 19, 2026
12 checks passed
@Digitalpeer1

Copy link
Copy Markdown

Thanks So much looking forward to using this!

@Digitalpeer1

Copy link
Copy Markdown

Just want to preface this by saying I have no software experience please let me know if anything im saying is stupid or to hard to impliment I am thankfull that @JaredTweed has done this!

@spacecowboy Sorry, that was the translator I tried to use originally, but I switched it to the on-device version (and I forgot to clean the remnants of that until just now). The PR is now cleaned and there are no unnecessary files.

Was so exited to try this I compiled from the Master branch but realised that because Im on Graphine (Im assuming that this uses the Pixel OS proprietary google translate api built into pixels) rather that Bergamot I get the "Local translation is not available on this device" error. found this article on how Firefox does this (this is my only refrence for how this is done) and this quote stands out for how Im assuming this might not work on Feeder

"Why can't I access translations on my Android device?

Translation is currently only supported on Android devices that are based on the aarch64 architecture. The reason behind this requirement is that Firefox needs to be able to run WebAssembly to complete the translation.

While we don’t have a comprehensive list of all the Android devices that don’t support translation, in case your device is one of them, you should still see if support is available by visiting WebAssembly and checking if "Fixed Width SIMD" or "Relaxed SIMD" are supported by your Firefox version.

Translation was released in Firefox 129 via a Nimbus experiment, but it runs via the Fixed-Width SIMD status by default with the release of Firefox 130."

Here are my logs if helpful
FeederD log 75c7e5977adf.txt

@JaredTweed

Copy link
Copy Markdown
Contributor Author

@Digitalpeer1 ah shoot! Sorry about that. I am a big fan of graphene OS, and I will see if I can get that working for you. I originally planned to do it that way as you suggested, but it is definitely a larger project than using the built-in API from Google. I built this using a Pixel 8 with the Pixel OS so I didn't even consider that issue.

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.

3 participants