Last modified: 2012-11-09 19:04:43 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 T43927, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41927 - statistic magic words cannot be used as numbers in expressions
statistic magic words cannot be used as numbers in expressions
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.20.x
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-09 17:18 UTC by Paolo Benvenuto
Modified: 2012-11-09 19:04 UTC (History)
1 user (show)

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


Attachments

Description Paolo Benvenuto 2012-11-09 17:18:50 UTC
The statistic magic words (https://www.mediawiki.org/wiki/Help:Magic_words#Statistics) produce numbers that cannot be used in calculations (as with {{#expr: ..}} parser function), because of the miles separators, as explained: "The number magic words are formatted in the wiki content language".

I understand they are so for reason of aestetics.

A different version of these functions is needed for calculation purposes, in a similar manner to what is done for "URL encoded page names".
Comment 1 Bartosz Dziewoński 2012-11-09 17:23:31 UTC
You can use {{WORD:R}} to do this, e.g. {{NUMBEROFPAGES}} becomes {{NUMBEROFPAGES:R}}. The :R (or "raw") versions are plain numbers. (This is described on the very page you linked.)

There is also the #formatnum: parser function, which can perform the same operation on any input.

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


Navigation
Links