[Feature Proposal]: In-App Article Translation (On-Device)

Aperta
#1,327 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
android, kotlin

Direzione di ricerca

L'issue non indica file o test del repository. Inizia individuando la vista dell'articolo e il parser HTML già presente nell'app, quindi esamina come viene eseguito il rendering del contenuto degli articoli e se la traduzione con ML Kit è accettabile; il lavoro è completato quando è disponibile un flusso di traduzione in-app che preserva la struttura HTML e i tag delle immagini.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement untriaged
Checklist
  • I've already searched in existing issues and haven't found a similar feature request.
Which category best fits this feature request?

Integration with other apps

Is your feature request related to a problem? Please describe.

Many users subscribe to international RSS feeds but often encounter articles written in languages they don't fully understand. Currently, users have to leave the app and copy-paste the text into an external translation app or browser, which breaks the seamless reading experience.

Describe the solution you'd like

Technical Implementation Thoughts
Since RSS content is rendered in HTML, passing raw strings to ML Kit would break the tags (e.g., <p>, <a>, <img>).
My proposed workflow:

  1. Add a "Translate" button/icon in the article view's bottom or top app bar.
  2. When triggered, parse the article's HTML (using Jsoup or the app's existing parser).
  3. Extract only the text nodes, pass them to ML Kit.
  4. Reconstruct the translated text nodes back into the DOM without altering the original HTML structure and image tags.
  5. Re-render the translated HTML.

Questions for Maintainers
Before I start working on this and open a Pull Request, I'd love to hear your thoughts:

  1. Are you open to adding com.google.mlkit:translate as a dependency?
  2. Where would you prefer the "Translate" button to be placed in the UI (e.g., article overflow menu, top bar)?
  3. Any specific architectural guidelines I should follow for this implementation?

Looking forward to contributing!

Related links

No response

Lingua principale
Kotlin
Stelle
7.6k
Fork
347
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ReadYouApp/ReadYou

Tutte le issue di ReadYouApp/ReadYou

Issue simili

Altre issue su Kotlin

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.