Merge lp:~adiroiban/launchpad/bug-127171 into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Jeroen T. Vermeulen on 2010-02-17 |
| Approved revision: | not available |
| Merged at revision: | not available |
| Proposed branch: | lp:~adiroiban/launchpad/bug-127171 |
| Merge into: | lp:launchpad |
| Diff against target: |
802 lines (+226/-88) 18 files modified
lib/canonical/launchpad/security.py (+23/-9) lib/canonical/launchpad/testing/pages.py (+37/-4) lib/lp/registry/browser/product.py (+4/-2) lib/lp/registry/configure.zcml (+23/-11) lib/lp/registry/interfaces/distribution.py (+2/-2) lib/lp/registry/interfaces/product.py (+5/-5) lib/lp/registry/interfaces/project.py (+5/-4) lib/lp/translations/browser/configure.zcml (+8/-8) lib/lp/translations/browser/distribution.py (+3/-5) lib/lp/translations/browser/potemplate.py (+1/-1) lib/lp/translations/browser/product.py (+6/-6) lib/lp/translations/browser/project.py (+5/-5) lib/lp/translations/browser/translationgroup.py (+3/-4) lib/lp/translations/interfaces/translationgroup.py (+2/-2) lib/lp/translations/stories/translationgroups/46-test-distro-structured-permissions.txt (+1/-1) lib/lp/translations/stories/translationgroups/xx-change-translation-policy.txt (+92/-12) lib/lp/translations/templates/distribution-language-pack-admin-info.pt (+2/-2) lib/lp/translations/templates/hastranslationgroup-portlet-translation-groups-and-permission.pt (+4/-5) |
| To merge this branch: | bzr merge lp:~adiroiban/launchpad/bug-127171 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Jeroen T. Vermeulen (community) | code | 2010-02-16 | Approve on 2010-02-17 |
|
Review via email:
|
|||
Commit Message
+changetranslators becomes +settings, and rosetta admins can access it.
| Adi Roiban (adiroiban) wrote : | # |
| Jeroen T. Vermeulen (jtv) wrote : | # |
Fantastic branch and cover letter. Thanks for all the drive-by cleanups!
Don't worry about those lint reports; pylint gets confused sometimes.
I only have two very minor notes about the changes:
Line 410: I believe our policies nowadays for function, method, and class definitions with parameter lists that don't fit the line is to indent the next line to just behind the opening parenthesis. I hope the spacing comes across here, but:
{{{
409 +class IProject(
410 + ITranslationPol
}}}
...should be:
{{{
409 +class IProject(
410 + ITranslationPol
}}}
That is, ITranslationPolicy should be directly under IProjectPublic.
Line 551: When we wrap lists (of multiple items) to multiple lines, we keep the closing bracket on a line of its own. The last element in the list should have a trailing comma. So:
{{{
546 field_names = [
547 "translationgroup",
548 "translationper
549 - "translation_focus"
550 - ]
551 + "translation_
}}}
...was actually correct apart from the missing comma. It should be:
{{{
546 field_names = [
547 "translationgroup",
548 "translationper
549 - "translation_focus"
549 + "translation_
550 ]
}}}
Very minor comments indeed, but I could think of nothing else. :-)
| Adi Roiban (adiroiban) wrote : | # |
În data de Mi, 17-02-2010 la 09:18 +0000, Jeroen T. Vermeulen a scris:
> Review: Approve code
> Fantastic branch and cover letter. Thanks for all the drive-by cleanups!
>
> Don't worry about those lint reports; pylint gets confused sometimes.
>
> I only have two very minor notes about the changes:
I have fixed and pushed the formating problems.
Can you please put this branch on queue for ec2 testings?
Many thanks!
--
Adi Roiban

= Bug 127171 =
A Translations Expert (or Rosetta Admin, or the other way around) cannot access the "Change translators" page.
For example, if he/she goes to: https:/ /translations. launchpad. net/pmount/ +translations, the Change translators option is shown, but clicking it result in:
Not allowed here
Sorry, you don't have permission to access this page.
You are logged in as [...]
== Proposed fix ==
Allow Rosetta Admins to edit translation options for a project, a product and a distribution.
== Pre-implementation notes ==
After the fix for bug #422056 landed on edge, the Change translator page has been generalized and it does not include only option to change translations.
Talking with Danilo we decided to rename this page to +settings (see bug 516317).
Talking with Danilo, and as noted in the bug comments, Rosetta Experts should have access to both Product and Distribution settings. Translation group owners should not be able to edit project translation settings.
While Ubuntu is the only distribution using Launchpad Translations, the owners of a translation group will have access only to distributions (to help Ubuntu Translations Coordinators) not to projects using that translation group.
Talking with Jeroen, we decided to rename IHasTranslation Group to ITranslationPolicy as it makes more sense.
== Implementation details == ertBrowser( ) to simplify such tests. I have also improved the previous code for creating a translation group owner browser.
Since we are going to add more pagetests for Rosetta Experts, I have added setupRosettaExp
The launchpad. TranslationAdmi n permission was added for IProduct, IProject and IDistribution allowing Launchpad Admin, Rosetta Admins and owners to edit translation related attributes.
I did not touch the code popping in the lint warnings. Any advice for fixing them is much appreciated.
== Tests ==
lp-test -t permission -t policy
== Demo and Q/A ==
Log in as Rosetta admin (ex <email address hidden>).
Go to a product or project translations page: /translations. launchpad. dev/evolution /translations. launchpad. dev/gnome
ie. https:/
https:/
You should see the „Change permissions” link, be able to access the page and change the values from that page.
Same story for a distribution page: /translations. launchpad. dev/ubuntu
https:/
Login as a normal user you should not be able to see the link of edit the page.
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: /launchpad/ security. py /launchpad/ testing/ pages.py registry/ configure. zcml registry/ browser/ product. py registry/ interfaces/ distribution. py registry/ interfaces/ product. py registry/ interfaces/ project. py translations/ browser/ configure. zcml translations/ browser/ distribution. py translations/ browser/ potemplate. py translations/ browser/ product. py translations/ browser/ project. py translations/ browser/ translationgrou p.py translations/ interfaces/ translationgrou p.py translations/ stories/ translation. ..
lib/canonical
lib/canonical
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/