I can't upload firefox po files

Asked by Denis on 2008-07-30


I have a problem uploading po files for Firefox.

I download a template from Rosetta, fullfilled it et upload it.

Rosetta was unable to import the file because of errors in its format:

PO file: duplicate msgid ending on line 65

I checked my file with msgfmt -c and had a lot of duplicate msgid.

I patiently corrected the file. And tried again to upload it.

Rosetta was unable to import it because I removed the tag it use to mark files exported from

Launchpad. Where did I ?

What's the way to comply to msgfmt -c and the Rosetta requirements to upload file ?

For infos here's the br.xpi (sources),

here's the fullfilled file downloaded from Rosetta

and here's the file I changed to comply with the "msgfmt -c" command


Thank you for your attention,

Question information

English Edit question
Launchpad itself Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Alexander Sack (asac) said : #1

firefox support in rosetta is still under development. For now the only way to import firefox translation is to import .xpi files.

So if you want to edit the .po file you exported you first need to transform it to a .xpi and then upload that instead of the .po

The tool to transform the .po to .xpi files lives in a bzr branch:


It lacks good documentation as its ment as an intermediate solution on our way to export .xpi files directly from launchpad.

However, a community member as written a wiki page on "how to test your translations":


You can use that to get the idea how to produce the .xpi files which you could then import.

Denis (bibar) said : #2

I tried to upload the br.xpi above-mentioned.
And it returns an error :
Line 1: Invalid content: u'PK\x03\x04'
It seems to have expected a po file.
Does it means that i have from my xpi to unpack it, to copy the lines in my po file, to runpo2xpi and upload this xpi ? Ga bu zo meu ?

Launchpad Janitor (janitor) said : #3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Jeroen T. Vermeulen (jtv) said : #4

I'm sorry about the delay; it looks like I lost a batch of notification emails two weeks ago.

Jeroen T. Vermeulen (jtv) said : #5

The "invalid content" is clearly the beginning of a zip archive, which is what an xpi file is. So this does look like something was expecting text and got a binary file instead.

What exactly gave you this error? The upload, or the conversion script?

Denis (bibar) said : #6

The link in my first message is the br.xpi i tried to upload. It does'nt come a converted po file. I made it from a breton translation of FF3 for Windows. I made it handly, zipped with file-roller.
The error i received from Rosetta is not more precise.
I don't think it comme from the upload, but have no argument.

Jeroen T. Vermeulen (jtv) said : #7

I tried uploading the br.xpi on the "staging" demo server, and it worked fine. Maybe I did something different. Could you give me the exact URL of the page where you tried to upload this file?

Denis (bibar) said : #8

And I think i tried for xulrunner too. Wasn't the good place ?

Jeroen T. Vermeulen (jtv) said : #9

Thanks, I've reproduced it now! The importer believes that it's a PO file. It actually tells us so: there's a small text saying it's expecting a .po file. That's a leftover from the time when the only kinds of files it would ever see were .po and .pot—and uploading a .pot to a translation doesn't make sense. I'm converting this to a bug.

Meanwhile, does it work if you upload to the template, instead of specifically to the Breton translation? Try it here: https://translations.launchpad.net/ubuntu/hardy/+source/firefox-3.0/+pots/firefox/+upload

Denis (bibar) said : #10

Sorry, logged in as Denis ARNAUD I don't have permission to access this page.

Jeroen T. Vermeulen (jtv) said : #11

I'm sorry. The problem seems to be that you previously uploaded a gettext file, and now the format is sort of "sticking" to that format. I re-uploaded your file from the other form, so it should be fixed now.

Denis (bibar) said : #12

Thanks a lot !
If you can do the same for xulrunner, it would perfect.

Jeroen T. Vermeulen (jtv) said : #13

Same translation file, I take it? And do you mean xulrunner or xulrunner-1.9?

Denis (bibar) said : #14

Same br.xpi (link above), for xulrunner-1.9 !
Thank you !

Jeroen T. Vermeulen (jtv) said : #15


Denis (bibar) said : #16

Thanks a lot !

Tran Vinh Tan (vinhtantran) said : #17


I have the same problem now.

Jeroen, could you change my uploaded translation to valid type too? I have just uploaded a firefox 3.0 gettext, you can see in my queue.


Jeroen T. Vermeulen (jtv) said : #18

Tran Vinh Tan: I see the gettext file in the queue, but where is the XPI file you want to upload?