This task defines how communities will get the new naming scheme that replaces ':n'.
We will create a community configuration page for this task that holds a simple 'checkbox' or similar to turn on the feature. The setting can only be edited and saved by community admins.
With this approach, communities would be able to turn on the feature themselves as they please and when they are ready. It enables them to decide whether
- T430052: [Epic] Autonames increment 1: Replace the :n pattern with a human-readable default is sufficient for them, or
- T430052: [Epic] Autonames increment 1: Replace the :n pattern with a human-readable default is to be turned on followed by T430131: [Epic] Autonames increment 2: Support content-based references patterns as soon as their configuration templates are ready, or
- T430131: [Epic] Autonames increment 2: Support content-based references patterns straight away without the interim step provided by T430052: [Epic] Autonames increment 1: Replace the :n pattern with a human-readable default.
This means that the old naming pattern :n will continue to live on some wikis as long as this feature has not been enabled.
Design and copy for Community Configuration page
Name of spcecial page to be used in dashboard: Special:CommunityConfiguration/VisualEditor-ReferenceNames
Link for help button (if possible all links should open in a new window/tab):
https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Cite/VisualEditor_reference_names
Designs
Teaser on Community Configuration Page
User not logged-in
Admin logged-in
Copy
Please use the text below for the copy. Do not use the text in the designs. The designs solely demonstratem the UX elements, formatting, and style.
Updated teaser for the Community Configurations dashboard
VisualEditor content-based reference names
Enable VisualEditor’s content-based reference names to replace the :n pattern with your custom style.
Copy (incl. links and wikitext translation strings):
Content-based reference names make it possible for VisualEditor to generate meaningful and human-readable automatic reference names.
When enabled, content-based reference names replace the current default <code>:n</code> pattern. For more information see the [[mw:Special:MyLanguage/Help:Cite/VisualEditor reference names|help page]].
VisualEditor automatically generated reference names can be customized in two different ways.
[Checkbox Copy: Enable this feature and replace the current <code>:n</code> pattern]
Templates
Create a custom naming template that defines the template parameters, such as author and publication year, to generate the reference names (e.g. <code><ref name="Miller-1998-1"></code>).
Citation Type Names
Create a new <code>-autoname</code> message key to replace default names with alternative strings (e.g. replacing <code>{{int:Cite-ve-dialogbutton-reference-title}}-</code> with <code>reference_</code> or <code>reference</code> generates <code><ref name="reference_1"></code> or <code><ref name="reference1"></code> instead of <code><ref name="{{int:Cite-ve-dialogbutton-reference-title}}-1"></code>).
These two options can be configured outside of this page, some character and customization limitations apply. For more information see the [[mw:Special:MyLanguage/Help:Cite/VisualEditor reference names|help page]].
Default Behavior
If you choose not to customize your own templates or citation type names, automatic reference names based on the citation type, such as <code>{{int:Visualeditor-cite-tool-name-book}}-1</code>, <code>{{int:Visualeditor-cite-tool-name-web}}-1</code> will be generated.
If no citation type can be determined based on [[MediaWiki:Cite-tool-definition.json]], references are named <code>{{int:Cite-ve-dialogbutton-reference-title}}-1</code>, <code>{{int:Cite-ve-dialogbutton-reference-title}}-2</code> etc. Numbering starts at 1 and increments each time a citation type is reused (e.g. a second book citation would appear as <code><ref name="{{int:Visualeditor-cite-tool-name-book}}-2"></code>).
Open tasks
- Move CommunityConfiguration Page behind feature flag $wgCiteCitationTypeAutoNames
- Make the reference-naming logic react to the checkbox instead of the feature flag --> https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Cite/+/1345491
- Create patch demo when all other tasks are done: https://4c5f70450d.catalyst.wmcloud.org/w/
Outcome
We decided for a shorter version to allow cleaner technical implementation and better maintainability. This leads to less flexibility regarding the help text on the config page. The help text is on now mainly on a wiki page with way more context and flexibility.



