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 149525 - Please use ngettext for handling plural-forms in EOG
Please use ngettext for handling plural-forms in EOG
Status: RESOLVED FIXED
Product: eog
Classification: Core
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: EOG Maintainers
EOG Maintainers
Depends on:
Blocks: 116236
 
 
Reported: 2004-08-06 18:58 UTC by Danilo Segan
Modified: 2005-04-05 19:05 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8



Description Danilo Segan 2004-08-06 18:58:31 UTC
In the first two messages, we need ngettext passed the number used in *second*
%s/%i prior to "pixel" word.

#. Pixel size of image: width x height in pixel
#: libeog/eog-file-selection.c:240
#, c-format
msgid "%s x %s pixel"

#. [image width] x [image height] pixel  [bytes]    [zoom in percent]
#: viewer/eog-image-view.c:549
#, c-format
msgid "%i x %i pixel  %s    %i%%"

This one is straight-forward.

#: shell/eog-window.c:1399
#, c-format
msgid "Do you really want to move %i images to trash?"
Comment 1 Jens Finke 2004-08-16 06:09:59 UTC
There is only one case where 'pixel' means singular case, if the width and
height of the image are both 1. For a 5 x 1 image the singular case would be
wrong. So the *second* number is IMO not sufficient. The best thing would be to
handle the 1x1 dimension as special case in the code. BTW: Does the plural form
'pixels' exist in english?

Fixed the straight-forward thing.
Comment 2 Danilo Segan 2004-08-16 10:00:28 UTC
Jens, that's not correct for all languages. Serbian has 3 forms (instead of
Western-language-like two: singular and plural), and they go basically like this:
 "5 x 1 tačka" or "50 x 21 tačka"
 "5 x 2 tačke" or "50 x 32 tačke"
 "5 x 7 tačaka" or "50 x 27 tačaka"

So, at least for Serbian, it would be required to pluralize on the second
number. Don't know about other languages, but I suspect it's the same in at
least some of them.

For those which shouldn't be pluralized (like English), you may do something like:
  ngettext("%i x %i pixel", "%i x %i pixel", pixelsb);
and translators are free to translate both forms to "singular", if that suits
their language.
Comment 3 Alan Horkan 2004-09-11 12:32:22 UTC
> Does the plural form 'pixels' exist in english?

Yes.  Pixels is definately a valid word in English (and the gimp uses it all
over the place).  
Comment 4 Dafydd Harries 2004-09-12 02:46:04 UTC
There's also this one, which I think is pretty straightforward:

#: shell/main.c:236
#, c-format
msgid ""
"You are about to open %i windows simultaneously. Do you want to open them in "
"a collection instead?"
Comment 5 Danilo Segan 2004-09-12 07:19:29 UTC
Daf, that's in the separate bug report: bug #150636. Since it's
"straight-forward", lets keep it separate so it can be fixed faster.
Comment 6 Jens Finke 2005-04-05 19:05:52 UTC
Fixed in cvs. Hope it's correct now.