Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently format_size() returns bytes for all cases < 1024. So if size is 1 it will return "1 bytes". This patch fixes it to return "1 byte".
Comment | File | Size | Author |
---|---|---|---|
#3 | format_size_0.patch | 1.01 KB | ChrisKennedy |
format_size.patch | 567 bytes | ChrisKennedy | |
Comments
Comment #1
ChrisKennedy CreditAttribution: ChrisKennedy commentedHmm my < was filtered as html. Here it is again:
Currently format_size() returns bytes for all cases where size < 1024. So if size == 1 it returns "1 bytes". This patch causes it to return "1 byte".
Comment #2
Dries CreditAttribution: Dries commentedThat only works for English, but not for certain other languages. I'm afraid this isn't the proper fix. We have to let the locale module decide this because that is where we keep per-language plural/singular rules.
Comment #3
ChrisKennedy CreditAttribution: ChrisKennedy commentedGood point - how about this?
Comment #4
drummCommitted to HEAD.
Comment #5
(not verified) CreditAttribution: commented