Last modified: 2012-04-16 09:16:01 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T29233, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27233 - Selective expansion of expressions in {{plural:}}
Selective expansion of expressions in {{plural:}}
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-08 03:41 UTC by Martin Smith
Modified: 2012-04-16 09:16 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Martin Smith 2011-02-08 03:41:08 UTC
The {{plural:}} magic word will expand some expressions, but not others.  This is a little confusing, especially as the advertised use of expressions (x mod 10, for Russian-like languages) isn't supported by default.

Examples:

{{plural:0|is|are}} → are (OK)
{{plural:1*1|is|are}} → is (OK)
{{plural:21 mod 10|is|are}} → are (UNEXPECTED)
{{plural:{{#expr:21 mod 10}}|is|are}} → is (OK)
{{plural:1|is|are}} → is (OK)
{{plural:2|is|are}} → are (OK)
Comment 1 Bawolff (Brian Wolff) 2011-02-08 03:51:48 UTC
Is plural supposed to expand any expressions at all.

I thought it was supposed to work {{plural:<some number>|foo|bar}} and if the number needs to be modded 10 in the content laguage, the software will do it.


For example in russian (This is my understanding. could be wrong)
{{plural:1|foo|bar|baz}} = {{plural:21|foo|bar|baz}} = foo

{{plural:2|foo|bar|baz}} = {{plural:3|foo|bar|baz}} = bar

{{plural:0|foo|bar|baz}} = {{plural:5|foo|bar|baz}} = baz


(I'll leave this open in case i totally misunderstood how plural works and just made a fool of myself)
Comment 2 Mark A. Hershberger 2011-02-08 22:35:45 UTC
I think to really answer this, we'd have to have someone test the output of

{{plural:1*2|is|are}} and {{plural:2*1|is|are}}

Otherwise, it just looks to me like 1*1 in Martin's original post is not being expanded at all.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links