French translation does not export properly for miro due to launchpad corruption

Asked by Geoffrey Lee

The French translation does not export nor import properly for Miro due to it being somehow mixed with Galician strings.

The project page is here:

https://translations.launchpad.net/democracy

I believe the data stored in launchpad must have somehow gotten corrupted, leading it to neither export nor import properly. Initially, the headers were wrong too, it stated that the translation file was for Limewire and the translation was Galician. Looking into a broken exported po file it seems there are some French strings initially and then there are some Limewire strings in Galician, it seems that the po file for Miro has been munged with the one for Limewire.

I tried importing a raw po file for French from the last known good export by uploading it. That fixed the headers, but there are still Galician strings inside it. For example, try searching for "Help", it should be Aide in French. There are many other cases where the translation is incorrect too.

can someone help?

I think we just want to revert to a last known good file for French (without all the Galician strings and Limewire related material).

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
Данило Шеган Edit question
Solved by:
Данило Шеган
Solved:
Last query:
Last reply:
Revision history for this message
Данило Шеган (danilo) said :
#1

When strings are imported, they are stored in the database as French strings: there is no easy way for us to know if something should be French or not.

If all strings were previously translated to French but are remaining in Galician even after you re-imported a correct PO file, then that's a serious regression we'd need to fix.

If you are seeing the above problem, please attach a last known-good French PO file and we can look into what's going on. Do re-open the question when you do that, please.

Revision history for this message
Geoffrey Lee (geoffl) said :
#2

I think currently there are two problems here:

Initially we discovered the French translation was broken, because when we downloaded it it was in Galician, and also it was the incorrect translation, because it was for Limewire. It seems the translation for Miro and Limewire have been stuck together.

(1) the exported po file still contains some limewire strings and strings in Galician, even though I tried to import a known good French translation into it after updating the revision date to be the more or less the date when I uploaded it.

(2) When I re-export the French translation, it still contains Galician strings, though now it appears they are appended at the back and commented out.

So, at this point, the database obviously still has some Limewire strings in there (though unused) which presumably got carried over from an earlier error, and the French translation is still unusable, because I can't get a clean import to happen, and even then I can't work out what strings need to be fixed because there are hundreds that didn't import properly.

I couldn't find a link to attach any file here. But you can get a copy of a French translation in the miro repository:

http://git.participatoryculture.org/miro/tree/tv/resources/locale/fr.po?h=Miro-4.0&id=eeb66bf08d68d7fe7e18eb7b19faf20c2dd4b8aa

Revision history for this message
Данило Шеган (danilo) said :
#3

Launchpad tries hard to keep what are usually considered "obsolete" translations, because that is usually deemed appropriate (these are commonly strings which were once in the .pot file and translated to a language or two, but are no longer there: gettext terminology for them is "obsolete messages" and they use the #~ prefix in the PO file[1]).

Unfortunately, there is no easy way for you to remove these messages, because that's exactly the point: they get obsoleted once they are removed from the .pot file. They also get exported because that's the only way to get to them, and they stay in the DB because they are used for external suggestions and such.

If you only want to fix obsolete translations so none of the Galician messages are offered as suggestions for French elsewhere, you'd basically need to upload a French Limewire translation to French Miro translation. They'll still get exported as obsolete messages but at least they'll be in French. At the moment, you should not worry about them otherwise, because they will not affect anything other than suggestions.

Now, the problem of you not being able to do an import for French sounds like the most important thing: only suggestion I have there is to try to remove all the obsolete messages (with eg. msgattrib --no-obsolete or simply by removing them from the PO file in a text editor) and then try uploading that. If that works, we at least know there are a few problems in the obsolete messages (because they otherwise need to be correct, they are syntax checked as well, and since they are from a different template, all sorts of stuff could be going on in there).

[1]http://www.gnu.org/software/gettext/manual/gettext.html

Revision history for this message
Geoffrey Lee (geoffl) said :
#4

I don't think this resolves the issue yet. This is what I did:

(1) take the last known good exported French translation, deleted all the old stuff at the back of the file, then updated the Po-Revision-Date to be 2011 07 31. Today is 2011 08 02.

(2) Uploaded the file.

(3) Launchpad came back with errors updating the translation.

For example, it said:

56. "This message was updated by someone else after you got the
translation file. This translation is now stored as a suggestion, if you
want to set it as the used one, go to
https://translations.launchpad.net/democracy/trunk/+pots/democracyplayer/fr/+translate
and approve it.":

#: ../../lib/downloader.py:335 ../../lib/httpclient.py:140
#: ../../lib/httpclient.py:171
msgid "File not found"
msgstr "Fichier introuvable"

And this is what the Launchpad interface says:

English:
File not found
Current French: Le fichier n'existe pas!
Translated and reviewed by renaud chaudoir on 2011-07-05

There were 770 import errors. 772 messages in the whole po file.

And it still does not help the situation, because the French translation is still broken, because for example, when I do a search for "Get help"

English:
Get Help
Current French: Obter axuda
Translated by Marcos Lans on 2011-06-05

(located Located in ../../lib/frontends/widgets/tabcontroller.py:153)

Obter axuda is not French, it is Galician.

This is what the last known French translation has:

#: ../../lib/frontends/widgets/tabcontroller.py:148
msgid "Get Help"
msgstr "Aide"

Is my pot creation date wrong? But I can't use anything newer anyway, because the newer one's broken because it's partially filled with Galician translations.

Revision history for this message
Best Данило Шеган (danilo) said :
#5

Actually, Launchpad tells from X-Launchpad-Export-Date when the file was exported from Launchpad: you need to update that to be newer than the suggestions, or else it will consider translations done in the meantime as submitted in parallel. In your fr.po in the queue, X-Launchpad-Export-Date is in May, so please try updating that to eg. 2011-07-31 or whatever is newer than all the Galician translations.

Revision history for this message
Geoffrey Lee (geoffl) said :
#6

Thanks Данило Шеган, that solved my question.