Yeah, someone else already mentioned that. We could include a
translation key for units in the AV localization - that shouldn't be a
problem as long as it's backwards compatible. Regarding the
inconsistency: Yes, that's intentional because that's the way it
always used to be in Rails.

If you want to patch it yourself, I guess you could just open a ticket
in the Rails Lighthouse. Just make sure that you cover it well with
tests.
Otherwise I could implement it tomorrow or on Monday. I don't know why
but my patches tend to be accepted! ;-)

On Sep 13, 5:06 pm, Christian Lescuyer <[EMAIL PROTECTED]>
wrote:
> number_to_human_size() is not localized. Is there something to do
> right now?
>
> There are a number of problems:
>
> 1) The units are hardcoded in the method
>
> STORAGE_UNITS = %w( Bytes KB MB GB TB ).freeze
>
> 2) The units are inconsistent
> %w( B KB MB GB TB ) ie unit symbols
> %w ( Bytes kilobytes megabytes etc) ie unit names
>
> 3) There is a test for values < 1024 with another harcoded "Byte".
> This somehow solves issue (2)
>
>  pluralize(number.to_i, "Byte") if number.to_i < 1024
>
> I've written a patch, but I'm not quite sure what to do with issue
> (2).
>
> Christian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"rails-i18n" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rails-i18n?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to