Skip to content

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

@harshlm15

Description

@harshlm15

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions