.po file export doesn't update cached files

Bug #73509 reported by Carlos Perelló Marín
6
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Данило Шеган

Bug Description

Seems like under some situations (I need to debug this problem to know them), the export process doesn't get some updates in the .po file and exports a previous cached value.

Revision history for this message
Carlos Perelló Marín (carlos) wrote :

As confirmed in bug #68014, this happens to others too

Changed in rosetta:
assignee: nobody → carlos
importance: Undecided → Critical
status: Unconfirmed → Confirmed
Revision history for this message
Gustavo A. Díaz (gdiaz) wrote :

Happen to me too, as I've described here: https://launchpad.net/products/rosetta/+bug/68014

Changed in rosetta:
assignee: carlos → danilo
Revision history for this message
Christian Reis (kiko) wrote :

Danilo tells me that he has debugged this and it seems to be caused by the fact that translation approvals don't update the latest submission flag; this particular bug could cause the workflow:

- add good, approved translation
- add poor, approved translation
- revert to old and good translation

to not trigger an update. We're still investigating.

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

It seems not to be as simple as that.

The problem seems to happen with https://translations.launchpad.net/wengophone/trunk/+pots/qtwengophone/es/2/+translate
where:

Current Spanish:
Contraseña:
Translated by: GuS on 2006-09-08 16:20:14 CEST
Reviewed by: GuS on 2006-11-25 20:00:04 CET

But exported value is one of the suggestions instead:

Contraseña:
Coming from: qtwengophone in WengoPhone trunk by GuS on 2006-11-07 14:24:30 CET

I'll probably have to look into poexport cache tables (which I currently don't have privileges to).

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

Ok, the above scenario seems to be required, but not enough. One should also export the file in between 2 and 3, which causes the following logic in database/pofile.py to fail:

    def validExportCache(self):
        ...
        change_time = self.latestsubmission.datecreated
        return change_time < self.exporttime

(in case of qtwengophone/es, self.exporttime is '2006-11-24 19:18:05.808967', i.e. a day before self.latestsubmission.active_selections[x].date_reviewed)

Now I need to create a testcase in sampledata for this.

Changed in rosetta:
status: Confirmed → In Progress
Revision history for this message
Данило Шеган (danilo) wrote :

There's another corner-case to be careful about: if translation is deactivated, there won't be any active_selections, so we should treat cache as invalid in that case.

Revision history for this message
Carlos Perelló Marín (carlos) wrote :

Another corner case for your list:

A .pot file update that doesn't update the .po files. We should invalidate any cached .po file for that template so translators have a chance to get new untranslated strings.

Changed in rosetta:
status: In Progress → Fix Committed
Revision history for this message
Данило Шеган (danilo) wrote :

Ok, I've confirmed this is fixed on edge, and since this is stopping translators from doing their work (i.e. exporting incorrect data), I'd like this cherry-picked.

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

Should be fixed now on production.

Changed in rosetta:
status: Fix Committed → Fix Released
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.