mint-check-translations misses issues with plural strings
@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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from linuxmint/mint-dev-tools
-
mint-check-translations emits parsing errors for lone '%' strings and provides no success feedback Open
Difficulty 4/5 3-5 days Newbie friendliness 45/100
linuxmint/mint-dev-tools#28 ·
All issues in linuxmint/mint-dev-tools
Similar issues
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
open-webui/open-webui#30750 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
OpenwaterHealth/openmotion-bloodflow-app#604 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 90/100