https://bugzilla.wikimedia.org/show_bug.cgi?id=51074
Web browser: ---
Bug ID: 51074
Summary: TemplateData should include enumeration type
Product: VisualEditor
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Unprioritized
Component: Editing Tools
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
Classification: Unclassified
Mobile Platform: ---
A lot of templates have arguments that are effectively enumeration types. Using
the singlechart template from English Wikipedia as an example, the first
argument has a limited range of actual values: things like UKrock, UKdance,
UKdownload, Billboardhot100, etc. The template is structured as a switch
statement that only does anything useful if it recognises the chart name.
Otherwise, it just spits out a big red error message.
It would be good if I could encode that in the template data, something like
"1":
{
"label": "Chart identifier",
"description": "Chart name: recognized values are listed at",
"type": "enum",
"values":
{
"UKrock", "UKdance", "UKdownload", "Billboardhot100"
}
"required": true
}
The template edit should then not allow freeform text entry while entering the
template. Instead, it should provide a menu selection that only allows the
editor to enter one of the recognized values.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l