Page MenuHomePhabricator

Encourage the use of PLURAL in MediaWiki:Logentry-growthexperiments-addlink
Closed, ResolvedPublic

Description

The use of PLURAL should be encouraged in MediaWiki:Logentry-growthexperiments-addlink since parameters 5, 6 and 7 can show values from 0 to ∞.

Two possibilities:

Reinforce documentation
The existing message

$4 - the number of links that the user reviewed.
$5 - the number of links that the user accepted.
$6 - the number of links that the user rejected.
$7 - the number of links that the user skipped.

could be:

$4 - the number of links that the user reviewed - its value is always superior to 2.
$5 - the number of links that the user accepted - its value goes from 0 to ∞.
$6 - the number of links that the user rejected - its value goes from 0 to ∞.
$7 - the number of links that the user skipped - its value goes from 0 to ∞.
We encourage the use of [https://translatewiki.net/wiki/Plural#Plural_syntax_in_MediaWiki {{PLURAL}}] for parameters $5, $6 and $7.

Force the use of PLURAL in the message
The existing message:

$1 {{GENDER:$2|reviewed}} $4 link suggestions for $3: accepted $5, rejected $6 and skipped $7

could be:

$1 {{GENDER:$2|reviewed}} $4 link suggestions for $3 : {{PLURAL:$5|accepted}}, {{PLURAL:$6|rejected}} and {{PLURAL:$7|skipped}}

Example in French:

$1 {{GENDER:$2|a relu}} $4 suggestions de lien pour $3 : {{PLURAL:$5|acceptée|acceptées}}, {{PLURAL:$6|rejetée|rejetées}} et {{PLURAL:$7|omise|omises}}

Event Timeline

Maybe this bug is invalid, since we changed the message (IIRC). But as of now, I have some raw parameters in the edit summary and no plural (example).

I checked T284078 - only $5 - the number of links that the user accepted. is displayed in the edit summary. The message MediaWiki:Logentry-growthexperiments-addlink has PLURAL added to Czech, French, Hebrew, and Ukrainian.

Although the English message doesn't have PLURAL, it does differentiates between plural and single cases in the UI. So, if PLURAL should be added to all languages - the task is still valid.

Although the English message doesn't have PLURAL, it does differentiats between plural and single cases in the UI. So, if PLURAL should be added to all languages - the task is still valid.

English is source there. I guess translators have used PLURAL, like how volunteer-me did?

If the message needs PLURAL in some language, it should have PLURAL in English too, per the translatewiki.net FAQ.

Change 771471 had a related patch set uploaded (by MewOphaswongse; author: MewOphaswongse):

[mediawiki/extensions/GrowthExperiments@master] Add a link: use PLURAL for number of links accepted/rejected/skipped in logentry-growthexperiments-addlink

https://gerrit.wikimedia.org/r/771471

@Trizek-WMF should we also use {{PLURAL:$4|suggestion}} ? e.g. $1 {{GENDER:$2|reviewed}} {{PLURAL:$4|link suggestion}} for $3: {{PLURAL:$5|accepted}}, {{PLURAL:$6|rejected}} and {{PLURAL:$7|skipped}}

@kostajh The task description says "$4 value is always superior to 2". As Cyrillic based languages, such as Russian, have 3 plural forms, we have to add PLURAL: to cover these cases (supported by Mediawiki https://www.mediawiki.org/wiki/Help:Magic_words#Localization). I let @Etonkovidova confirm if needed.

@kostajh The task description says "$4 value is always superior to 2". As Cyrillic based languages, such as Russian, have 3 plural forms, we have to add PLURAL: to cover these cases (supported by Mediawiki https://www.mediawiki.org/wiki/Help:Magic_words#Localization). I let @Etonkovidova confirm if needed.

The proposed version in the patch is $1 {{GENDER:$2|reviewed}} $4 {{PLURAL:$4|link suggestion|link suggestions}} for $3: {{PLURAL:$5|accepted}} $5, {{PLURAL:$6|rejected}} $6 and {{PLURAL:$7|skipped}} $7, is that OK?

@kostajh The task description says "$4 value is always superior to 2". As Cyrillic based languages, such as Russian, have 3 plural forms, we have to add PLURAL: to cover these cases (supported by Mediawiki https://www.mediawiki.org/wiki/Help:Magic_words#Localization). I let @Etonkovidova confirm if needed.

The proposed version in the patch is $1 {{GENDER:$2|reviewed}} $4 {{PLURAL:$4|link suggestion|link suggestions}} for $3: {{PLURAL:$5|accepted}} $5, {{PLURAL:$6|rejected}} $6 and {{PLURAL:$7|skipped}} $7, is that OK?

I've just +2'ed the patch with that wording.

Change 771471 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Add a link: use PLURAL for number of links accepted/rejected/skipped in logentry-growthexperiments-addlink

https://gerrit.wikimedia.org/r/771471

I've just +2'ed the patch with that wording.

I hope it is the right one. :) And the community knows where to find us if needed.

@kostajh The task description says "$4 value is always superior to 2". As Cyrillic based languages, such as Russian, have 3 plural forms, we have to add PLURAL: to cover these cases (supported by Mediawiki https://www.mediawiki.org/wiki/Help:Magic_words#Localization). I let @Etonkovidova confirm if needed.

The message MediaWiki:Logentry-growthexperiments-addlink looks ok to me (the Russian translation has not been updated, but the message has been structured grammatically correct). There is certain flexibility in grammar rules for this specific case - {{PLURAL:$5|accepted}} $5, {{PLURAL:$6|rejected}} $6 and {{PLURAL:$7|skipped}} $7 - both plural form or singular form can be used.