Page MenuHomePhabricator

Wikiedudashboard - invalid PLURAL rules.
Closed, InvalidPublic

Description

There are invalid PLURAL rules in:
*Wikimedia:Wikiedudashboard-users.number of articles
*Wikimedia:Wikiedudashboard-metrics.upload usages count
*Wikimedia:Wikiedudashboard-users.training modules completed
*Wikimedia:Wikiedudashboard-metrics.uploads in use count
which would work only for English and very few languages.

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJun 9 2016, 11:59 AM

Please associate the correct project to tasks. Thanks!

Restricted Application added a subscriber: Base. · View Herald TranscriptJun 9 2016, 2:28 PM

Please associate the correct project to tasks. Thanks!

I do if I can. I do if I make useful guesses. Otherwise, I am without a chance.

What would fix this? Support for the zero case?

If you use the "one=" syntax,, you tell translators to special case "one" in their language and treat all other counts equally. That is not appropriate for the majority of languages, that have e.g. a zero case or various other individual diverging things like dual or a modulo-4 divide, etc.

It appears unnecessary to make the one/other distinction in all languages that have their language dependent rules in place already .

In English,
{{PLURAL|one=%{count} article|%{count} articles}}
is technically equivalent to:
{{PLURAL|%{count} article|%{count} articles}}
or to:
%{count} {{PLURAL|article|articles}}

So if you choose one of those latter two, it would be a fine fix and send the appropriate signal to all languages to use whatever they see fit.

Neither of the latter two are compatible with the i18n framework used for this project, as far as I can tell.

The translatewiki translations get turned into yaml files that take this form:

en:
  message:
    one: one thing
    other: some things

This follows the same CLDR rules as MediaWiki, but I don't see a way make it use the form {{PLURAL|%{count} article|%{count} articles}}

@siebrand, @Nikerabbit: do you have any advice for this situation?

Nikerabbit closed this task as Invalid.Jun 11 2016, 8:08 AM

@Purodha these are not MediaWiki plural rules. MediaWiki does not support one=. Please follow the appropriate rules for each project.

https://translatewiki.net/wiki/Plural#Plural_syntax_for_projects_using_the_rails-i18n_framework

Purodha added a comment.EditedJun 11 2016, 8:18 AM

@Purodha these are not MediaWiki plural rules. MediaWiki does not support one=. Please follow the appropriate rules for each project.

I am awfully sorry. I read "one" taking it for "1" mindlessly - my mistake.