mint-check-translations emits parsing errors for lone '%' strings and provides no success feedback

Abierto
#28 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
python

Línea de trabajo

Reproduce el problema ejecutando mint-check-translations contra un archivo .po de Hindi que contenga msgid "%" y msgstr "%"; después, sigue la salida del analizador y el comportamiento al finalizar. Comprueba cómo se informa de una validación exitosa en el terminal y en la GUI. Se considera terminado cuando las entradas que contienen únicamente un signo de porcentaje no producen errores de análisis y una ejecución exitosa proporciona información explícita cuando no se encuentran problemas.

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

Descripción

While validating Hindi translations with mint-check-translations, I noticed that translation entries consisting solely of a percent sign (%) trigger parsing errors in the terminal:

Error parsing msgid at index 0: string index out of range
Error parsing msgstr at index 0: string index out of range

The entry that triggers this is:

msgid "%"
msgstr "%"

Investigation

I added temporary debug output and confirmed that:

  • The checker continues processing after these errors.
  • Translation loading and validation complete successfully.
  • The progress bar reaches completion.
  • The GUI remains open and responsive.

So the issue does not appear to stop validation, but it produces confusing terminal output for what seems to be a valid translation entry.

Additional Observation

When validation completes with no translation issues found, the GUI remains empty and does not provide any explicit success message.
Since the documented workflow involves running the checker from a terminal, the combination of:

  • terminal parsing errors, and
  • an empty GUI with no success confirmation

can make it difficult to determine whether validation completed successfully or encountered a problem.

(While discussing this with Hindi and Tamil translators, it initially appeared that the translation file contained an error, but further investigation showed that validation completed successfully and the message was only emitted by the parser.)

Expected Behavior

Entries consisting solely of '%' appear to be valid translation entries and could be handled without emitting parser errors.
When validation completes successfully and no issues are found, the tool could provide explicit feedback (for example, a "No issues found" message or similar indication).

Environment

Linux Mint (mint-dev-tools)
Observed while validating Hindi .po translations.

Issue comes from the lone '%' that has come in the translation file
Image
poEdit shows this
Image
The files are loaded successfully though
Image

I have a local reproduction and am currently looking into a possible fix.

Lenguaje dominante
Python
Estrellas
33
Forks
19
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

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 linuxmint/mint-dev-tools

Todos los issues de linuxmint/mint-dev-tools

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.