Merge lp://staging/~adeuring/launchpad/js-translation-2 into lp://staging/launchpad
Status: | Merged |
---|---|
Approved by: | Abel Deuring |
Approved revision: | no longer in the source branch. |
Merged at revision: | 12718 |
Proposed branch: | lp://staging/~adeuring/launchpad/js-translation-2 |
Merge into: | lp://staging/launchpad |
Prerequisite: | lp://staging/~adeuring/launchpad/js-translation |
Diff against target: |
471 lines (+326/-21) 3 files modified
lib/lp/translations/browser/sourcepackage.py (+84/-9) lib/lp/translations/browser/tests/test_sharing_details.py (+235/-1) lib/lp/translations/templates/sourcepackage-sharing-details.pt (+7/-11) |
To merge this branch: | bzr merge lp://staging/~adeuring/launchpad/js-translation-2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gavin Panella (community) | Approve | ||
Review via email: mp+55575@code.staging.launchpad.net |
Commit message
[r=allenap][bug=732639][incr] prepare the translation sharing settings page for YUIfication
Description of the change
This branch finishes the prepeataion of the translation sharing
settings page for source packages for its "YUIfication".
The page now always includes links to the translation configuration
page of the upstream product and to the translation sync page of
the upstream series. If no packaing link exists, i.e., if no
upstream product series is defined, a dummy link is rendered.
The second change of lib/lp/
(@@ -140,10 +142,10 @@) mimics the change from a branch submitted
by Henning earlier today which follows William's reminder to properly
use structured() when HTML data is generated in view class methods.
The third change (@@ -155,12 +157,13 @@) applies this reminder to
another method. This change is not strictly necessary, since the
text was already passed through cgi.escape(), but I think we should
be consistent in the way we generate HTML data in a view class.
The fourth hunk (@@ -339,10 +342,10 @@) lets anther method use
structured().
The two latter changes are a bit questionable, because they let
structured() expand an href attribute, which eequries in theory
a special treatment of characters like '"', '<', '>', but I
don't think this is a real issue, because we insert only Launchpad
URLs, and AFAIK we don't use these characters anywhere.
test: ./bin/test translations -vvt test_sharing_
no lint
Looks good :)
[1]
In getConfigureTra nslationsLink( ):
+ url = '%s/%s' % (canonical_ url(product) , settings_ link.target)
Could this be achieved with:
url = canonical_ url(product, view_name= settings_ link.target)
?
There's similar code in getTranslationS ynchronisationL ink().
[2]
+ view = SourcePackageTr anslationSharin gDetailsView( quest() )
+ self.sourcepackage, LaunchpadTestRe
+ view.initialize()
It's not a huge saving, and you might well already know about it, but views.create_ initialized_ view is a useful helper that does
lp.testing.
this for you.