Merge lp:~adiroiban/launchpad/bug-487137 into lp:launchpad
Status: | Rejected |
---|---|
Rejected by: | Данило Шеган |
Proposed branch: | lp:~adiroiban/launchpad/bug-487137 |
Merge into: | lp:launchpad |
Diff against target: |
402 lines (+108/-57) 9 files modified
lib/canonical/launchpad/security.py (+24/-0) lib/lp/translations/browser/configure.zcml (+3/-3) lib/lp/translations/browser/customlanguagecode.py (+1/-1) lib/lp/translations/stories/standalone/custom-language-codes.txt (+55/-47) 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:~adiroiban/launchpad/bug-487137 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Nelson (community) | code | Approve | |
Review via email: mp+23901@code.launchpad.net |
Commit message
Allow Rosetta Experts to administer custom language codes.
Description of the change
= Bug 487137 =
Now that we have the custom language codes UI (bug 271747), we should allow Translations experts to create and remove custom language codes.
This was always planned, but didn't fit in the original branch.
== Proposed fix ==
Use launchpad.
Allow Launchpad Admin and Rosetta Admin launchpad.
== Pre-implementation notes ==
None yet.
== Implementation details ==
Nothing special.
I don't know what is the best method for testing permission, since all permission checking tests should be done using a Launchpad admins and a Rosetta expert.
'make lint' sometimes gives me > bzr: ERROR: unknown command "pipes"
== Tests ==
lp-test custom-
== Demo and Q/A ==
Login as Rosetta Administrator.
Go to a product or sourcepackage page:
https:/
https:/
You should see a link for defining custom language codes.
Click on the link.
Add a language code.
Click on the new language code.
Remove the language code.
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files:
lib/canonical
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
Hi Adi!
Thanks for yet another branch. The test is failing for me locally, and I've a few typo fixes below. Once they're fixed up, r=me.
Thanks!
On Thu, Apr 22, 2010 at 5:19 AM, Adi Roiban <email address hidden> wrote: language- codes
> Adi Roiban has proposed merging lp:~adiroiban/launchpad/bug-487137 into lp:launchpad/devel.
...
>
> == Tests ==<email address hidden>
>
> lp-test custom-
Running the test results in a failure: pastebin. ubuntu. com/420372/
http://
> /translations. launchpad. dev/evolution /translations. launchpad. dev/ubuntu/ +source/ evolution
> == Demo and Q/A ==
>
> Login as Rosetta Administrator.
> Go to a product or sourcepackage page:
>
> https:/
> https:/
>
> You should see a link for defining custom language codes.
> Click on the link.
> Add a language code.
> Click on the new language code.
> Remove the language code.
Great. Strangely, reverting your security.py change and logging in as <email address hidden> still allows me to create language codes, just not delete them.
I see it's not really part of this branch, but when removing a language there is no text (other than the main heading, breadcrumbs and the remove or cancel options). It looks a bit strange, and any text would just be repeating what the main heading already says, but adding the label to the form might look less strange... see what you think (as it's not part of this branch, I'll leave it up to you).
> === modified file 'lib/canonical/ launchpad/ security. py' launchpad/ security. py 2010-04-18 22:31:40 +0000 launchpad/ security. py 2010-04-22 03:19:15 +0000 interfaces. sprintspecifica tion import ( ation) interfaces. teammembership import ITeamMembership .interfaces. customlanguagec ode import ( Code, IHasCustomLangu ageCodes) .interfaces. translationgrou p import ( upSet) .interfaces. translationimpo rtqueue import ( uageCodes( OnlyRosettaExpe rtsAndAdmins) :
> --- lib/canonical/
> +++ lib/canonical/
> @@ -112,6 +112,8 @@
> from lp.blueprints.
> ISprintSpecific
> from lp.registry.
> +from lp.translations
> + ICustomLanguage
> from lp.translations
> ITranslationGroup, ITranslationGro
> from lp.translations
> @@ -1652,6 +1654,28 @@
> usedfor = ILanguage
>
>
> +class AdminCustomLang
> + """Controls administration of custom language codes.
> +
> + Rosetta expters and Launchpad administrators can admister custom language
s/expters/experts administer
s/admister/
> + codes. TranslationsAdm in' ageCodes uageCode( OnlyRosettaExpe rtsAndAdmins) :
> + """
> +
> + permission = 'launchpad.
> + usedfor = IHasCustomLangu
> +
> +
> +class AdminCustomLang
> + """Controls administration for a custom language code.
> +
> + Rosetta expters and Launchpad administrators can admister a custom
as above.
> + language code. TranslationsAdm in' AuthorizationBa se):
> + """
> +
> + permission = 'launchpad.
> + usedfor = ICustomLanguageCode
> +
> +
> class AccessBranch(
> """Controls visibility of branches.
>
>
> === modified file 'lib/lp/ translations/ stories/ standalone/ custom- language- codes.txt' translations/ stories/ standalone/ custom- language- codes.txt 2010-03-11 20:54:36 +0000 translations/ stories/ standalone/ custom- language- codes.txt 2010-04-22 03:19:15 +0000
> --- lib/lp/
> +++ lib/lp/
....