Page MenuHomePhabricator

Inconsistency in thousands separator between superscripts and reference list
Closed, ResolvedPublic

Description

If there are more than 1000 references on a page (for example, the current version of the COVID-19 pandemic article, the superscripts will have thousands separators. However, the reference list at the bottom does not have the thousands separator.

In my opinion, the thousands separators don't add to the readability of the superscripts, and they should be removed. This is probably also the easiest solution technically, because there doesn't seem to be an easy way to tell browsers to format a HTML list with thousands separators (and there could be localization issues, where the client-side localization might use another thousands separator than the server-side localization that's currently used).

Event Timeline

Aklapper renamed this task from Mismatch in thousands separator between superscripts and reference list to Inconsistency in thousands separator between superscripts and reference list.May 27 2020, 11:02 AM
matmarex subscribed.

The thousands separator is almost certainly unintentional, probably no developer has ever tested using 1000 references on a single page… and the default in MediaWiki is to format numbers with language-specific digits and thousands separators.

Change 599129 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/Cite@master] Do not add thousands separators when formatting reference numbers

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

Of all the ways in which COVID could have impacted us, this was one the most outlandish.
Thanks @matmarex for publishing a fix and including a unit test (perhaps the largest unit test ever).

Change 599129 merged by jenkins-bot:
[mediawiki/extensions/Cite@master] Do not add thousands separators when formatting reference numbers

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

Thanks @Huji. I'm not sure if the size of the test is something to be proud of, but it seemed difficult to simulate having 1000 references without actually writing them out ;)

@thiemowmde I'm not sure what are your workflows within the team, do you want to review or test this or something, or should we close the task?

Just monitoring. You can close it. :-)

@matmarex here, size matters!

Closing as resolved.

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

[mediawiki/extensions/Cite@master] Replace extremely slow parser test with fast unit tests

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

Change 941428 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Replace extremely slow parser test with fast unit tests

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