Page MenuHomePhabricator

Add PLURAL validators for projects using the new Validator framework
Open, NormalPublic

Description

We need to add plural validators for various projects based on,

  • Ruby
  • Gettext
  • SmartFormat

Plural validator should:

  • Not allow plural if the source does not have it
  • Require plural unless the language has only 1 plural form (unless enforced by the file format / software using it)
  • Check that required forms are provided for each plural instance

Details

Related Gerrit Patches:
mediawiki/extensions/Translate : masterAdd SmartFormat plural validator
mediawiki/extensions/Translate : masterAdd UnicodePluralValidator
mediawiki/extensions/Translate : masterAdd GettextPluralValidator

Event Timeline

abi_ created this task.Aug 26 2019, 4:45 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 26 2019, 4:45 AM
abi_ added a subscriber: Pginer-WMF.

@Pginer-WMF - Adding this to the current language team board as this is basically a sub task.

@Pginer-WMF - Adding this to the current language team board as this is basically a sub task.

Sounds good. Thanks for pinging!

Change 535208 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/Translate@master] Add GettextPluralValidator

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

Do you have an example of a project that uses plurals in Python?

abi_ reassigned this task from abi_ to Nikerabbit.Sep 10 2019, 8:43 AM

Do you have an example of a project that uses plurals in Python?

No, not at this point. I'll check and get back to you.

Change 535208 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Add GettextPluralValidator

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

Change 537491 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/Translate@master] Add UnicodePluralValidator

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

Change 537491 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Add UnicodePluralValidator

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

I had written a script that scrapes plural forms from rails-i18n repository. The results are in P9464.

Maybe someone wants to compare these against the CLDR plurals to see if there are differences. If not, I think the UnicodePlural class is sufficient.

Nikerabbit updated the task description. (Show Details)Wed, Oct 30, 7:05 AM

I'm currently working on the SmartFormat validator used by DiscordWikiBot.

Nikerabbit triaged this task as Normal priority.Wed, Oct 30, 8:27 AM
Nikerabbit removed a project: translatewiki.net.

Change 547154 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/Translate@master] Add SmartFormat plural validator

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

Change 547154 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Add SmartFormat plural validator

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