Wikipedia talk:TemplateData/Archive 2

Extending use; removing redundancy
We have many templates which use TemplateData, and alongside it have duplicate prose descriptions, in a variety of formats, of the same parameters.

Examples:


 * Infobox station - uses bulletted list
 * Infobox football biography - uses definition list
 * Infobox person - uses two-column table
 * Infobox building - uses four-column table
 * Infobox official post - uses HTML-comment format in copyable blank

How can we make TemplateData serve this latter purpose, so that the data only needs to be entered, or updated, once? Do we simply delete the prose versions (after copying over any unique material)?

Also, can we add a TemplateData parameter for the equivalent Wikidata value(s), so that there is a consistent way to record, an find, such equivalences? Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 18:50, 3 November 2014 (UTC)
 * We also have:
 * markup which uses aligned table
 * templates which use citation Style documentation
 * --  Gadget850talk 11:29, 4 November 2014 (UTC)


 * I'd imagine some MediaWiki devs who are working or worked on TemplateData would be interested in this discussion as well, possibly with pointers or ideas, as well the WikiData folks. What would be the best way to solicit their input? Martijn Hoekstra (talk) 12:19, 4 November 2014 (UTC)


 * There are some problems with using TemplateData for normal documentation. The format is a little bit limited. You cannot for example include any templates or styling or links. I think the limitations mean they not really suitable for most documentation.--Salix alba (talk): 13:13, 4 November 2014 (UTC)

{ "description": "", "params": { "Bold": { "description": "Bold." },   "italics": { "description": "italics." },   "Templates": { "description": "Yes." },   "Links": { "description": "Link." } } }
 * you wrote: "The format is a little bit limited. You can for example include any templates or styling or links." Is there a not missing in the second sentence? -DePiep (talk) 13:45, 4 November 2014 (UTC)
 * Perhaps these limitations can be addressed? Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 14:37, 4 November 2014 (UTC)
 * Pinging who's done a lot of template data. Thanks to DePiep for spotting my typo. --Salix alba (talk): 23:04, 4 November 2014 (UTC)
 * The description purposely does not support markup. The content must be consumable by applications outside MediaWiki (such as VisualEditor) and embeddable in plain text (tooltips for example) without requiring a wikitext parser. You don't need markup to describe a parameter to a user in plain English. Using a template to unify the wording is overly complex in my opinion (though actually already possible if you use ). Using bolding or italics is probably a mistake and will result in a circus of attention grabby descriptions. Advanced markup like colours, boxes and images would be inappropriate for a description field. Leaving only links. Links are useful indeed. Though ideally we'd standardise those instead of free-form any where in the description (e.g. a single "more information" link or page name). Krinkle (talk) 11:23, 5 November 2014 (UTC)
 * re : could you correct that typo then? As it is now, I don't understand it. -DePiep (talk) 12:00, 5 November 2014 (UTC)

Why "must" TemplateData be parable without a Wikitext parser? The assertion that "You don't need markup to describe a parameter to a user in plain English" is false, in as much as we currently use templates to refer users to subtemplates (e.g. via tl), or links (internal or external) to refer them lookup tables for ISO codes, and such like. Examples of markup in existing template documentation:


 * Infobox station
 * native_name - name in local language. If more than one, separate using Plain list
 * mr - The McCune–Reischauer of the name
 * coordinates – Geographical coordinates of the station using coord directly
 * smartcardstatus – "Yes" if smart card is available, or a date (or other information) if available in the future (see Union (TTC) for an example)
 * services – Allows inclusion of the s-rail/s-line boxes
 * map_type, map_alt, map_overlay, map_caption - Allows inclusion of an image of the station location on a map (see map and coordinates for details)
 * map_locator – Allows inclusion of an image of the station location on a map, using Location map or another method directly
 * Infobox football biography
 * Enables the template to be embedded into another template, such as Infobox person.
 * The player's date of birth. A template (Birth date, Birth date and age) should be used to add the date, but be sure to use the appropriate parameters to present the date in the same format as used in the text. The date should not be wikilinked.
 * , ... : A list of appearances that the player has been awarded in league competition only for each professional club (note: Playoff matches are not counted as league matches by most statistical sources (e.g. Soccerbase and the Sky Sports (Rothmans) Football Yearbook, so they should not be included in this infobox), one per attribute, earliest to latest.
 * (previously ): A timestamp at which the player's infobox club statistics are correct (not needed if the player has retired).
 * Infobox person
 * Common name of person (defaults to article name if left blank; provide birth_name (below) if different from name). If middle initials are specified (or implied) by the lead of the article, and are not specified separately in the birth_name field, include them here.
 * Image name: abc.jpg, xpz.png, 123.gif, etc. If an image is desired but not available, one may add "yes" to the "needs-photo" section of the Template:WPBiography on the talkpage. If no image is available yet, do not use an image placeholder.
 * Alt text for image, for visually impaired readers. One word (such as "photograph") is rarely sufficient. See WP:ALT.
 * Place of burial, ash-scattering, etc. Do not use a flag template.
 * A combination of the above, such as Professor of Mathematics and Fellow of the Royal Society for Bill Parry
 * For board of directors membership(s), if relevant. Field labeled Board member of.
 * Note: non-breaking space
 * Infobox building
 * use ISO 639-2 code, e.g. "fr" for French. If there is more than one native name, in different languages, enter those names using lang, instead.
 * The keywords to the right can be used to produce the appropriate colored status [...] "built", "completed", "finished" or "complete" = Complete ;
 * wikitext (can contain links) E.g.; [Joondalup, Western Australia]], Australia, Las Vegas Strip
 * Note: use of

I agree there is probably no need for images, colours or boxes. I imagine that some would want to retain emboldening or emphasis; that would need to be debated. I would rather we discuss how to collaboratively resolve these issues, than to use them as a reason not to reduce the existing redundancy. Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 20:38, 6 November 2014 (UTC)


 * One of the plans (at the "probably" stage of commitment) for TemplateData is to put the TemplateData into its own block. In that case, it won't be present on the /doc page.  When that happens, the problem of the poor appearance due to redundancy will presumably evaporate.  That will leave us with the problem of the problem of needing to type the descriptions in two different places.  Whatamidoing (WMF) (talk) 18:54, 7 November 2014 (UTC)
 * That will also not resolve the inevitable lack of synchronisation. Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 11:48, 11 November 2014 (UTC)
 * Hi. I have to agree with Andy there. That's a serious problem. A TemplateData presentation format must work for both documentation and GUI format.
 * At the present time, it is possible to use TemplateData to provide a brief description and add specialized sections in the documentation page. In the meantime, adding support for hyperlinking is a 90/10 deal. Best regards, Codename Lisa (talk) 08:03, 18 January 2015 (UTC)

This needs to be resolved Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 11:50, 4 December 2014 (UTC)
 * More than a month has passed. Is anyone prepared to engage on this issue? Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 20:10, 15 January 2015 (UTC)


 * I like the "official" output as it is at the moment, but this is still a target moving fast breaking its own backwards compatibility following no obvious rules, cf. mw:Extension_talk:TemplateData. –Be..anyone (talk) 13:26, 17 January 2015 (UTC)

Redux
It's now been six months since I raised this. I'm glad to see User:Whatamidoing (WMF) posting here again; so perhaps we (the community and the WMF) can now work together towards a resolution. However, in the meantime, we've also started discussing, on Wikidata, how to record template parameters there, so that needs to be considered also. Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 20:15, 11 June 2015 (UTC)
 * This has been an open bug in Phab since mid-2013. It is unclear if it constitutes a technical limitation or if it is a conscious choice made by the developers. Alakzi (talk) 20:55, 11 June 2015 (UTC)
 * Realistically, it may not make sense to address this question until your ideas about moving it to Wikidata and the proposal to create a global template system have been resolved.  Whatamidoing (WMF) (talk) 22:14, 11 June 2015 (UTC)

Update or recreate list?
As most of the listed mainspace templates seem to be done, would it be possible to actualize the list or, even better, recreate it with an actual list of still missing templates without template data? On a sidenote, I just added a small TD to template:vague, which is transcluded 2,000 times according to the WMFlabs "templatecount" tool. Even if the usage is hardly earth-shattering, is it possible to list a few more of those semi-common templates as well? GermanJoe (talk) 13:28, 5 April 2015 (UTC)


 * Re-create, only doing a better job. I'm hopeful that we might have a really good list within the next week or so.  Whatamidoing (WMF) (talk) 00:14, 12 May 2015 (UTC)
 * Hi GermanJoe,
 * You might want to look at this list. It shows the most popular templates that are actually used in articles.  The list doesn't lend itself to transforming it into links (yet, anyway), and it doesn't resolve redirects ("Fact" and "Citation needed" are treated separately) and there are a few oddities, but it's the best list we've ever had.  Whatamidoing (WMF) (talk) 18:47, 5 June 2015 (UTC)
 * I transformed the list in a raw semicolon-separated link list (just need a hex editor with flexible search/replace function), see User:GermanJoe/Workspace2. Is that the final list version or are templates with available Template Data still to be removed? If it's the final version, I could clean it up a bit (a few links are broken with comments) and filter already completed templates myself, if necessary. GermanJoe (talk) 20:06, 5 June 2015 (UTC)
 * OK, it's cleaned up a bit now (see workspace2 link), just need to filter out the already added Templata Data sections, and then the remaining list could be used. GermanJoe (talk) 17:13, 9 June 2015 (UTC)
 * Your list looks great. This was created with an arbitrary limit of 2,000 template names (where "fact" and "citation needed" count as two names).  Is that a good cutoff, or would you rather have something else?  We could do any template used more than 1,000 times, for example.  (We could also go with this for now, and change it later.)  Whatamidoing (WMF) (talk) 17:42, 9 June 2015 (UTC)
 * On a quick first check the list contains c. 20 open templates > 100.000 transclusions and probably several hundred more to do in the "mid-usage" and "low-usage" range. That should be enough to keep interested editors busy for a while ;). It would probably be best to simply archive the current "old" to-do list on a subpage, in case editors want to look something up or work on listed minimal-usage templates (but first of all I'll try to format the new list a bit more and filter out already done cases). GermanJoe (talk) 18:48, 9 June 2015 (UTC)
 * I'm in favor of archiving and replacing the old list wholesale. Also, what do you think about finding some of our more active TemplateData writers and letting them know that we finally have a better list?  User:Codename Lisa probably knows some of the people who have been involved, and we could probably find more in the page history.  Whatamidoing (WMF) (talk) 07:44, 10 June 2015 (UTC)
 * I'll probably need a few more days, let's wait a bit with the notifications - but in general it's a good idea. On a quick sidenote: if you plan such lists for other Wikis as well (iirc Spanish was discussed), I'd recommend to clean up and summarize redirect counts under the "real" template name. I have cleaned up the en-Wiki list in that regard, but it's easier doing such formatting automatically. User:Anomie/linkclassifier offers such a function to distinguish redirects from direct links, so I am fairly confident it's possible by script as well. GermanJoe (talk) 08:24, 10 June 2015 (UTC)
 * Upmerging redirects been requested at the bug. I don't know when or whether the generous WP:VOLUNTEER dev will do it.  Whatamidoing (WMF) (talk) 16:04, 10 June 2015 (UTC)
 * An early rough version for the updated TemplateData page is at User:GermanJoe/Workspace3, but I am taking a small break now :). One critical issue, that I just noticed: parts of the current TemplateData page have been reformatted as hlists a few month ago. If that hlist format is really necessary (for logging or something else), we could use additional help with transforming the "simple" bulleted list in the more complex hlist format. GermanJoe (talk) 12:21, 10 June 2015 (UTC)
 * It looks like User:Sardanaphalus made that change in December 2014. I believe that it is intended to make the page look nicer, rather than being necessary for some external process.  Whatamidoing (WMF) (talk) 16:04, 10 June 2015 (UTC)
 * I have kept simple layout for now then (it may be less "pretty", but it is easier to run through scripts and less prone to typos damaging the structure). Assuming no concerns -technical or otherwise- are raised in the meantime, I could update the list on Saturday. If any interested editors see flaws or possible improvements in User:GermanJoe/Workspace3, please let me know. It is supposed to replace only section 3. (which will be archived). GermanJoe (talk) 19:25, 11 June 2015 (UTC)
 * That looks good to me. I tried to add TemplateData to R from move, and have discovered the need to re-open T64417.  I'd like to get some good screenshots from the new interface.  I think we would benefit from updated directions.  Most people aren't going to hand-code JSON, and I think the instructions might be from two iterations of the GUI tool ago.  Whatamidoing (WMF) (talk) 22:35, 11 June 2015 (UTC)
 * Lists should be good to go now (archive and raw data in subpages), feel free to notify if OK. (Updated instructions would be useful, agree.) GermanJoe (talk) 15:56, 15 June 2015 (UTC)
 * X! Tools is down, so we can't get a quick list of people who have edited the page before right now, to let them know about the updated list. Whatamidoing (WMF) (talk) 18:03, 17 June 2015 (UTC)

Just edited TemplateData, but when trying to save it got this errormessage: "Required property "paramOrder[244]" not found." It prevented (blocked) the save.

I did not see, edit, or touch that parameter, it is not visible in the edit diff (Changes) before nor after. Second, the errormessage does not provide help or solution (-links). -DePiep (talk) 11:00, 29 January 2016 (UTC)

Template:Open-source_attribution
Hi all

I'm totally confused by trying to create TemplateData for a template I want to use, please could someone create TemplateData for Template:Open-source_attribution? Specifically I want to attribute using the CC-BY-SA IGO 3.0 license.

Yours hopefully

John Cummings (talk) 20:22, 17 May 2016 (UTC)


 * Done. :-) Jdforrester (WMF) (talk) 06:40, 18 May 2016 (UTC)


 * Thanks very much :) John Cummings (talk) 08:13, 18 May 2016 (UTC)

Help
Template:Collapse top and Template:Collapse bottom share the same documentation. I put the TemplateData for Collapse top at Template:Collapse top/TemplateData but it doesn't seem to be working. &mdash; Music1201  talk  21:14, 9 July 2016 (UTC) Pinging - recent template data editor. &mdash; Music1201  talk  22:40, 9 July 2016 (UTC)
 * Does TemplateData work as a subpage? It has not worked in the past. That would be wonderful, since it is fragile programming code that really should not live on the documentation page. There is precious little documentation that explains how TemplateData works. Good luck. – Jonesey95 (talk) 02:03, 10 July 2016 (UTC)
 * Yes you can have TemplateData on sub-pages, these need to be transcluded into the main document page in an section. In this case I've added

....

To the bottom of the main template page.
 * On the English wikipedia the convention is to add template data to the documentation page, which is normally transcluded. This does allow any editor to add template data to protected pages.--Salix alba (talk): 04:06, 10 July 2016 (UTC)

Top templates with no template data
Following  @IKhitron has written a query to search wiki for templates with the most transclusions but template data. I've forked it, for en-wiki here and run it. I've had to split it by initial letter A-Z to get the query to run in a reasonable time.

The results below show the most used templates without template date. The list has been trimed to those with more than 10,000 transclusions. I've remove templates starting  as these are for talk namespaces and those starting   which are bot generated (see Template:Country showdata). --Salix alba (talk): 14:12, 16 December 2016 (UTC)

This table gives direct transclusions in artcles. The second colunm is the number of articles the template is transcluded in, the third column is the number of transclusions in articles (same are used more than once in the same article and the forth is all pages template is transcluded in.--Salix alba (talk): 08:49, 18 December 2016 (UTC)

Problems with the "inherits": parameter
Using the "inherits": "" parameter causes this thing to produce a "params not found" error and prevents the creation of the resulting templatedata box altogether. I am going to be bold and remove it from the tutorial until this can be fixed. Having copied and pasted the text from the tutorial into a template, the error drove me mad until I removed the parameters one by one and discovered that it was the "inherits": "" parameter that was causing the error. I am not sure whom to notify about this, but it looks like a programming problem of some kind. KDS4444 (talk) 12:53, 11 February 2017 (UTC)