GNOME Bugzilla – Bug 106704
Please use ngettext for handling plurals in system-monitor
Last modified: 2011-11-11 10:03:55 UTC
#: src/util.c:194 #, c-format msgid "%d bytes" As mentioned in http://developer.gnome.org/doc/tutorials/gnome-i18n/developer.html#plurals, this way of handling plurals is broken for many locales. A way to solve this is by using ngettext instead as mentioned in that document. A simple code example of code using ngettext: g_printf (ngettext ("Found %d file.", "Found %d files.", nbr_of_files), nbr_of_files);
Created attachment 20155 [details] [review] Proposed patch.
Just a quick comment. The last line in the patch, the one after the bit that is relevant for this report was a bit odd. if (fsize < 1024.0) return g_strdup_printf (_("%d K"), (int)fsize); Shouldn't this be Kb or KB or something? I think we need to standardize on *one* way to write KB and MB also kb, Kb, KB kB? :) Maybe this should be put in a separate bug though?
You are right, please file a bug report. This is really Off-Topic. [Kk][Bb] notation should follow this rule (as far as I know): KB = Kilobyte (1024 Bytes) Kb = Kilobit (1024 Bits) kB = Kilobyte (1000 Bytes) kb = Kilobit (1000 Bits) Don't nail me on that! regs, Chris
Can we have this isue revisited now?
Patch looks good to me. Please commit Christian. Thanks!
Done. Closing. regs, Chris