Skip to content

translation feature added#1238

Open
temp94416 wants to merge 1 commit intoReadYouApp:mainfrom
temp94416:feature/feed_translate
Open

translation feature added#1238
temp94416 wants to merge 1 commit intoReadYouApp:mainfrom
temp94416:feature/feed_translate

Conversation

@temp94416
Copy link

Translation Feature: On-Device & Offline Support

I've added a new translation feature to the app that works entirely on-device using ML Kit. This allows users to translate articles without sending data to any external servers, maintaining privacy and enabling offline use once the language models are downloaded.

Key Changes

  • On-Device Translation: Implemented using ML Kit. The app detects the source language and translates it to the user's preferred target language (It's still a bit bugy, but it's fixable)
  • UI Integration: Added a "Translate" button to the reader view. It's designed to be unobtrusive and easy to toggle.
  • Seamless Reading: The translation state persists when switching between the RSS summary (Description) and the full article content. If you're reading a translated summary and switch to the full article, it automatically translates the new content so you don't lose your place.
  • Title Translation: Added an option in settings to translate article titles as well, which is useful when browsing foreign feeds.
  • Offline Support: The app manages language model downloads (about 30MB each). Users are prompted to download a model if it's missing.
  • No Flicker: Spent time optimizing the view updates so the screen doesn't flicker when switching between languages.

Settings

Added a new "Translation" section in settings where users can:

  • Select their target language.
  • Toggle title translation.
  • Choose to download models only over Wi-Fi.
  • Manage downloaded models.

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