Hi!
During translation I found that plural forms are handled this way (settings_gui.c):
...printf(..., _("%u source%s"), val, (val != 1) ? "s" : "");
Gettext provides a better solution by
char * ngettext(const char *MSGID1, const char *MSGID2, unsigned long int N)
char * dngettext (const char *DOMAIN, const char *MSGID1,
const char *MSGID2, unsigned long int N)
char * dcngettext (const char *DOMAIN, const char *MSGID1,
const char *MSGID2, unsigned long int N, int CATEGORY)
I would suggest handling plural forms according to the gettext docs.
For example instead of
gtk_label_printf(
GTK_LABEL(lookup_widget(main_window, "label_dl_running_count")),
_("%u source%s"), val, (val != 1) ? "s" : "");
using
gtk_label_printf(
GTK_LABEL(lookup_widget(main_window, "label_dl_running_count")),
ngettext("%u source", "%u sources", val), val);
I would also suggest to simplify the more complicated conditions like in
gm_snprintf(set_tmp, sizeof(set_tmp), _("%u/%u download%s"),
active, running, (1 == running && 1 == active) ? "" : "s");
, because that way ngettext could be used, either breaking up this into two,
or using the first figure to decide wether it is plural or not.
By making these changes, .po files need to be extended with the line
"Plural-Forms: nplurals=1; plural=0;" for Hungarian,
"Plural-Forms: nplurals=2; plural=n>1;" for French,
"Plural-Forms: nplurals=2; plural=n != 1;" for Dutch and Spanish.
Bye:
Peti
NOTE: I sent this message (above) 2 days ago. I wonder what happened to it.
Dec 8 17:53:48 sutty sendmail[15273]: hB8Gran0015271: to=<[EMAIL PROTECTED]>,
delay=00:00:11, xdelay=00:00:11, mailer=esmtp, pri=31876, relay=mail.sourceforge.net.
[66.35.250.206], dsn=2.0.0, stat=Sent (OK id=1ATOdn-0002E0-1V)
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Gtk-gnutella-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel