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

Open
#28 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python

Research direction

Reproduce the issue by running mint-check-translations against a Hindi .po file containing msgid "%" and msgstr "%", then trace the parser output and completion behavior. Check how successful validation is reported in the terminal and GUI. Done means lone-percent entries produce no parsing errors and a successful run gives explicit feedback when no issues are found.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Python
Stars
33
Forks
19
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from linuxmint/mint-dev-tools

All issues in linuxmint/mint-dev-tools

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.