First letter of parameters should be capitalized in template editor
Open, Needs TriagePublic

Description

Steps to reproduce:

  • Add TemplateData without adding a label to the parameters

Expected result:

  • Parameters are shown in the template editor with their first letter capitalized

Actual result:

  • Parameters are shown in the template editor in small caps

In the template documentation, parameters without a label are shown with their first letter capitalized:

https://fr.wikipedia.org/w/index.php?title=Mod%C3%A8le:Infobox_Sportif/Documentation&oldid=140248892#TemplateData

However, this isn't the case in the template editor:

Since this first letter capitalized form is the correct one, this should also be the case in the template editor.

Fixing this would save editors lots of time, by sparing them the highly repetitive task of capitalizing all parameters first letter.

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 1 2017, 8:26 AM
Deskana added a subscriber: Deskana.Sep 5 2017, 7:44 PM

I can't reproduce this problem on the beta cluster. I tried adding Template:Refbegin to a page, and the labels were correctly capitalised.

The JSON defining the TemplateData does not have the labels capitalised (see screenshot below), and they're displayed that way accordingly in VisualEditor. It seems more like the mistake here is that they're shown capitalised on the TemplateData page when they're not capitalised in the JSON.

There's still seems to be something odd going on here though. In the specific example you gave, Modèle:Infobox sportif, the JSON was pretty empty and no aliases were defined for any of the parameters. So, I looked for another example. With Modèle:Lien web, some of the parameter labels were capitalised and others weren't. I dug a bit deeper, and it seems like all the ones that were capitalised did not have an alias that was exactly the same as the label, and all the ones that weren't capitalised had an alias that is the same as the label. That does not seem like a coincidence.

In the below screenshot, we see for example that "Titre de la page" and "Adresse web (URL)" are capitalised, whereas "langue", "site", and "date" are not. If we look at the template data for these parameters, the first two do not have an alias that's the same as the label, and the other three do not.

I don't know what you meant in T174771#3581686, there's no TemplateData for https://simple.wikipedia.beta.wmflabs.org/wiki/Template:Refbegin so of course it can't be reproduced with that template.

I created https://deployment.wikimedia.beta.wmflabs.org/wiki/Template:Infobox_person and could reproduce on https://deployment.wikimedia.beta.wmflabs.org/wiki/Main_Page/sandbox?veaction=edit by adding Template:Infobox_person:

Notice that only Name and Caption are capitalized, because these are the only ones I added a Label to.
However, the other parameters (without label) should be capitalized too by default, to save editors time.

I don't know what you meant in T174771#3581686, there's no TemplateData for https://simple.wikipedia.beta.wmflabs.org/wiki/Template:Refbegin so of course it can't be reproduced with that template.

I tested on the English, not Simple English. There is TemplateData there for that template.

I created https://deployment.wikimedia.beta.wmflabs.org/wiki/Template:Infobox_person and could reproduce on https://deployment.wikimedia.beta.wmflabs.org/wiki/Main_Page/sandbox?veaction=edit by adding Template:Infobox_person:

Yep. Exactly.

Notice that only Name and Caption are capitalized, because these are the only ones I added a Label to.
However, the other parameters (without label) should be capitalized too by default, to save editors time.

Probably, yes.