GNOME Bugzilla – Bug 307560
Should use ngettext for a string
Last modified: 2005-06-14 15:09:58 UTC
#: ../src/gs-lock-plug.c:239 #, c-format msgid "About %ld seconds left" Using ngettext here to handle the plural would be nice ;-) (yes, I know that there's only one case when it's not plural)
There is some documentation on the ngettext function at http://www.ccr.jussieu.fr/ccr/Documentation/Calcul/gettext/ngettext.3.html but i don't really understand how to implement this. I tried this : message = g_strdup_printf (_(ngettext ("About %ld second left", "About %ld seconds left", n), n), is it ok? it is said that we need to pass the integer (n in this case) to the g_strdup_printf function. How can I do that?
Created attachment 47755 [details] [review] proposed patch I added the ngettext thing. I couldn't test the patch so please test it before commiting.
Comment on attachment 47755 [details] [review] proposed patch Thanks for the patch. There are only a few minor things wrong with it. - the spacing isn't consistent with the rest of the code - secs_remaining should be a long type - secs_remaining is a little bit too verbose, secs will suffice
Committed with those minor changes. Thanks! 2005-06-14 William Jon McCann <mccann@jhu.edu> * src/gs-lock-plug.c (monitor_progress): Use ngettext to handle plurals. Fixes #307560. Based on patch by Thierry Moisan <thierryn@videotron.ca>