chinwagsocial/app/javascript/mastodon
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
..
actions Add user notes on accounts (#14148) 2020-06-30 19:19:50 +02:00
components Replace shortNumberFormat with <ShortNumber> (#14061) 2020-07-06 14:27:32 +02:00
containers Fix expanded video player issues (#13541) 2020-04-25 12:16:05 +02:00
features Replace shortNumberFormat with <ShortNumber> (#14061) 2020-07-06 14:27:32 +02:00
locales Fix restored words from "toot" to "status" (#14242) 2020-07-06 12:17:33 +02:00
middleware Fix 404 and 410 API errors being silently discarded in WebUI (#13279) 2020-03-28 17:59:45 +01:00
reducers Add user notes on accounts (#14148) 2020-06-30 19:19:50 +02:00
selectors Code style improvements in JavaScript (#13159) 2020-03-08 16:02:36 +01:00
service_worker Code style improvements in JavaScript (#13159) 2020-03-08 16:02:36 +01:00
storage
store Code style improvements in JavaScript (#13159) 2020-03-08 16:02:36 +01:00
utils Replace shortNumberFormat with <ShortNumber> (#14061) 2020-07-06 14:27:32 +02:00
api.js
base_polyfills.js Fix old browsers crashing because of missing finally polyfill in web UI (#13115) 2020-02-18 17:22:44 +01:00
common.js Migrate Rails ujs as required for Rails 6 Upgrade. (#13280) 2020-03-21 03:14:50 +01:00
compare_id.js
extra_polyfills.js
initial_state.js
is_mobile.js
load_keyboard_extensions.js
load_polyfills.js Fix old browsers crashing because of missing finally polyfill in web UI (#13115) 2020-02-18 17:22:44 +01:00
main.js Fix /web redirecting to /web/web in web UI (#13128) 2020-02-22 01:27:34 +01:00
performance.js
ready.js
rtl.js
scroll.js
settings.js
stream.js
test_setup.js Replace to testing-library from enzyme (#14152) 2020-06-29 13:58:07 +02:00
uuid.js