Merge lp://staging/~adeuring/launchpad/js-translation into lp://staging/launchpad

Proposed by Abel Deuring
Status: Rejected
Rejected by: Abel Deuring
Proposed branch: lp://staging/~adeuring/launchpad/js-translation
Merge into: lp://staging/launchpad
Diff against target: 617 lines (+437/-67)
3 files modified
lib/lp/translations/browser/sourcepackage.py (+130/-3)
lib/lp/translations/browser/tests/test_sharing_details.py (+275/-35)
lib/lp/translations/templates/sourcepackage-sharing-details.pt (+32/-29)
To merge this branch: bzr merge lp://staging/~adeuring/launchpad/js-translation
Reviewer Review Type Date Requested Status
Graham Binns (community) code Approve
Review via email: mp+55309@code.staging.launchpad.net

Commit message

[r=gmb][bug=732639][incr] Include all status variants in the translation sharing status page; select the current settings via CSS; use the correct icons for "link branch to series"/"change linked branch"; include dummy links to the branch config page even if no packaging links exists.

Description of the change

This branch prepares the translation sharing status page for
"YUIfication" (on which Aaron is working).

The page shows texts like "Translation sharing configuration is
incomplete" / "Translation sharing with upstream is active" and
similar texts for the four configuration steps required to enabled
translation sharing.

The base idea for the YUIfication is to always include all text
variants, but to hide the "wrong" texts via CSS.

This is implemented by browser class properties like
packaging_incomplete_class, packaging_complete_class,
branch_incomplete_class etc.

If an upstream product series has no source code branch set, we
want a link to the branch configuration page showing the "add"
icon (the one with the "plus" symbol), while we want a link with
the "edit" icon (showing a pencil) for the same target, if a
branch is already defined.

The former link is shown together with the text "No source branch
exists for the upstream series"; the latter link is shown together
with the text "Upstream source branch is...". As already
mentioned, we want to render both variants, regardless, if a
branch is already configured or not. For two reasons, this cannot
be done with the usual
tal:replace="structure productseries/menu:overview/set_branch/fmt:icon"

1. The link lp.registry.browser.productseries.\
   ProductSeriesOverviewMenu.link_branch automatically uses
   the "add" icon, if no branch is defined, and it uses the
   "edit" icon, if a branch is configured. But we want the
   "edit" icon for the "Change branch" varaint, even if at rendering
   time no branch is defined.
2. We cannot use the link at all, if no packaging link is defined
   when the page is rendered, because its target is not yet known.

Hence the links are created by the browser class properties
new_branch_link and change_branch_link.

Similar changes are still missing for the links to configure
upstream translations and upstream translation synchronisation,
but the diff for this branch is already large enough, so I'll
add this in a follow-up branch.

test: ./bin/test translations -vvt test_sharing_details

no lint.

To post a comment you must log in.
Revision history for this message
Graham Binns (gmb) :
review: Approve (code)

Unmerged revisions

12579. By Abel Deuring

back out Javascript related stuff

12578. By Abel Deuring

devel merged

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.