Last modified: 2013-09-04 11:48:14 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 T34333, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 32333 - When transcluding a system message, permit positional parameters
When transcluding a system message, permit positional parameters
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.17.x
All All
: Unprioritized enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-09 22:22 UTC by Dan Barrett
Modified: 2013-09-04 11:48 UTC (History)
2 users (show)

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


Attachments

Description Dan Barrett 2011-11-09 22:22:06 UTC
If you have a system message with positional parameters, such as:

    'my-message' => "My favorite $1 is $2."

today it can be transcluded into a wiki article like this:

  {{mediawiki:my-message}}

but you cannot provide values for the parameters. As an enhancement, allow positional parameters to be passed to the message. For example:

  {{mediawiki:my-message | fruit | bananas}}

would transclude as:

  My favorite fruit is bananas.

This would be very helpful for documenting wiki features within the wiki.
Comment 1 LordAndrew 2011-11-10 01:45:30 UTC
{{int:my-message|fruit|bananas}} will give you your desired output.
Comment 2 Dan Barrett 2011-11-10 03:04:40 UTC
Very interesting. I had no idea there was an int parser function.

Now I see it's documented at http://meta.wikimedia.org/wiki/Magic_words#Template_modifiers.  Thanks for the tip!

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


Navigation
Links