diff options
author | Yaroslav Markin <yaroslav@markin.net> | 2009-01-01 21:29:11 +0300 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-01-27 09:22:00 -0800 |
commit | 17db28f1ca0597fa1e9abdcacd934ca27d589fb9 (patch) | |
tree | 6c0ff06c86450d4f9cb0224a7786dc80c60b6a50 /actionpack/lib/action_view/locale | |
parent | a1ac635d9655cd26f86593263c3e9b956d330141 (diff) | |
download | rails-17db28f1ca0597fa1e9abdcacd934ca27d589fb9.tar.gz rails-17db28f1ca0597fa1e9abdcacd934ca27d589fb9.tar.bz2 rails-17db28f1ca0597fa1e9abdcacd934ca27d589fb9.zip |
Improve i18n support for number_to_human_size helper:
* now using pluralization properly
* storage unit translations moved to number.human.storage_units.units
* introduced number.human.storage_units.format for languages that do not follow "{{number}} {{unit}}" format (Japanese)
NOTE: I18n table changed, you will need to update your translations.
[#1634 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'actionpack/lib/action_view/locale')
-rw-r--r-- | actionpack/lib/action_view/locale/en.yml | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/locale/en.yml b/actionpack/lib/action_view/locale/en.yml index a880fd83ef..afe35691bc 100644 --- a/actionpack/lib/action_view/locale/en.yml +++ b/actionpack/lib/action_view/locale/en.yml @@ -44,7 +44,18 @@ # separator: delimiter: "" precision: 1 - storage_units: [Bytes, KB, MB, GB, TB] + storage_units: + # Storage units output formatting. + # %u is the storage unit, %n is the number (default: 2 MB) + format: "%n %u" + units: + byte: + one: "Byte" + other: "Bytes" + kb: "KB" + mb: "MB" + gb: "GB" + tb: "TB" # Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words() datetime: |