Merge lp:~jtv/launchpad/recife-kill-updatetranslation-1 into lp:~launchpad/launchpad/recife
| Status: | Merged |
|---|---|
| Approved by: | Graham Binns on 2010-11-16 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 9194 |
| Proposed branch: | lp:~jtv/launchpad/recife-kill-updatetranslation-1 |
| Merge into: | lp:~launchpad/launchpad/recife |
| Diff against target: |
436 lines (+152/-128) 7 files modified
lib/lp/translations/browser/tests/test_translationmessage_view.py (+100/-1) lib/lp/translations/browser/tests/translationmessage-views.txt (+0/-97) lib/lp/translations/interfaces/potmsgset.py (+6/-0) lib/lp/translations/model/potmsgset.py (+18/-8) lib/lp/translations/model/translatablemessage.py (+2/-3) lib/lp/translations/tests/test_potmsgset.py (+2/-4) lib/lp/translations/tests/test_translatablemessage.py (+24/-15) |
| To merge this branch: | bzr merge lp:~jtv/launchpad/recife-kill-updatetranslation-1 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Graham Binns (community) | code | 2010-11-16 | Approve on 2010-11-16 |
|
Review via email:
|
|||
Commit Message
Replace some updateTranslation calls.
Description of the Change
= Kill updateTranslation, Part 1 =
In our Recife feature branch we're finally getting rid of the convoluted monstrosity that is POTMsgSet.
In this branch I remove a few uses of updateTranslation from non-test code, though not yet all. Here's a quick walk-through of the diff:
TestResetTransl
Then, you'll notice my stub implementation of getCurrentTrans
What follows is mostly replacing calls to old-style methods with ones to new-style methods.
The tests at the end may confuse you. We renamed some old TranslationMessage attributes to is_current_ubuntu and is_current_upstream respectively, but the automated replacements didn't always leave us with the right one of the two—especially for upstream-side translations, which is what the LaunchpadObject
To test this, it's really not good enough to run anything less than:
{{{
./bin/test -vvc lp.translations
}}}
The Q/A will happen along with the rest of the feature branch. I did some lint checks, but at the moment (after commit & push) "make lint" says it doesn't detect any changes so I can't produce a final listing.
Jeroen

From IRC:
<gmb> jtv: Please add some comments or docstrings to the start of your unit test functions. Other than that, r=me.