Last modified: 2008-06-12 11:19:38 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 T15666, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 13666 - error string for missing template in inline query is hardcoded, unformatted
error string for missing template in inline query is hardcoded, unformatted
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Normal minor (vote)
: ---
Assigned To: Markus Krötzsch
http://ontoworld.org/wiki/SMW_unit_te...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-09 02:43 UTC by S Page
Modified: 2008-06-12 11:19 UTC (History)
0 users

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


Attachments

Description S Page 2008-04-09 02:43:53 UTC
You have to supply a template parameter if you use format=template, so this is in error:
  {{#ask: [[Located in::+]] |format=template }}

This correctly outputs 
  Please provide parameter "template" for query to work.
(good!)  But 

a) The string is hardcoded in SMW_QP_Template.php, it's not internationalized.
b) It doesn't appear with the cool yellow warning icon or as a tooltip.

ResultPrinters don't have a clean way to add their own errors to the query parser's errors, but changing line 33 to something like 
   return smwfEncodeMessages(array(wfMsgForContent('smw_qpneedstemplate')));
helps.
D'oh, I see there's already a note in the SMW_QP_Template.php code // TODO: internationalise, beautify
sorry to file a bug for a TODO.

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


Navigation
Links