Page MenuHomePhabricator

[Epic] Autonames increment 1: Replace the :n pattern with a human-readable default
Open, Needs TriagePublic

Description

Context

In the first increment of the autoname improvements, we want to replace the :n reference naming pattern with a human-readable default name generated from a MediaWiki message key.

User Story

As a Wikipedia editor,

I want auto-generated reference names to be readable instead of cryptic :n values,

so that I can better understand and reuse references.

Requirements
  • Ideally the fallback reference name should not be hardcoded, but rather taken from an existing message key.
  • Provide communities a way to configure the fallback to a preferred string (that does not override any exisitng message keys fro references.)
Acceptance Criteria
  • Hide behind a feature flag defaulting to false wgCiteCitationTypeAutonames
  • New auto-generated reference names replace the :n pattern with a human-readable default name.
  • The default reference name is based on a MediaWiki message key (localized per wiki) cite-ve-dialogbutton-reference-title
  • A number is always added at the end of reference name (eg. Reference-1, Reference-2)
  • Each new auto-generated reference increases the number
  • Existing reference names in articles are not changed.
  • Reference names are visible after saving and reloading VisualEditor, switching from VE wikitext, or when reviewing changes in the visual diff before saving
  • Communities can override the fallback default string via configuration.
  • Set feature flag to true on test.wiki and beta cluster
Out of Scope
  • Changes to existing reference naming behavior or trigger conditions.
  • Changes to VisualEditor UI for manually naming references.
  • Changes to stored reference names in existing articles.
Open Questions
  • How exactly do communities override the fallback message?
    • Answer: Using the same message key as for the citation type title but with a suffix -autoname
  • How do we normalize the content for the names?
  • Do we normalize names to lowercase?
    • Answer: We're not doing that, names are currently also upper/lower case mix
  • What's the length threshold, and how do we cut?

Event Timeline

Lina_Farid_WMDE renamed this task from [Epic] Autonames: Replace the :n pattern with a human-readable default to [Epic] Autonames increment 1: Replace the :n pattern with a human-readable default.Jun 25 2026, 7:42 AM