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 123528 - Plural forms handling
Plural forms handling
Status: RESOLVED FIXED
Product: gtranslator
Classification: Other
Component: Generally bug'd
HEAD
Other Linux
: Normal major
: 2.0
Assigned To: gtranslator-maint
gtranslator-maint
Depends on:
Blocks:
 
 
Reported: 2003-09-30 03:25 UTC by Ross Golder
Modified: 2009-02-01 11:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Vital Khilko's 1.1 patch for plurals (103.38 KB, patch)
2005-09-20 08:35 UTC, Ross Golder
none Details | Review
plural patch (14.66 KB, patch)
2008-03-11 23:16 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review

Description Ross Golder 2003-09-30 03:25:59 UTC
Plural forms support is lacking in a few areas. The main issue is the
handling of the 'Plural-Forms' header. Other issues are related to
usability of the gtranslator implementation, as noted by epiotr@use.pl.
Comment 1 Ross Golder 2003-10-01 03:43:15 UTC
Link to thread on mailing list containing Piotr's original report:

http://sourceforge.net/mailarchive/forum.php?thread_id=3208380&forum_id=5924

I will attempt to add plurals to gtranslator in a few places, so we
are familiar with these issues when translating gtranslator itself.

I would also change the status of this bug to ASSIGNED, but bugzilla
seems to be a bit confused atm.
Comment 2 Ognyan Kulev 2004-03-05 16:48:06 UTC
KBabel issues warning when opening file with plural forms.  It's good
if gtranslator also warns users until plural forms are handled.
Comment 3 Ross Golder 2004-08-19 14:30:38 UTC
There is work going on in the 'gettext-hack' branch of CVS. This branch does
away with the current PO file parsing/writing code, and instead uses the gettext
library directly. Internally, all the GtrMsg structures now have pointers to a
gettext-style 'message_ty' struct, instead of members for the various
attributes. The GUI has been updated to display the english text and translation
window in however many GtkTextViews are required to display and edit a plural
forms message, packed into two GtkVBoxes (one for text, one for trans). It
works, in that I can now open a PO file with plurals, view and translate any
plural messages and save the file successfully.

As it relies on a slightly hacked 'gettext' (patch has been submitted upstream),
and has undergone fairly extensive surgery, there will now be a period whereby I
tie up all the main arteries to prevent segfaults and wait for the patch to be
integrated upstream and a new official gettext released with the required
patches. Then, I will roll it all back into HEAD and we can start making
releases based on it.

The gettext patch
(http://www.golder.org/~rossg/pub/gtranslator/gettext-CVS-error-handling-20040812.patch)
is against gettext CVS (http://sources.redhat.com/gettext/). As at now, I still
have to purge all the 'error(_at_line)' and 'abort' calls from gettext
write_po.c and friends, as errors writing the PO file will inadvertently
terminate the gtranslator process :)
Comment 4 Ross Golder 2004-11-18 02:17:22 UTC
Progress update - Bruno Haible (gettext author/maintainer) has created a
pre-release of gettext-0.15, including an updated API (in gettext-po.h) that
allows us to read, modify and write po files. CVS HEAD now makes use of this new
API. Read the INSTALL.CVS file.

However, at time of writing, I still haven't resolved some issues with the GUI,
so CVS HEAD still needs some love.
Comment 5 Reinout van Schouwen 2005-04-20 13:06:33 UTC
Any progress on this?
Comment 6 Ross Golder 2005-06-17 16:55:08 UTC
I've just reviewed a patch that was submitted. It basically works, but it needs
more love before it can be committed to the stable branch. I'll try to get it
attached to this bug report shortly, so more it gets some more exposure.
Comment 7 Lior Kaplan 2005-09-16 20:24:04 UTC
Can you attach the patch?
Comment 8 Ross Golder 2005-09-20 08:35:54 UTC
Created attachment 52423 [details] [review]
Vital Khilko's 1.1 patch for plurals

I recall having a few issues getting it to apply, and subsequently to compile.
YMMV.
Comment 9 Ignacio Casal Quinteiro (nacho) 2007-08-02 15:15:05 UTC
Well i think now in svn version it is working more or less like in kbabel.
Missing some things:
   * Page_Down should change to next plural form if there are plurals.
   * If i change to translate plural tab should change the original text plural tab.

Anything else?
Comment 10 Ignacio Casal Quinteiro (nacho) 2008-03-11 23:16:45 UTC
Created attachment 107104 [details] [review]
plural patch

This should fix this bug. It needs some improvements like a shortcut to change between plural tabs. But first we need to decide the shortcut we should use.
Comment 11 Christian Kirbach 2008-08-25 23:09:33 UTC
please note that plural support in nacho's git branch works flawless for me.
Comment 12 Ignacio Casal Quinteiro (nacho) 2009-02-01 11:52:59 UTC
This was fixed by me some time ago, so I think this can be closed.