Page MenuHomePhabricator

Check documentation for the TemplateData editor for completeness, accuracy, and ease of understanding by adding TemplateData to templates on Wikipedia
Closed, DeclinedPublic

Description

Steps to complete this task:

  1. Read https://www.mediawiki.org/wiki/Help:TemplateData and https://en.wikipedia.org/wiki/Wikipedia:TemplateData/Tutorial
  1. Use the information (especially in the section https://www.mediawiki.org/wiki/Help:TemplateData#TemplateData_editor ) to use the built-in TemplateData editor to add TemplateData to the documentation sub-page of five templates on Wikipedia (any language edition).

At the English Wikipedia, you can find lists of templates that may need TemplateData added in this list: https://en.wikipedia.org/wiki/Wikipedia:TemplateData#Commonly_used_templates There are similar lists at a few other Wikipedias, or you can look for templates manually, in the Template: namespace. Some templates already have complete TemplateData; please remove those from these lists.

Note: It is faster to add TemplateData to templates that have fewer parameters, so you may want to choose simple templates for this task.

  1. Post the URLs for the templates you edited. Ask your mentor to check your work to make sure that the TemplateData was done correctly.
  1. Think about what you just did, and compare it to the directions you read. Are the directions complete? Are they correct? Were they easy to understand? Try to add missing information and correct errors by editing the pages. Use short, simple, direct sentences. See https://en.wikipedia.org/wiki/Wikipedia:Screenshots_of_Wikipedia for information on how to upload new screenshots. Use a copy of https://www.mediawiki.org/wiki/Help:Sample_page if you need to make screenshots that show non-template content.
  1. Contact your mentor to have your corrections and additions to the documentation reviewed. If there is something that you don't know how to fix, then leave a note on the talk page with a description of the problem.

Hours (integer) to complete the task: 5 hours

Beginner task? Probably not (it's a less-technical task, but it will probably take too long for a beginner)

Event Timeline

@SalixAlba, do you have any interest in this? The list of templates that have TemplateData at en.wp hasn't been updated/compared to the list of common templates for a while.

I've now updated the list at https://en.wikipedia.org/wiki/Wikipedia:TemplateData/List well over 1000 templates have now had template data added. There are still plenty of high use templates yet to do.

Thanks or creating this Phabricator task!
I assume this should/could be a "cloneable" task on the GCI site?
Who would mentor this? Mooeypoo? Someone else, or additional mentors? Thanks in advance for clarifying!

Yes! Sorry, I will be mentoring this cloneable task. I am still trying to figure out how to add it to the Google Code-in system.

Did I get the templatedatas right? Are they complete now?

I'm not exactly familiar with the templates or officially involved with this, but I'll give it a shot:

  • Infobox Cyclist: looks OK except for the DoB alias
  • Goal: I'm sorry but this isn't even close. The actual template only uses implied/numbered parameter names, not explicit names like your TemplateData has. The "goal" parameter in the documentation does not exist at all; the "minute" parameter is actually implied parameters 1, 3, 5, 7, 9, 11, 13, 15, 17, and 19; and the "notes" parameter is actually implied parameters 2, 4, 6, 8, 10, 12, 14, 16, 18, and 20.
  • National football squad player: Again rather messed up. For starters, none of the aliases you defined exist, with the exception of "player"/"name", where "name" is the actual parameter and "player" does not exist. For the parameter names, "No." should be "no"; "Pos." : "pos"; "Player" : "name"; "DoB/Age" : "age"; the rest are right but might need to be lowercase and the alias for "clubnat" does not exist.
  • Football squad player: all seems right except for "No." which should be "no" and have its alias removed.
  • Football box: I think all the aliases need to be removed as they do not seem to be present in the template. Also the ordering seems to be off.

Additionally, all of them could probably use better "human-readable" names (the first column in the table).

Thanks for all the pointers!
I tried to fix as many as I could

Additionally, all of them could probably use better "human-readable" names (the first column in the table).

Does that mean I have to change 'no' to number, 'pos' to position, 'currentteam' to current team.

Thanks for all the pointers!
I tried to fix as many as I could

Additionally, all of them could probably use better "human-readable" names (the first column in the table).

Does that mean I have to change 'no' to number, 'pos' to position, 'currentteam' to current team.

No no, the parameters in the TemplateData should be the actual parameter names, not some other version for human-readability, so just make sure these are the parameters used in the template (which it seems they are). The "human readable" part should come from the description of the parameter -- that is what the user will see while they are filling in the template dialog in VisualEditor, so the explanation there should be clear to help the users use them. Don't change the parameter names...

@Mooeypoo
yeah, I was thinking the same, the parameters aren't supposed to be human-readable.

I'm talking about the TemplateData "label" parameter, which is the "display name" for the template parameter, which is different from the actual template parameter name. In the GUI editor, the actual parameter name is "Name", the alternate parameter names are "Aliases", and the display name/label/human-readable name is "Label". The last is what I am thinking of.

@Mooeypoo if the above 5 templates are perfect, shall we move onto to some more?

Remaining to do:

  • Goal: I'm sorry but this isn't even close. The actual template only uses implied/numbered parameter names, not explicit names like your TemplateData has. The "goal" parameter in the documentation does not exist at all; the "minute" parameter is actually implied parameters 1, 3, 5, 7, 9, 11, 13, 15, 17, and 19; and the "notes" parameter is actually implied parameters 2, 4, 6, 8, 10, 12, 14, 16, 18, and 20
  • National football squad player: ... "Player" : "name"; "DoB/Age" : "age" ...

Additionally, all of them could probably use better "human-readable" names (the first column in the table).

Well, I have to say I give up on the goal template, I am unable to understand it.

Moriel, my mentor for the GCI told me that

What you're working on is "TemplateData" which is the machine-readable format.

So, I don't think it needs to be human-readable

National football squad player parameters need not be changed, they should be the same as the ones in the actual template.

I've fixed up the goal template. Template data is not a good fit when it uses many positional parameters basically you want to do something like

"params": {

		"1": {
			"label": "minutes 1",
			"description": "Time the first goal was scored. ",
			"example": "15, 90+2",
			"type": "string",
			"suggested": true
		},
		"2": {
			"label": "note 1",
			"description": "Note for first goal. The following notes will automatically be wikilinked: o.g., pen., p and corner.",
			"example": "o.g., pen., p, corner",
			"type": "string",
			"suggested": true
		},

with one item for each positional parameter, making twenty items in all. There is a bug somewhere for handling such sequences in a nicer method.

National football squad player parameters need not be changed, they should be the same as the ones in the actual template.

Check the template code (and examples), the template clearly uses "name" and "age", not "Player" and "DoB/Age"

@Jay8g aahhh, right, I was looking it from the actual table (displayed one), not the code.

This was specifically a Google-Code-In-2015 task which is over now, hence closing as declined.