Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

mint-check-translations misses issues with plural strings

Open
#27 0 comments 0 reactions 1 assignee View on GitHub

@mtwebster is already working on this.

Since Nov 20, 2024.

Assessment

This issue has not been assessed yet.

Description

The checking of plural forms misses some translations issues. For example, this is causing a segfault in my codebase:

msgid "There is %zu provider available for %s\n"
msgid_plural "There are %zu providers available for %s:\n"
msgstr[0] "Za %s je na voljo %zu ponudnik\n"
msgstr[1] "Za %s sta a voljo %zu ponudnika:\n"
msgstr[2] "Za %s so na voljo %zu ponundiki:\n"
msgstr[3] "Za %s je na voljo %zu ponudnikov :\n"

Taking a sledge hammer approach... Removing the following check "fixes" the issue for me - or at least prints issues with msgstr[0]

if (is_plural and not is_python):
        # Plural forms don't have to match the number of arguments in C, but they do in Python
        return GOOD

While the comment in the code is true, the arguments still need to be provided in the right order. Thus skipping all checks is missing a class of translation bugs.

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.