Last modified: 2009-07-31 13:27:04 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 T21086, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 19086 - Rendering of Type:Number
Rendering of Type:Number
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Markus Krötzsch
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-05 08:18 UTC by Karsten Hiddemann
Modified: 2009-07-31 13:27 UTC (History)
0 users

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


Attachments

Description Karsten Hiddemann 2009-06-05 08:18:29 UTC
Type:Number takes plain numbers like 14925490, but always renders it as 14,925,490 in queries. This makes it necessary to add an extra processing step which strips the commata from semantic query results for templates that expect to work with numbers. Please add an option to get a "plain" number.

MediaWiki       1.14.0
PHP     5.2.4-2ubuntu5.6 (apache2handler)
MySQL   5.0.51a-3ubuntu5.4

Semantic MediaWiki (Version 1.4.2)
Semantic Forms (Version 1.6)
Comment 1 Markus Krötzsch 2009-07-31 13:27:04 UTC
A new feature is provided to address this in the next release (currently available in SVN). By specifying "-" or "" (empty string) as an output format in queries, outputs are returned in plain, unformatted form. Example query:

 {{#ask: [[Category:Country]]
 | ?area#km²
 | ?population#
 | ?capital#-
 }}

will return a table of four columns, all of which have an explicit output format (the content after #). The first column are simply the countries, the second is their area converted to "km²" as usual. The third one is their population as a plain string (caveat: when numbers get large, scientific notation is used; fixes for preventing this are welcome). The fourth column is their capital, again as a plain (unlinked) string. Empty format strings and "-" mean the same. Spaces are ignored.

For switching off all links (even in the first column), one can set the parameter "link=none" or replace the first standard column with a new version by adding the parameter "mainlabel=-" (hide first column) and the new printout "?#" (display main column, with empty formatting string).

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


Navigation
Links