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

Aperta
#28 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
python

Direzione di ricerca

Riproduci il problema eseguendo mint-check-translations su un file .po Hindi contenente msgid "%" e msgstr "%", quindi traccia l'output del parser e il comportamento al completamento. Verifica come viene segnalata una convalida riuscita nel terminale e nella GUI. Il lavoro è completo quando le voci costituite da un solo simbolo di percentuale non producono errori di parsing e un'esecuzione riuscita fornisce un feedback esplicito quando non vengono rilevati problemi.

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

Descrizione

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.

Lingua principale
Python
Stelle
33
Fork
19
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

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

Tutte le issue di linuxmint/mint-dev-tools

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.