exported po files lack plural forms in meta

Bug #413632 reported by Kyle Nitzsche
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Invalid
Undecided
Unassigned

Bug Description

Po files exported through Download (email/tarball) have no plural forms information in the meta header but should.

For example, here's a the meta data from a recently downloaded Russian po file:

"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-07 16:54-0400\n"
"PO-Revision-Date: 2009-04-30 13:15-0400\n"
"Last-Translator: knitzsche <email address hidden>\n"
"Language-Team: Russian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"

And here's the header for a standard Russian po file created by msginit -l ru:

"Project-Id-Version: merge_others-aug 2009\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-07 16:54-0400\n"
"PO-Revision-Date: 2009-08-14 10:39-0400\n"
"Last-Translator: knitzsche <email address hidden>\n"
"Language-Team: Russian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"

The lacks of plural forms in the header adds a step (to add it back in) that is easily missed when using Rosetta exports as a basis for external merging/procesing.

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

oops, I pasted the msginit meta header twice. here is the meta produced from rosetta download:

"Project-Id-Version: netbook-remix-launcher\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-05-13 09:55-0400\n"
"PO-Revision-Date: 2009-06-17 17:05+0000\n"
"Last-Translator: Sergei Sedov <email address hidden>\n"
"Language-Team: Russian <email address hidden>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-08-04 08:52+0000\n"
"X-Generator: Launchpad (build Unknown)\n"

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

Some further data:
 * using gettext 0.17-6ubuntu2

"msginit -l ca" ( for Catalan) produces a new ca.po file that *does not* contain plural forms in the meta data.

However, Catalan does appear to use an require plural forms in meta:
"Plural-Forms: nplurals=2; plural=n != 1;\n"

So, it may be that gettext lacks information necessary for some/many languages.

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

As a starting point, I would propose:

 * po files exported by LP/Rosetta should always contain the correct plural forms in the meta data, whether or not there are plural messages (msgids) in the po file
 * If necessary, scripts or other output options could produce po files that do not have this, if it is not supported under different gettext versions
 * gettext msginit should also always add the language specific plural forms to generated po files

In general, if the plural form is *always* present, it enables people to identify problematic po files (for example, where there is a plural msgidand there is no plural form in the header), and encourages adoption of proper plural form usage in software (source strings) and in the translation community. It might also simply logic: always add it instead of checking for plural msgids.

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

gettext 0.17-6ubuntu2 does not add plural-forms to po meta header for the attached. There may be more, but these are ones I know of.

(I realize this is not strictly Rosetta related. But, seamless round-tripping of po files between Rosetta and gettext is the larger issue, so for now I'll note this here.)

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

attached is my current superset of plural-forms in po meta/headers. It is derived from msginit, and where those are missing, from gnome: http://l10n.gnome.org/POT/evolution.master/evolution.master.<language_code>.po

This should *not* be taken as normative.

Steve Magoun (smagoun)
tags: added: oem-services
Revision history for this message
Данило Шеган (danilo) wrote :

As explained to Kyle in person, this is not a bug unless header is absolutely required. Everything will work fine when plural header is missing if there are no plural form messages in the first place.

Changed in rosetta:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.