Page MenuHomePhabricator

don't use space as a thousands separator around the globe on the wikipedia.org portal
Closed, ResolvedPublic

Description

A usual space is used a thousands separator for all languages around the globe at wikipedia.org.

This is a problem for several reasons:

  • In RTL languages, this shows the digits in the wrong order, even after resolving T122053, so Hebrew shows "000 203" instead of "203 000".
  • Some languages use different separators, such as 203,000 or 203'000.
  • Some languages, including some variants of English, separate by two digits, instead of three. E.g., in India, it's common to write a million as "1,00,000".

The first problem is the most acute. It can be easily resolved by replacing the space with nbsp.

But resolving the other issues would be good as well, by using a real i18n library that inserts a separator according to locale.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
debt subscribed.

I believe we've fixed the RTL issues with the number display, however, changing the regular space to a nbsp would be a good thing to do.

wikipedia_portal_rtl_fixed-number-display.png (535×595 px, 86 KB)

debt triaged this task as Medium priority.Mar 17 2017, 10:19 PM

I chose another fix, which is to wrap the number and the symbol + in a DOM element, and force that element to be displayed LTR.

The single replacement of spaces with   would still cause the symbol + to be displayed on the wrong side.
Ex: +536 000 instead of 536 000+

That said, I agree with @Amire80 in the mid/long term: resolving the other issues would be good as well, by using a real i18n library that inserts a separator according to locale.

debt claimed this task.
debt moved this task from Backlog to Done on the Discovery-Portal-Sprint board.

Late to close this, but it's been all good to go for a while now.

Screen Shot 2017-08-24 at 10.25.13 AM.png (356×460 px, 98 KB)