Last modified: 2013-08-30 22:01:24 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 T51838, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 49838 - VisualEditor: TemplateSpecModel should expand aliases
VisualEditor: TemplateSpecModel should expand aliases
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
Data Model (Other open bugs)
unspecified
All All
: High normal
: VE-deploy-2013-06-27
Assigned To: Krinkle
:
Depends on:
Blocks: ve-templatesupport
  Show dependency treegraph
 
Reported: 2013-06-19 19:57 UTC by James Forrester
Modified: 2013-08-30 22:01 UTC (History)
6 users (show)

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


Attachments

Description James Forrester 2013-06-19 19:57:22 UTC
TemplateSpecModel currently doesn't expand aliases, so if it knows something as "foo" with an alias of "1" and the dialog asks about "1", it returns nothing.
Comment 1 Gerrit Notification Bot 2013-06-24 00:26:00 UTC
Related URL: https://gerrit.wikimedia.org/r/70111 (Gerrit Change I37ec0e152df905844ac58ed1834fca29dccb4eec)
Comment 2 Richard Morris 2013-07-24 15:28:15 UTC
More a question that a bug. How do you specify an alias using templateData? There are lots of examples which use alternate capitalisation for parameters. For example {{Infobox World Heritage Site}}
http://en.wikipedia.org/wiki/Template:Infobox_World_Heritage_Site
uses both 'Image' and 'image' to specify an image. To specify both makes the documentation clumsy. An alias would be ideal.

Also {{Quote}}}
http://en.wikipedia.org/wiki/Template:Quote
can be given in two forms, either positional:
{{quote|phrase|person|source}} 
or named:
{{quote|text=phrase|sign=person|source=source}}
Currently both are documented but it would be nicer to use aliases.
Comment 3 Krinkle 2013-07-24 15:45:06 UTC
See https://www.mediawiki.org/wiki/Extension:TemplateData#Defining_a_TemplateData_block

Example:

{
  params: {
    image: {
      label: 'File name',
      ...,
      aliases: ['1', 'Image', 'Filename', .. ]
    }
  }
}

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


Navigation
Links