Follow-up task to T285869: Add error handling for the undocumented parameter input
After implementing following the requirements in the above tickets, a few cases were discovered where the error messages might be confusing. This ticket updates the language of the error messages and when they are shown.
Currently possibly confusing behavior:
When an alias is used in the wikitext, the label (if existing is shown). If no label exists, then the alias (? or is it the name as in the template code) is shown. This causes:
- If a user tries to add the alias, the duplicate error is shown instead of the alias message.
- If a user tries to add the label, the alias instead of the duplicate error is shown.
Possible fix:
- Always show the alias if used in the wikitext (also provides consistency is switching back and forth)
Requirements
TBD after some investigation by @ECohen_WMDE and discussion with @Lena_WMDE
Suggestion as of https://gerrit.wikimedia.org/r/c/mediawiki/extensions/VisualEditor/+/720991/2/i18n/ve-mw/en.json:
- "Cannot add two parameters of the same name." → "Cannot add the parameter "$2" twice."
- "This parameter is already available for use. Please check the options in the sidebar." → "The parameter "$2" is already available for use. Please check the options in the sidebar."