Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mint-check-translations misses issues with plural strings #27

Open
allanmcrae opened this issue Apr 23, 2024 · 0 comments
Open

mint-check-translations misses issues with plural strings #27

allanmcrae opened this issue Apr 23, 2024 · 0 comments
Assignees

Comments

@allanmcrae
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants