Merge lp:~henninge/launchpad/devel-487137-custom-language-codes into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Henning Eggers on 2010-12-22 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 12142 |
| Proposed branch: | lp:~henninge/launchpad/devel-487137-custom-language-codes |
| Merge into: | lp:launchpad |
| Diff against target: |
561 lines (+175/-102) 9 files modified
lib/canonical/launchpad/security.py (+28/-0) lib/lp/translations/browser/configure.zcml (+4/-4) lib/lp/translations/browser/customlanguagecode.py (+10/-1) lib/lp/translations/stories/standalone/custom-language-codes.txt (+108/-91) lib/lp/translations/templates/customlanguagecode-index.pt (+1/-1) lib/lp/translations/templates/customlanguagecode-remove.pt (+18/-0) lib/lp/translations/templates/customlanguagecodes-index.pt (+4/-3) lib/lp/translations/templates/product-portlet-translatables.pt (+1/-1) lib/lp/translations/templates/sourcepackage-translations.pt (+1/-1) |
| To merge this branch: | bzr merge lp:~henninge/launchpad/devel-487137-custom-language-codes |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Curtis Hovey (community) | ui | 2010-12-22 | Approve on 2010-12-22 |
| Jelmer Vernooij (community) | code | 2010-12-22 | Approve on 2010-12-22 |
|
Review via email:
|
|||
Commit Message
[r=jelmer]
Description of the Change
= Summary =
This branch finishes off Adi's branch for the same bug which had
already been approved but was never landed. See the details here:
https:/
Also, the scope changed slightly because management of custom
language codes has now been extendended to project owners and
distribution translation teams respectively, so they can manage these
themselves. Great way to reduce the work load on admins and Launchapd
devs. ;-)
== Proposed fix ==
Remove AdminCustomLang
bug (and a good reason for not landing Adi's branch) as it shadowed
AdminProductTra
product owners. AdminProductTra
to allow access to owners & Rosetta admins.
Add AdminDistributi
launchpad.
to the same persons that have it on the distribution.
Fix AdminCustomLang
distribution translation teams.
Update the page test to show the new behavior.
== Pre-implementation notes ==
I read through the previous mp and saw that it was well done. I did
some experiementing to figure out what was wrong with the branch and
found out about the shadowing issue. I talked to Danilo and we
decided to extendend privileges to project owners.
== Implementation details ==
AdminProductTra
the right thing and are used by the new adapters.
A custom language code can either be linked to a Product or a
DistributionSou
sourcepacakgename), so that the security adapter has to select the
right adapter to forward to.
AdminCustomLang
"distribution" attribute, so it could be used, too.
The test was re-written to use the owner_browser for all actions on a
Product. For the DistributionSou
to be added because its owner will have translation admin privileges
within the distribution. A new translations_
this person.
== Tests ==
bin/test -vvcm lp.translations -t custom-
== Demo and Q/A ==
On launchpad.dev login as <email address hidden> (name12) and go to this
page: https:/
You should see the "define custom language codes" link.
Click on it and play around with the admin interface.
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/canonical
lib/lp/
lib/lp/
lib/lp/
lib/lp/
| Henning Eggers (henninge) wrote : | # |
| Henning Eggers (henninge) wrote : | # |
I just realized that this branch needs a UI review, too. Here is a walk-through with some screen shots.
Starting on a product's translation page as the products owner. You see the link to "define custom languge codes".
http://
Clicking that link will bring you to the listing of custom language codes for this product which is still empty.
http://
Clicking "Add a custom language code" will bring you to the add form.
http://
Now the listing has one entry.
http://
Clicking on the custom code brings up the details page for this code.
http://
And trying to remove it will bring up the removal page.
http://
Almost could have done a screencast ... ;)
| Curtis Hovey (sinzui) wrote : | # |
Hi Henning.
This looks good. I have a question. Why is custom_
| Henning Eggers (henninge) wrote : | # |
Good catch, thank you! Here is a screenshot of the fixed view.
http://

Here is the incremental diff in relation to Adi's branch. This MP is only
about these changes.