GNOME Bugzilla – Bug 172305
Intltool needs to support plural messages in XML
Last modified: 2012-03-16 12:40:22 UTC
Intltool needs to support plural situations in XML, and be able to convert back and forward between a (special, to be agreed upon) XML format for this, and the ngettext-style PO format. See bug 162826 for an example of where this is needed.
I know of g-d-u case, but it's not very easy to do in intltool, and not the least of all the problems is that we'd need a special format which is hard to define, because it adds another dimension to message translation, and that is a "plural form". I think it would be best to do something like the following: <_translate plural="0">File</_translate> <_translate plural="1">Files</_translate> And when translated: <translate plural="0">File</translate> <translate plural="1">Files</translate> <translate xml:lang="sr" plural="0">Datoteka</translate> <translate xml:lang="sr" plural="1">Datoteke</translate> <translate xml:lang="sr" plural="2">Datoteka</translate> ... I'm not sure how suitable this is for gnome-doc-utils, but we'd certainly need to carefully consider attribute name we want to use (it's easy for "xml:lang" since it's already defined). Also, since it's very rare to have pluralizable messages come out of static XML files, I'm not making this a high priority for me to work on.
Any news on this? Appearantly the l10n stylesheets in gnome-doc-utils have standardized on one format (this example taken from the i18n/STYLESHEETS.xhtml file): <msgset xmlns=""http://www.gnome.org/~shaunm/gnome-doc-utils/l10n"> <msgid>Author</msgid> <msg> <msgstr form='0'>Author</msgstr> <msgstr form='1'>Authors</msgstr> </msg> <msg xml:lang="sr"> <msgstr form='0'>Аутор</msgstr> <msgstr form='1'>Аутори</msgstr> <msgstr form='2'>Аутори</msgstr> </msg> </msgset> Shouldn't this be possible to produce from an ordinary, standardized ngettext()-style po message definition, like the following: msgid "Author" msgid_plural "Authors" msgstr[0] "Аутор" msgstr[1] "Аутори" msgstr[2] "Аутори" Resolving this and making intltool understand the gnome-doc-utils plurals format and translate between that and a standard ngettext()-style message format like the above would make translators able to actually off-hand understand the gnome-doc-utils pot file, and make them actually be able to reuse translations from other modules, and would be an overall win by not introducing yet another plural message format besides the already standard ngettext()-style one. Wouldn't that be great?
intltool has switched from the GNOME to the launchpad.net infrastructure nearly three years ago: https://mail.gnome.org/archives/gnome-i18n/2009-April/msg00275.html The intltool product in bugzilla.gnome.org has been deprecated and closed for new bug entry since April 2009. I am now closing all remaining open reports about intltool as NOTGNOME as part of GNOME Bugzilla Housekeeping. Reporter: If the problem that you reported here is still valid in a recent version of intltool we kindly ask you to report it again to https://bugs.launchpad.net/intltool/ so the intltool developers get notified about it.