After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 106704 - Please use ngettext for handling plurals in system-monitor
Please use ngettext for handling plurals in system-monitor
Status: RESOLVED FIXED
Product: system-monitor
Classification: Core
Component: general
unspecified
Other All
: High minor
: ---
Assigned To: System-monitor maintainers
System-monitor maintainers
Depends on:
Blocks: 116236
 
 
Reported: 2003-02-21 10:04 UTC by Christian Rose
Modified: 2011-11-11 10:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch. (545 bytes, patch)
2003-09-21 07:29 UTC, Christian Neumair
none Details | Review

Description Christian Rose 2003-02-21 10:04:00 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);
Comment 1 Christian Neumair 2003-09-21 07:29:17 UTC
Created attachment 20155 [details] [review]
Proposed patch.
Comment 2 Kjartan Maraas 2003-09-21 11:57:49 UTC
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?
Comment 3 Christian Neumair 2003-09-21 12:35:42 UTC
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
Comment 4 Christian Rose 2003-09-30 08:22:14 UTC
Can we have this isue revisited now?
Comment 5 Kevin Vandersloot 2003-12-31 18:38:32 UTC
Patch looks good to me. Please commit Christian. Thanks!
Comment 6 Christian Neumair 2004-01-02 17:04:19 UTC
Done. Closing.

regs,
 Chris