Page MenuHomePhabricator

Deprecate and remove cite_reference_link footnote mark i18n message that is not actually localized
Open, Needs TriagePublic

Description

User story

As reader and editor I want to see the same custom footnote marker styling on both parser outputs and in VisualEditor

Background

Some messages in the i18n system are not used for actual translations but offer a way to manipulate the DOM structure of HTML the the Cite legacy renderer generates. In many cases this is not compatible with Parsoid parsing and VisualEditor. Customization should if possible, be done using CSS rules that apply to all parsers and the VE UI.

This task deals only with the cite_reference_link footnote mark i18n message which is lightly customized on a handful of wikis.

cite_reference_link

Current default message:
<sup id=\"$1\" class=\"reference\">[[#$2|<span class=\"cite-bracket\">&#91;</span>$3<span class=\"cite-bracket\">&#93;</span>]]</sup>

Purpose:
Renders the superscript footnote marker with square brackets and a link.

Known customizations:
3 sites customize this message to achieve:

  1. Removing square brackets
  2. Smaller font size ( ur.wp message )
  3. Custom margin to the text ( es.wp message & es.wp usages )

4 sites only hold a copy of some version of that message without customization. These could be removed right away from the projects.

Suggested alternatives:

  1. Can be deprecated after T376717: Find a solution for Parsoid read views on projects that prefer `1` over `[1]` is fully deployed. Bracket styling should be applied to .cite-bracket, marker styling should be applied to .reference .
Migration plan

The following general phases can be considered:

  • <span class="cite-bracket"> becomes available by default in all rendering views: legacy parser, parsoid, and visual editor. Remaining work: T376717: Find a solution for Parsoid read views on projects that prefer `1` over `[1]`
  • Site interface admins add new rules which style the brackets as they wish.
  • Site interface admins should remove deprecated messages so that the new Cite HTML structure becomes available.
  • Cite legacy parser stops using the i18n message.

Event Timeline

WMDE-Fisch renamed this task from [Epic] Get rid of Cite footnote mark i18n message that is not actually localized to [Epic] Deprecate and remove Cite footnote mark i18n message that is not actually localized.Mar 6 2025, 4:03 PM
WMDE-Fisch renamed this task from [Epic] Deprecate and remove Cite footnote mark i18n message that is not actually localized to [Epic] Deprecate and remove cite_reference_link footnote mark i18n message that is not actually localized.Mar 25 2025, 9:47 AM
WMDE-Fisch updated the task description. (Show Details)
WMDE-Fisch renamed this task from [Epic] Deprecate and remove cite_reference_link footnote mark i18n message that is not actually localized to Deprecate and remove cite_reference_link footnote mark i18n message that is not actually localized.Mar 25 2025, 10:00 AM
WMDE-Fisch updated the task description. (Show Details)
WMDE-Fisch moved this task from Epics to Ready for pickup on the WMDE-References-FocusArea board.