radar / humanize

Takes your numbers and makes them *fancy*.
MIT License
468 stars 85 forks source link

Discussion: Shouldn't we Use I18n.locale by default? #76

Closed danielolivaresd closed 4 years ago

danielolivaresd commented 4 years ago

Maybe I'm missing something here, but I think that it would be useful if #humanize would use current locale (I18n.locale) by default when available.

One could still change to a different locale on a per-call basis by doing something like:

# the current way
n.humanize(locale: :es)

# or
I18n.with_locale(:es) do
  n.humanize
end

, but I think that if your app/project has I18n, you'll probably want to use the current locale for humanizing numbers most of the times.

If it makes sense, I'd be happy to find some time to submit a PR with a proposal in the next couple of weeks.

radar commented 4 years ago

This library has no dependency on i18n and never will.

danielolivaresd commented 4 years ago

I understand. Thanks.