Last modified: 2014-09-26 23:07:56 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 T71993, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 69993 - Using variables inside plural definitions doesn't work in JavaScript
Using variables inside plural definitions doesn't work in JavaScript
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Internationalization (Other open bugs)
1.24rc
All All
: Normal normal (vote)
: ---
Assigned To: Santhosh Thottingal
: javascript
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-25 20:55 UTC by Jon
Modified: 2014-09-26 23:07 UTC (History)
13 users (show)

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


Attachments

Description Jon 2014-08-25 20:55:12 UTC
{{PLURAL:$1|$3 started this topic|A|0=B|2=C|3=$3}}
> mw.msg( "flow-topic-participants", 3 )
> 'A'

However
{{PLURAL:$1|$3 started this topic|A|0=B|2=C|3=D}}
> mw.msg( "flow-topic-participants", 3 )
> 'D'

I think the use of $3 in the rule 3=$3 is not being parsed correctly.
Comment 1 Roan Kattouw 2014-08-25 21:19:27 UTC
(In reply to Jon from comment #0)
> {{PLURAL:$1|$3 started this topic|A|0=B|2=C|3=$3}}
> > mw.msg( "flow-topic-participants", 3 )
> > 'A'
> 
> However
> {{PLURAL:$1|$3 started this topic|A|0=B|2=C|3=D}}
> > mw.msg( "flow-topic-participants", 3 )
> > 'D'
> 
> I think the use of $3 in the rule 3=$3 is not being parsed correctly.

I guess in your example, $3 should be unexpanded, because it should refer to the third parameter to the message which you didn't pass? Like, you would expect mw.msg( 'flow-topic-participants', 3, 'Alice', 'Bob' ) to return 'Bob'?
Comment 2 Jon 2014-08-25 21:55:25 UTC
> mw.msg( "flow-topic-participants", 3, 'a', 'b' )
> 'A'
Comment 3 Gerrit Notification Bot 2014-08-26 04:11:22 UTC
Change 156237 had a related patch set uploaded by Santhosh:
Support nesting of expressions in parameters of explicit plural forms

https://gerrit.wikimedia.org/r/156237
Comment 4 Gerrit Notification Bot 2014-08-26 19:06:26 UTC
Change 156237 merged by jenkins-bot:
Support nesting of expressions in parameters of explicit plural forms

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

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


Navigation
Links