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

Abierto
#1,327 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
android, kotlin

Línea de trabajo

El issue no menciona archivos ni tests del repositorio. Empieza por localizar la vista del artículo y el parser HTML existente de la app, y después revisa cómo se renderiza el contenido de los artículos y si la traducción con ML Kit es aceptable; se considera terminado cuando haya un flujo de traducción dentro de la app que preserve la estructura HTML y las etiquetas de imagen.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Kotlin
Estrellas
7.6k
Forks
345
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de ReadYouApp/ReadYou

Todos los issues de ReadYouApp/ReadYou

Issues similares

Más issues de Kotlin

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.