Page MenuHomePhabricator

Check different formating of references on wikis
Open, Needs TriagePublic

Description

The output of <ref> tags and the <references> section is customizable using MediaWiki messages. So it might make sense to keep an eye open on what's done in the wild to these outputs. And ideally we have a good reflection of what's going on in production on the beta cluster.

See Help:Cite#Customization

Event Timeline

I had a closer look at the remaining messages.

cite_references_link_many_format_backlink_labels
Makes it possible to customize the backlink labels "a b c …". So far this is a legitimate use of the i18n system, in my opinion. It might be possible to replace it with CSS counters in the future, but I'm not sure if this is even worth it.

cite_references_link_many_sep
cite_references_link_many_and
Used as separators between said backlink labels. Both are nothing but a single space character by default. The possibility to customize them is barely used anywhere, neither via translatewiki nor locally in the wikis. We can possibly removed this altogether after consultation with the (very few) communities.

cite_reference_link
The central message that makes the little [1] in the text.

  • 4 wikis (ar.wikisource, es.wiktionary, it.wikisource, vec.wikisource) remove the square brackets.
  • 1 wiki (es.wikipedia) adds a zero width space (U+200B) at the end. It's unclear why and if this even does anything.
  • 12 wikis replace the &#91; entities with plain square brackets wrapped in <nowiki>. This is most certainly meaningless. The original message in the code was changed away from <nowiki> in 2016 via https://gerrit.wikimedia.org/r/277893. The local overrides are all older and most certainly use <nowiki> only because they have never been updated. We should feel free to fix this inconsistency.
  • 9 wikis wrap the square brackets in extra <span> to be able to style them individually, different from the number.

At least 2 overrides (es.wikiquote, pl.wikipedia) can be removed right now because they don't contain any meaningful change.

cite_references_link_one
cite_references_link_many
The central messages that make the list items. Needs separate investigation.

cite_references_link_many_format
As of now 92 wikis use the message for a series of different customizations:

  • 85 wikis replace the parameter $2 with $3. 25 wikis don't do anything but that. This possibility to use an "alternate backlink label" is an intentional feature that exists since 2005, see commit 800e7821. We would need to provide an alternative to that, or possibly make it the default behavior.
  • 70 wikis flip the order of the <sup> and <a> elements. The explanation is that this order was actually changed in the original code in 2007, but these messages never updated. The code change is explained in T8906. Since most users don't have the "Link underlining" preference enabled this has almost no consequence. It's more a technical bugfix. We should be free to apply it everywhere.
  • A lot of wikis change the styling, e.g. add a padding (1 wiki), make the text smaller (1 wiki), bold (3 wikis), italics (4 wikis), or bold and italics the same time (51 wikis). This can very easily be replaced with CSS, but needs coordination with the communities. The selector .mw-cite-backlink that makes this possible exists since 2012, see T34626.
  • 3 wikis remove the <sup> HTML, namely fr.wikipedia, fr.wiktionary, and sv.wikipedia. I suspect this is done for styling purposes and can probably as well be done with CSS.

3 wikis can delete their local copy right now because it is identical with the default (except for the flipped order of the <sup>, see above): ka.wikipedia, eo.wikipedia, bs.wiktionary.