mastodon/app/javascript
Sasha Sorokin cb2adaaf9d
Replace shortNumberFormat with <ShortNumber> (#14061)
This commit introduces new utility component - ShortNumber. It should
work almost the same way as original shortNumberFormat function,
though it also localizes units and accepts one more prop - renderer.

Renderer is a function that takes rendered short formatted number
and also ready-to-pluralize number to format display result accordingly.
Ready-to-pluralize number allows to correctly select plural for
compactly notated numbers, respecting thousands and other units.

Issue #12451 accurately describes the issue with using raw numbers
when replacing counter with short version. In short, it doesn't work
with languages such as Russian, that require different plurals,
according to the unit number was compacted to.

All previous usages of shortNumberFormat were replaced with new
function, and as it became unused, it was removed to avoid misleading.
2020-07-06 14:27:32 +02:00
..
fonts Redesign the landing page, mount public timeline on it (#4122) 2017-07-11 15:27:59 +02:00
images Fix keybase config serializer (#13742) 2020-05-12 15:28:29 +02:00
mastodon Replace shortNumberFormat with <ShortNumber> (#14061) 2020-07-06 14:27:32 +02:00
packs Fix lock icon not being shown when locking account in profile settings (#14190) 2020-07-01 13:51:50 +02:00
styles Add color extraction for audio thumbnails (#14209) 2020-07-05 18:28:25 +02:00