Translating the message without modifying the code causes translatewiki.net to issue an error message and the translation is not accepted (i.e. immediately marked as obsolete). The error message is: {{PLURAL:}} has duplicate forms at the end. {{PLURAL:$1|sheep|sheep}} should be written as {{PLURAL:$1|sheep}}.
Description
Revisions and Commits
Related Objects
Event Timeline
Hi, which exact translated message creates this error? The link above shows an already translated message? (If something is "marked as obsolete" then I probably don't know where to see that.)
The translated Dutch message had the code changed from the original (from {{plural:$2|{{gender:$4|}}|{{gender:$4|}} to {{plural:$2|{{gender:$4|}}) to avoid the error. Translators should not have to change the code to avoid errors. Not every translator has that skill set, and in any case, the code in the original should be correct and usable as is.
Hi, thanks for the report. The idea behind {{plural:$2|{{gender:$4|}}|{{gender:$4|}}}} is that this is a placeholder where translators can put different forms as needed. If there are no forms (as in English and Dutch), this can be removed altogether. But obviously, usually people just keep this placeholder given it doesn't affect anything. Not sure what to do with the error. As far as I understand, it doesn't block saving the translation.
Ah I see, the main issue here is that the translation is popping up in the list of outdated translations. The same when some parameters are not used (so no option to remove the placeholder altogether). I guess the best solution here is to replace {{plural:$2|{{gender:$4|}}|{{gender:$4|}}}} with {{plural:$2|{{gender:$4|}}}} in the original as you did in the translation; it's clear enough for translators what should be done with the placeholder.
Yes, that's what I meant to convey. It looks like this fix has now been applied, so this issue can be closed. Thanks.
I just discovered a clever solution to this that solves two problems at once. There is a problem with languages that have a single form for 1 and other numbers (like 1, 21, 31, etc.) – some Baltic, Slavic and Celtic languages. When there is no explicit number (like "There are new messages" instead of "There are 5 new messages"), 1= should be added before the first form to avoid having messages "There is a new message" when there are 21 new messages: {{plural:$1|1=singular|plural}}. But translators to these languages usually don't know about this. I think it makes sense to add 1= to the English source to improve the situation. And Translatewiki engine will stop complaining as well, because the forms will be different: {{plural:$2|1={{gender:$4|}}|{{gender:$4|}}}}.
@Nikerabbit Hey, I'm wondering, is this (1= I mean) a known problem? If yes, what is the proposed solution? Because I made this mistake twice, which led to incorrect messages. And I'm a person who is aware of this problem! People who aren't could generate a lot of incorrect messages like this. There should be a way to fight this.
It's not clear why this was reopened. As far as I can see the issue has been fixed. 1= can be useful sometimes, but generally complexity should be avoided in translatable messages. "Why didn't X know about Y` is not an issue we can solve in Phabricator.