mirror of
https://github.com/kikobar/mastodon.git
synced 2024-11-17 04:32:22 +00:00
Fix unusual number formatting in some locales (#17929)
* Fix unusual number formatting in some locales Fixes #17904 * Fix typo
This commit is contained in:
parent
39b489ba4c
commit
0a8a0fb599
|
@ -19,8 +19,11 @@ module ApplicationHelper
|
|||
# is looked up from the locales definition, and rails-i18n comes with
|
||||
# values that don't seem to make much sense for many languages, so
|
||||
# override these values with a default of 3 digits of precision.
|
||||
options[:precision] = 3
|
||||
options[:strip_insignificant_zeros] = true
|
||||
options = options.merge(
|
||||
precision: 3,
|
||||
strip_insignificant_zeros: true,
|
||||
significant: true
|
||||
)
|
||||
|
||||
number_to_human(number, **options)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue