mirror of
https://github.com/funamitech/mastodon
synced 2024-12-15 23:28:31 +09:00
cb2adaaf9d
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. |
||
---|---|---|
.. | ||
__tests__ | ||
base64.js | ||
html.js | ||
log_out.js | ||
numbers.js | ||
resize_image.js | ||
scrollbar.js |