Page MenuHomePhabricator

[DRAFT] Adjust messages for special alias edge cases
Closed, InvalidPublic

Description

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."

Event Timeline

Change 720991 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/VisualEditor@master] [WIP] Improve messages about duplicate template parameters

https://gerrit.wikimedia.org/r/720991

Change 720991 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Improve messages about duplicate template parameters

https://gerrit.wikimedia.org/r/720991

T309198: Label aliases as aliases (VE dialog) This change resolves the problem, so fixes in this ticket no longer apply.