Merge lp://qastaging/~benji/launchpad/bug-903532 into lp://qastaging/launchpad

Proposed by Benji York
Status: Merged
Approved by: Benji York
Approved revision: no longer in the source branch.
Merged at revision: 14639
Proposed branch: lp://qastaging/~benji/launchpad/bug-903532
Merge into: lp://qastaging/launchpad
Diff against target: 161 lines (+117/-1)
3 files modified
database/schema/security.cfg (+1/-0)
lib/lp/translations/model/pofilestatsjob.py (+18/-0)
lib/lp/translations/tests/test_pofilestatsjob.py (+98/-1)
To merge this branch: bzr merge lp://qastaging/~benji/launchpad/bug-903532
Reviewer Review Type Date Requested Status
Benji York (community) Approve
Review via email: mp+86820@code.qastaging.launchpad.net

Commit message

[r=benji] make POFile statistics update jobs also update the stats for related POFiles

Description of the change

Bug 903532 is about a task that was thought to have been done, but half
still needed to be done. This branch does the other half.

The root issue is that when updating the statistics for a POFile, any
POFiles that share translations with the original POFile need to be
updated as well.

The new code (in pofilestatsjob.py) simply loops over all the POFiles
that share translations with the POFile associated with the job and, if
the languages match, updates their statistics as well.

The tests can be run with this command:

    bin/test -c -m lp.translations.tests.test_pofilestatsjob

QA:

1) Note the statistics for the translations listed in bug 904012 (a
   related bug)
2) Make a suggestion for one of those translations
3) Get webops to run cronscripts/run_jobs.py pofile_stats
4) Check to see if both the statistics for the translation you changed
   were updated as well as the statistics for the shared translation

Lint: the "make lint" report is clean.

To post a comment you must log in.
Revision history for this message
Benji York (benji) wrote :

This MP is for a bug-fix version of the branch that failed QA. The fix
wasn't involved (see discussion on [1]_ for full details) so I'm just
self-reviewing the changes.

.. [1] https://code.launchpad.net/~benji/launchpad/bug-903532/+merge/86426

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.