about summary refs log tree commit diff
path: root/Gemfile
diff options
context:
space:
mode:
authorSasha Sorokin <dafri.nochiterov8@gmail.com>2020-07-06 19:27:32 +0700
committerGitHub <noreply@github.com>2020-07-06 14:27:32 +0200
commitcb2adaaf9d6c3147de9060132b69933df734d5dc (patch)
treeda4fedc3f48b961788128b1a7d1ece809ae2570c /Gemfile
parentc4f47f59cfa1cc2c5dc349af71deb9011e51e818 (diff)
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.
Diffstat (limited to 'Gemfile')
0 files changed, 0 insertions, 0 deletions