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 133142 - Please use ngettext for handling plurals in GnomeMeeting
Please use ngettext for handling plurals in GnomeMeeting
Status: RESOLVED FIXED
Product: ekiga
Classification: Applications
Component: general
GIT master
Other All
: Normal normal
: ---
Assigned To: Ekiga maintainers
Ekiga maintainers
Depends on:
Blocks: 116236
 
 
Reported: 2004-02-01 18:59 UTC by Danilo Segan
Modified: 2005-12-05 13:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Danilo Segan 2004-02-01 18:59:21 UTC
From bug 116236:
As mentioned in
http://developer.gnome.org/doc/tutorials/gnome-i18n/developer.html#plurals,
the common 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);

These two messages are problematic in GnomeMeeting:

#. Translators: the full sentence is Reject or forward
#. unanswered incoming calls after X seconds
#: src/pref_window.cpp:1030
msgid "Reject or forward unanswered incoming calls after "

#: src/pref_window.cpp:1030
msgid "seconds"

This message also uses crappy string composition, and it will probably be
untranslateable in some languages, so it's generally better to reword it.

String freeze is coming on February 9th, so this needs to be fixed before that.
Comment 1 Damien Sandras 2004-02-01 19:03:21 UTC
Not sure the plural is a problem here as the number of seconds is >
10. However, what other wording do you suggest me in that case?
Comment 2 Danilo Segan 2004-02-01 19:18:00 UTC
--- same old explanation, the one given on referenced page as well ---
Plural *is* the problem here.  Russian, Slovenian, Serbian, Polish,
Croatian, ... all have different word forms that follow numbers,
usually depending on the *last digit* (but it's a bit more complicated
than that, check the referenced page for more info).

So, in Serbian, it would be "1 sekunda", "21 sekunda", "34 sekunde",
"54 sekunde", "75 sekundi"... (three different forms in total:
sekunda, sekunde, sekundi).  Think of something like English "21st",
"42nd" and "53rd" (and not "21th", "42th", "53th").
--- end of same old explanation ---

If you really don't want to make use of ngettext (or it's not
possible, because that call to gnome_prefs_spin_new looks a bit tricky
for this), I suggest wording like:
"Reject or forward unanswered incoming calls after following number of
seconds:"

Thanks for quick response ;)
Comment 3 Damien Sandras 2004-02-09 08:54:30 UTC
Hello, I have been unable to fix this bug in time (except if the 
strings freeze is tonight midnight).

The problem is that the number of seconds is a parameter implemented 
by a spin button, the user can change it, so it means that the label 
should be changed in real-time when the user changes the number of 
seconds.

I had in mind that the HIG recommended to use this kind of wording:
[X] Enable video bandwidth limitation of XXXXX KB/s
instead of
[X] Enable video bandwidth limitation of: XXXX kB/s

I can't find it anymore, so I'm probably wrong. Anyway, this will be 
fixed for 1.2, but if you have comments about the above, feel free to 
tell me. If the freeze is tonight, I can also fix it tonight.
Comment 4 Christian Rose 2004-02-16 17:38:12 UTC
These messages probably also need ngettext:

#: src/ils.cpp:926
#, c-format
msgid "Search completed: %d user(s) listed on a total of %d user(s)
from %s"

#: src/ils.cpp:931
#, c-format
msgid "Search completed: %d user(s) found on %s"
Comment 5 Christian Rose 2004-04-07 10:36:05 UTC
Could we have this fixed in gnomemeeting HEAD?
Comment 6 Damien Sandras 2004-04-07 10:59:25 UTC
The other comments imply that it is far to be trivial to fix as the plural
depends on the value of a GtkSpinButton. I have no easy way to fix it yet, it
will be fixed when I will have a good idea about it that won't force me to keep
global variables in GnomeMeeting just to be able to change the value of a label
in a callback in real-time.

I also think having read in the HIG that:
- Reject the call after X seconds (where X is the parameter)
is generally better than
- Number of seconds before rejecting a call : X

However, in the first case, I don't see how I can use ngettext.



Comment 7 Damien Sandras 2004-04-07 11:02:01 UTC
So to summarize, I only see one solution to the problem, rewording all sentences
where the X influencing the plural form is a parameter that the user can change.

Any comments or tips?
Comment 8 Christian Rose 2004-04-07 11:14:13 UTC
Please note that there are other messages noted in this report that require
ngettext but are not affected by rearrangements of spinboxes and the like.
Comment 9 Abel Cheung 2005-12-05 13:42:47 UTC
How is this going? Looks like this is the last bug blocking bug #116236.
Comment 10 Damien Sandras 2005-12-05 13:53:32 UTC
Yes, sorry. It is fixed since a very long time (except if I forgot something).

Sorry for not watching this. I really need help with bugzilla.