Merge lp:~edwin-grubbs/launchpad/bug-230801-renewing-membership into lp:launchpad/db-devel
- bug-230801-renewing-membership
- Merge into db-devel
Status: | Merged |
---|---|
Approved by: | Edwin Grubbs |
Approved revision: | not available |
Merged at revision: | not available |
Proposed branch: | lp:~edwin-grubbs/launchpad/bug-230801-renewing-membership |
Merge into: | lp:launchpad/db-devel |
Diff against target: |
949 lines (+296/-79) 39 files modified
lib/lp/archiveuploader/nascentuploadfile.py (+1/-1) lib/lp/archiveuploader/tests/nascentuploadfile.txt (+71/-0) lib/lp/bugs/templates/bug-portlet-subscribers.pt (+1/-1) lib/lp/bugs/templates/bugtarget-filebug-submit-bug.pt (+1/-1) lib/lp/bugs/templates/bugtarget-portlet-bugfilters.pt (+1/-1) lib/lp/bugs/templates/bugtarget-portlet-bugtags.pt (+1/-1) lib/lp/bugs/templates/bugtask-index.pt (+3/-3) lib/lp/bugs/templates/bugtask-tasks-and-nominations-table-row.pt (+1/-1) lib/lp/bugs/templates/bugtasks-and-nominations-table.pt (+1/-1) lib/lp/bugs/templates/official-bug-target-manage-tags.pt (+1/-1) lib/lp/code/templates/branch-import-details.pt (+1/-1) lib/lp/code/templates/branch-index.pt (+1/-1) lib/lp/code/templates/branch-listing.pt (+1/-1) lib/lp/code/templates/branch-portlet-subscribers.pt (+1/-1) lib/lp/code/templates/branch-related-bugs-specs.pt (+1/-1) lib/lp/code/templates/branchmergeproposal-generic-listing.pt (+1/-1) lib/lp/registry/browser/person.py (+4/-1) lib/lp/registry/browser/tests/productrelease-views.txt (+1/-1) lib/lp/registry/templates/object-timeline-graph.pt (+1/-1) lib/lp/registry/templates/person-macros.pt (+1/-1) lib/lp/registry/templates/product-new.pt (+1/-1) lib/lp/registry/templates/productrelease-add-from-series.pt (+1/-1) lib/lp/registry/templates/teammembership-index.pt (+1/-1) lib/lp/registry/templates/timeline-macros.pt (+1/-1) lib/lp/soyuz/templates/archive-edit-dependencies.pt (+1/-1) lib/lp/soyuz/templates/archive-macros.pt (+1/-1) lib/lp/soyuz/templates/archive-packages.pt (+1/-1) lib/lp/soyuz/templates/archive-subscribers.pt (+1/-1) lib/lp/translations/browser/language.py (+8/-0) lib/lp/translations/stories/distroseries/xx-distroseries-templates.txt (+56/-13) lib/lp/translations/stories/productseries/xx-productseries-templates.txt (+27/-18) lib/lp/translations/stories/standalone/xx-language.txt (+68/-7) lib/lp/translations/templates/language-index.pt (+9/-4) lib/lp/translations/templates/object-templates.pt (+20/-3) lib/lp/translations/templates/pofile-export.pt (+1/-1) lib/lp/translations/templates/pofile-translate.pt (+1/-1) lib/lp/translations/templates/translation-import-queue-macros.pt (+1/-1) lib/lp/translations/templates/translationimportqueueentry-index.pt (+1/-1) lib/lp/translations/templates/translationmessage-translate.pt (+1/-1) |
To merge this branch: | bzr merge lp:~edwin-grubbs/launchpad/bug-230801-renewing-membership |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Nelson (community) | code | Approve | |
Review via email: mp+15610@code.launchpad.net |
Commit message
Description of the change
Edwin Grubbs (edwin-grubbs) wrote : | # |
Michael Nelson (michael.nelson) wrote : | # |
> Demo and Q/A
> ------------
>
> * Log in as <email address hidden>
> * Open http://
> * Edit Foo Bar's membership.
> * Set the expiration within 7 days in the future.
> (Surprisingly, you can set the team's admin's membership to expire, and
> before this fix the admin would get the same exception when double
> clicking to renew the membership.)
> * Open http://
> * Double click on the Renew button.
In addition, I had to first set the "invite them to renew their own membership" option on the group before I could renew.
> * Instead of an OOPS, you should the person index page with a notice
> that the membership has been renewed to some time next year.
Nice - I couldn't actually reproduce the problem with Chromium (double-click protection? ;-) , but with Firefox I could.
Not worth worrying about at all, but if you click really really quickly (or perhaps it has to do with the number of clicks and overloading the dev server) you can get more than one notification.
Great! Thanks Edwin.
<EdwinGrubbs> noodles775, al-maisan: can one of you review my tiny branch? https:/
* beuno is now known as beuno-lunch
<noodles775> EdwinGrubbs: sure!
* noodles775 is loving the 4 or 5 liners :)
<noodles775> EdwinGrubbs: is this targeted to db-devel for a reason? (or are you planning on landing it on devel?)
<EdwinGrubbs> noodles775: I'm planning on landing it on devel after pqm opens, and I wanted to prevent merge conflicts later, since devel still didn't have some of the revisions when I started the branch.
* stub has quit ("Leaving.")
<noodles775> k
Preview Diff
1 | === modified file 'lib/lp/archiveuploader/nascentuploadfile.py' | |||
2 | --- lib/lp/archiveuploader/nascentuploadfile.py 2009-11-10 13:09:26 +0000 | |||
3 | +++ lib/lp/archiveuploader/nascentuploadfile.py 2009-12-07 23:15:25 +0000 | |||
4 | @@ -690,7 +690,7 @@ | |||
5 | 690 | tar_checker.ancient_files[first_file]) | 690 | tar_checker.ancient_files[first_file]) |
6 | 691 | yield UploadError( | 691 | yield UploadError( |
7 | 692 | "%s: has %s file(s) with a time stamp too " | 692 | "%s: has %s file(s) with a time stamp too " |
9 | 693 | "far into the future (e.g. %s [%s])." | 693 | "far in the past (e.g. %s [%s])." |
10 | 694 | % (self.filename, len(ancient_files), first_file, | 694 | % (self.filename, len(ancient_files), first_file, |
11 | 695 | timestamp)) | 695 | timestamp)) |
12 | 696 | return | 696 | return |
13 | 697 | 697 | ||
14 | === modified file 'lib/lp/archiveuploader/tests/nascentuploadfile.txt' | |||
15 | --- lib/lp/archiveuploader/tests/nascentuploadfile.txt 2009-07-08 08:38:05 +0000 | |||
16 | +++ lib/lp/archiveuploader/tests/nascentuploadfile.txt 2009-12-07 23:15:25 +0000 | |||
17 | @@ -539,6 +539,77 @@ | |||
18 | 539 | 539 | ||
19 | 540 | == DebBinaryUploadFile == | 540 | == DebBinaryUploadFile == |
20 | 541 | 541 | ||
21 | 542 | DebBinaryUploadFile models a binary .deb file. | ||
22 | 543 | |||
23 | 544 | >>> from lp.archiveuploader.nascentuploadfile import ( | ||
24 | 545 | ... DebBinaryUploadFile) | ||
25 | 546 | >>> ed_deb_path = datadir('ed_0.2-20_i386.deb') | ||
26 | 547 | >>> ed_binary_deb = DebBinaryUploadFile(ed_deb_path, | ||
27 | 548 | ... 'e31eeb0b6b3b87e1ea79378df864ffff', | ||
28 | 549 | ... 15, 'main/editors', 'important', 'foo', '1.2', | ||
29 | 550 | ... ed_mixed_changes, modified_insecure_policy, | ||
30 | 551 | ... mock_logger_quiet) | ||
31 | 552 | |||
32 | 553 | Like the other files it can be verified: | ||
33 | 554 | |||
34 | 555 | >>> list(ed_binary_deb.verify()) | ||
35 | 556 | [] | ||
36 | 557 | |||
37 | 558 | Verification checks that the specified section matches the section in the | ||
38 | 559 | changes file: | ||
39 | 560 | |||
40 | 561 | >>> ed_binary_deb = DebBinaryUploadFile(ed_deb_path, | ||
41 | 562 | ... 'e31eeb0b6b3b87e1ea79378df864ffff', | ||
42 | 563 | ... 15, 'main/net', 'important', 'foo', '1.2', | ||
43 | 564 | ... ed_mixed_changes, modified_insecure_policy, | ||
44 | 565 | ... mock_logger_quiet) | ||
45 | 566 | >>> list(ed_binary_deb.verify()) | ||
46 | 567 | [UploadError('ed_0.2-20_i386.deb control file lists section as | ||
47 | 568 | main/editors but changes file has main/net.',)] | ||
48 | 569 | |||
49 | 570 | It also checks the priority against the changes file: | ||
50 | 571 | |||
51 | 572 | >>> ed_binary_deb = DebBinaryUploadFile(ed_deb_path, | ||
52 | 573 | ... 'e31eeb0b6b3b87e1ea79378df864ffff', | ||
53 | 574 | ... 15, 'main/editors', 'extra', 'foo', '1.2', | ||
54 | 575 | ... ed_mixed_changes, modified_insecure_policy, | ||
55 | 576 | ... mock_logger_quiet) | ||
56 | 577 | >>> list(ed_binary_deb.verify()) | ||
57 | 578 | [UploadError('ed_0.2-20_i386.deb control file lists priority as important | ||
58 | 579 | but changes file has extra.',)] | ||
59 | 580 | |||
60 | 581 | The timestamp of the files in the .deb are tested against the policy for being | ||
61 | 582 | too new: | ||
62 | 583 | |||
63 | 584 | >>> old_only_policy = getPolicy( | ||
64 | 585 | ... name='insecure', distro='ubuntu', distroseries='hoary') | ||
65 | 586 | >>> old_only_policy.can_upload_binaries = True | ||
66 | 587 | >>> old_only_policy.future_time_grace = -5 * 365 * 24 * 60 * 60 | ||
67 | 588 | |||
68 | 589 | >>> ed_binary_deb = DebBinaryUploadFile(ed_deb_path, | ||
69 | 590 | ... 'e31eeb0b6b3b87e1ea79378df864ffff', | ||
70 | 591 | ... 15, 'main/editors', 'important', 'foo', '1.2', | ||
71 | 592 | ... ed_mixed_changes, old_only_policy, | ||
72 | 593 | ... mock_logger_quiet) | ||
73 | 594 | >>> list(ed_binary_deb.verifyDebTimestamp()) | ||
74 | 595 | [UploadError('ed_0.2-20_i386.deb: has 26 file(s) with a time stamp too | ||
75 | 596 | far into the future (e.g. control [Thu Jan 3 19:29:01 2008]).',)] | ||
76 | 597 | |||
77 | 598 | ... as well as for being too old: | ||
78 | 599 | |||
79 | 600 | >>> new_only_policy = getPolicy( | ||
80 | 601 | ... name='insecure', distro='ubuntu', distroseries='hoary') | ||
81 | 602 | >>> new_only_policy.can_upload_binaries = True | ||
82 | 603 | >>> new_only_policy.earliest_year = 2010 | ||
83 | 604 | >>> ed_binary_deb = DebBinaryUploadFile(ed_deb_path, | ||
84 | 605 | ... 'e31eeb0b6b3b87e1ea79378df864ffff', | ||
85 | 606 | ... 15, 'main/editors', 'important', 'foo', '1.2', | ||
86 | 607 | ... ed_mixed_changes, new_only_policy, | ||
87 | 608 | ... mock_logger_quiet) | ||
88 | 609 | >>> list(ed_binary_deb.verify()) | ||
89 | 610 | [UploadError('ed_0.2-20_i386.deb: has 26 file(s) with a time stamp too | ||
90 | 611 | far in the past (e.g. control [Thu Jan 3 19:29:01 2008]).',)] | ||
91 | 612 | |||
92 | 542 | 613 | ||
93 | 543 | == UDebBinaryUploadFile == | 614 | == UDebBinaryUploadFile == |
94 | 544 | 615 | ||
95 | 545 | 616 | ||
96 | === modified file 'lib/lp/bugs/templates/bug-portlet-subscribers.pt' | |||
97 | --- lib/lp/bugs/templates/bug-portlet-subscribers.pt 2009-11-26 03:13:32 +0000 | |||
98 | +++ lib/lp/bugs/templates/bug-portlet-subscribers.pt 2009-12-07 23:15:25 +0000 | |||
99 | @@ -25,7 +25,7 @@ | |||
100 | 25 | <img src="/@@/spinner" /> | 25 | <img src="/@@/spinner" /> |
101 | 26 | </div> | 26 | </div> |
102 | 27 | <script type="text/javascript"> | 27 | <script type="text/javascript"> |
104 | 28 | YUI().use('io-base', 'node', 'bugs.bugtask_index', function(Y) { | 28 | LPS.use('io-base', 'node', 'bugs.bugtask_index', function(Y) { |
105 | 29 | // Must be done inline here to ensure the load event fires. | 29 | // Must be done inline here to ensure the load event fires. |
106 | 30 | // This is a work around for a YUI3 issue with event handling. | 30 | // This is a work around for a YUI3 issue with event handling. |
107 | 31 | var subscription_link = Y.one('.menu-link-subscription'); | 31 | var subscription_link = Y.one('.menu-link-subscription'); |
108 | 32 | 32 | ||
109 | === modified file 'lib/lp/bugs/templates/bugtarget-filebug-submit-bug.pt' | |||
110 | --- lib/lp/bugs/templates/bugtarget-filebug-submit-bug.pt 2009-10-01 12:09:37 +0000 | |||
111 | +++ lib/lp/bugs/templates/bugtarget-filebug-submit-bug.pt 2009-12-07 23:15:25 +0000 | |||
112 | @@ -14,7 +14,7 @@ | |||
113 | 14 | tal:define="lp_js string:${icingroot}/build" | 14 | tal:define="lp_js string:${icingroot}/build" |
114 | 15 | tal:attributes="src string:${lp_js}/bugs/filebug-dupefinder.js"></script> | 15 | tal:attributes="src string:${lp_js}/bugs/filebug-dupefinder.js"></script> |
115 | 16 | <script type="text/javascript"> | 16 | <script type="text/javascript"> |
117 | 17 | YUI().use('base', 'node', 'oop', 'event', 'bugs.dupe_finder', function(Y) { | 17 | LPS.use('base', 'node', 'oop', 'event', 'bugs.dupe_finder', function(Y) { |
118 | 18 | Y.bugs.setup_dupe_finder(); | 18 | Y.bugs.setup_dupe_finder(); |
119 | 19 | }); | 19 | }); |
120 | 20 | </script> | 20 | </script> |
121 | 21 | 21 | ||
122 | === modified file 'lib/lp/bugs/templates/bugtarget-portlet-bugfilters.pt' | |||
123 | --- lib/lp/bugs/templates/bugtarget-portlet-bugfilters.pt 2009-11-04 13:56:17 +0000 | |||
124 | +++ lib/lp/bugs/templates/bugtarget-portlet-bugfilters.pt 2009-12-07 23:15:25 +0000 | |||
125 | @@ -12,7 +12,7 @@ | |||
126 | 12 | <img src="/@@/spinner" /> | 12 | <img src="/@@/spinner" /> |
127 | 13 | </div> | 13 | </div> |
128 | 14 | <script type="text/javascript"> | 14 | <script type="text/javascript"> |
130 | 15 | YUI().use('io-base', 'node', function(Y) { | 15 | LPS.use('io-base', 'node', function(Y) { |
131 | 16 | Y.on('domready', function() { | 16 | Y.on('domready', function() { |
132 | 17 | var portlet = Y.one('#portlet-bugfilters'); | 17 | var portlet = Y.one('#portlet-bugfilters'); |
133 | 18 | Y.one('#bugfilters-portlet-spinner').setStyle('display', 'block'); | 18 | Y.one('#bugfilters-portlet-spinner').setStyle('display', 'block'); |
134 | 19 | 19 | ||
135 | === modified file 'lib/lp/bugs/templates/bugtarget-portlet-bugtags.pt' | |||
136 | --- lib/lp/bugs/templates/bugtarget-portlet-bugtags.pt 2009-11-04 13:56:17 +0000 | |||
137 | +++ lib/lp/bugs/templates/bugtarget-portlet-bugtags.pt 2009-12-07 23:15:25 +0000 | |||
138 | @@ -9,7 +9,7 @@ | |||
139 | 9 | <a id="tags-content-link" | 9 | <a id="tags-content-link" |
140 | 10 | tal:attributes="href context/fmt:url/+bugtarget-portlet-tags-content"></a> | 10 | tal:attributes="href context/fmt:url/+bugtarget-portlet-tags-content"></a> |
141 | 11 | <script type="text/javascript"> | 11 | <script type="text/javascript"> |
143 | 12 | YUI().use('io-base', 'node', function(Y) { | 12 | LPS.use('io-base', 'node', function(Y) { |
144 | 13 | Y.on('domready', function() { | 13 | Y.on('domready', function() { |
145 | 14 | Y.one('#tags-portlet-spinner').setStyle('display', 'block'); | 14 | Y.one('#tags-portlet-spinner').setStyle('display', 'block'); |
146 | 15 | 15 | ||
147 | 16 | 16 | ||
148 | === modified file 'lib/lp/bugs/templates/bugtask-index.pt' | |||
149 | --- lib/lp/bugs/templates/bugtask-index.pt 2009-11-30 17:57:15 +0000 | |||
150 | +++ lib/lp/bugs/templates/bugtask-index.pt 2009-12-07 23:15:25 +0000 | |||
151 | @@ -37,7 +37,7 @@ | |||
152 | 37 | </script> | 37 | </script> |
153 | 38 | </tal:devmode> | 38 | </tal:devmode> |
154 | 39 | <script type="text/javascript"> | 39 | <script type="text/javascript"> |
156 | 40 | YUI().use('base', 'node', 'oop', 'event', 'bugs.bugtask_index', | 40 | LPS.use('base', 'node', 'oop', 'event', 'bugs.bugtask_index', |
157 | 41 | 'code.branchmergeproposal.popupdiff', function(Y) { | 41 | 'code.branchmergeproposal.popupdiff', function(Y) { |
158 | 42 | Y.bugs.setup_bugtask_index(); | 42 | Y.bugs.setup_bugtask_index(); |
159 | 43 | Y.on('load', function(e) { | 43 | Y.on('load', function(e) { |
160 | @@ -155,7 +155,7 @@ | |||
161 | 155 | <img src="/@@/spinner" id="tags-edit-spinner" style="display: none" /> | 155 | <img src="/@@/spinner" id="tags-edit-spinner" style="display: none" /> |
162 | 156 | <a href="+edit" title="Edit tags" id="edit-tags-trigger" class="sprite edit"></a> | 156 | <a href="+edit" title="Edit tags" id="edit-tags-trigger" class="sprite edit"></a> |
163 | 157 | <script type="text/javascript"> | 157 | <script type="text/javascript"> |
165 | 158 | YUI().use('event', 'node', 'bugs.bug_tags_entry', function(Y) { | 158 | LPS.use('event', 'node', 'bugs.bug_tags_entry', function(Y) { |
166 | 159 | // XXX intellectronica 2009-04-16 bug #362309: | 159 | // XXX intellectronica 2009-04-16 bug #362309: |
167 | 160 | // The load event fires very late on bug pages that take a | 160 | // The load event fires very late on bug pages that take a |
168 | 161 | // long time to render, but we prefer to use it since the | 161 | // long time to render, but we prefer to use it since the |
169 | @@ -295,7 +295,7 @@ | |||
170 | 295 | button.style.display = 'none'; | 295 | button.style.display = 'none'; |
171 | 296 | </script> | 296 | </script> |
172 | 297 | <script type="text/javascript"> | 297 | <script type="text/javascript"> |
174 | 298 | YUI().use('lp.comment', function(Y) { | 298 | LPS.use('lp.comment', function(Y) { |
175 | 299 | var comment = new Y.lp.Comment(); | 299 | var comment = new Y.lp.Comment(); |
176 | 300 | comment.render(); | 300 | comment.render(); |
177 | 301 | }); | 301 | }); |
178 | 302 | 302 | ||
179 | === modified file 'lib/lp/bugs/templates/bugtask-tasks-and-nominations-table-row.pt' | |||
180 | --- lib/lp/bugs/templates/bugtask-tasks-and-nominations-table-row.pt 2009-11-03 15:32:31 +0000 | |||
181 | +++ lib/lp/bugs/templates/bugtask-tasks-and-nominations-table-row.pt 2009-12-07 23:15:25 +0000 | |||
182 | @@ -185,7 +185,7 @@ | |||
183 | 185 | class="bugtasks-table-row-init-script" | 185 | class="bugtasks-table-row-init-script" |
184 | 186 | tal:condition="not:view/many_bugtasks" | 186 | tal:condition="not:view/many_bugtasks" |
185 | 187 | tal:content="string: | 187 | tal:content="string: |
187 | 188 | YUI().use('event', 'bugs.bugtask_index', function(Y) { | 188 | LPS.use('event', 'bugs.bugtask_index', function(Y) { |
188 | 189 | Y.on('load', | 189 | Y.on('load', |
189 | 190 | function(e) { | 190 | function(e) { |
190 | 191 | Y.bugs.setup_bugtask_row(${view/js_config}); | 191 | Y.bugs.setup_bugtask_row(${view/js_config}); |
191 | 192 | 192 | ||
192 | === modified file 'lib/lp/bugs/templates/bugtasks-and-nominations-table.pt' | |||
193 | --- lib/lp/bugs/templates/bugtasks-and-nominations-table.pt 2009-09-02 22:13:06 +0000 | |||
194 | +++ lib/lp/bugs/templates/bugtasks-and-nominations-table.pt 2009-12-07 23:15:25 +0000 | |||
195 | @@ -88,7 +88,7 @@ | |||
196 | 88 | </span> | 88 | </span> |
197 | 89 | 89 | ||
198 | 90 | <script type="text/javascript" tal:content="string: | 90 | <script type="text/javascript" tal:content="string: |
200 | 91 | YUI().use('event', 'bugs.bugtask_index', function(Y) { | 91 | LPS.use('event', 'bugs.bugtask_index', function(Y) { |
201 | 92 | Y.on('load', function(e) { | 92 | Y.on('load', function(e) { |
202 | 93 | Y.bugs.setup_me_too(${view/current_user_affected_js_status}); | 93 | Y.bugs.setup_me_too(${view/current_user_affected_js_status}); |
203 | 94 | }, window); | 94 | }, window); |
204 | 95 | 95 | ||
205 | === modified file 'lib/lp/bugs/templates/official-bug-target-manage-tags.pt' | |||
206 | --- lib/lp/bugs/templates/official-bug-target-manage-tags.pt 2009-09-04 17:03:00 +0000 | |||
207 | +++ lib/lp/bugs/templates/official-bug-target-manage-tags.pt 2009-12-07 23:15:25 +0000 | |||
208 | @@ -31,7 +31,7 @@ | |||
209 | 31 | </script> | 31 | </script> |
210 | 32 | <script tal:replace="structure view/tags_js_data" /> | 32 | <script tal:replace="structure view/tags_js_data" /> |
211 | 33 | <script type="text/javascript"> | 33 | <script type="text/javascript"> |
213 | 34 | YUI().use('event', 'bugs.official_bug_tag_management', function(Y) { | 34 | LPS.use('event', 'bugs.official_bug_tag_management', function(Y) { |
214 | 35 | Y.on('domready', function(e) { | 35 | Y.on('domready', function(e) { |
215 | 36 | Y.bugs.setup_official_bug_tag_management(); | 36 | Y.bugs.setup_official_bug_tag_management(); |
216 | 37 | }); | 37 | }); |
217 | 38 | 38 | ||
218 | === modified file 'lib/lp/code/templates/branch-import-details.pt' | |||
219 | --- lib/lp/code/templates/branch-import-details.pt 2009-11-04 13:56:17 +0000 | |||
220 | +++ lib/lp/code/templates/branch-import-details.pt 2009-12-07 23:15:25 +0000 | |||
221 | @@ -32,7 +32,7 @@ | |||
222 | 32 | Try again | 32 | Try again |
223 | 33 | </a> | 33 | </a> |
224 | 34 | <script type="text/javascript"> | 34 | <script type="text/javascript"> |
226 | 35 | YUI().use('event', 'node', function(Y) { | 35 | LPS.use('event', 'node', function(Y) { |
227 | 36 | Y.on("domready", function () { Y.one('#tryagainlink').setStyle('display', 'inline') }); | 36 | Y.on("domready", function () { Y.one('#tryagainlink').setStyle('display', 'inline') }); |
228 | 37 | }); | 37 | }); |
229 | 38 | </script> | 38 | </script> |
230 | 39 | 39 | ||
231 | === modified file 'lib/lp/code/templates/branch-index.pt' | |||
232 | --- lib/lp/code/templates/branch-index.pt 2009-11-17 05:07:41 +0000 | |||
233 | +++ lib/lp/code/templates/branch-index.pt 2009-12-07 23:15:25 +0000 | |||
234 | @@ -47,7 +47,7 @@ | |||
235 | 47 | </tal:devmode> | 47 | </tal:devmode> |
236 | 48 | <script type="text/javascript" | 48 | <script type="text/javascript" |
237 | 49 | tal:content="string: | 49 | tal:content="string: |
239 | 50 | YUI().use('node', 'event', 'widget', 'plugin', 'overlay', | 50 | LPS.use('node', 'event', 'widget', 'plugin', 'overlay', |
240 | 51 | 'lazr.choiceedit', 'code.branchstatus', | 51 | 'lazr.choiceedit', 'code.branchstatus', |
241 | 52 | 'code.branchmergeproposal.popupdiff', | 52 | 'code.branchmergeproposal.popupdiff', |
242 | 53 | function(Y) { | 53 | function(Y) { |
243 | 54 | 54 | ||
244 | === modified file 'lib/lp/code/templates/branch-listing.pt' | |||
245 | --- lib/lp/code/templates/branch-listing.pt 2009-11-04 13:56:17 +0000 | |||
246 | +++ lib/lp/code/templates/branch-listing.pt 2009-12-07 23:15:25 +0000 | |||
247 | @@ -41,7 +41,7 @@ | |||
248 | 41 | } | 41 | } |
249 | 42 | registerLaunchpadFunction(hookUpFilterSubmission); | 42 | registerLaunchpadFunction(hookUpFilterSubmission); |
250 | 43 | 43 | ||
252 | 44 | YUI().use('io-base', 'node', 'json-parse', function(Y) { | 44 | LPS.use('io-base', 'node', 'json-parse', function(Y) { |
253 | 45 | 45 | ||
254 | 46 | function doUpdate(transaction_id, response, args) { | 46 | function doUpdate(transaction_id, response, args) { |
255 | 47 | json_values = Y.JSON.parse(response.responseText); | 47 | json_values = Y.JSON.parse(response.responseText); |
256 | 48 | 48 | ||
257 | === modified file 'lib/lp/code/templates/branch-portlet-subscribers.pt' | |||
258 | --- lib/lp/code/templates/branch-portlet-subscribers.pt 2009-11-04 13:56:17 +0000 | |||
259 | +++ lib/lp/code/templates/branch-portlet-subscribers.pt 2009-12-07 23:15:25 +0000 | |||
260 | @@ -41,7 +41,7 @@ | |||
261 | 41 | string:<script id='milestone-script' type='text/javascript'>" /> | 41 | string:<script id='milestone-script' type='text/javascript'>" /> |
262 | 42 | <!-- | 42 | <!-- |
263 | 43 | 43 | ||
265 | 44 | YUI().use('io-base', 'node', 'code.branchsubscription', function(Y) { | 44 | LPS.use('io-base', 'node', 'code.branchsubscription', function(Y) { |
266 | 45 | 45 | ||
267 | 46 | if(Y.UA.ie) { | 46 | if(Y.UA.ie) { |
268 | 47 | Y.one('#subscriber-list').set('innerHTML', | 47 | Y.one('#subscriber-list').set('innerHTML', |
269 | 48 | 48 | ||
270 | === modified file 'lib/lp/code/templates/branch-related-bugs-specs.pt' | |||
271 | --- lib/lp/code/templates/branch-related-bugs-specs.pt 2009-09-08 21:42:45 +0000 | |||
272 | +++ lib/lp/code/templates/branch-related-bugs-specs.pt 2009-12-07 23:15:25 +0000 | |||
273 | @@ -42,7 +42,7 @@ | |||
274 | 42 | string:<script id='branchlink-script' type='text/javascript'>" /> | 42 | string:<script id='branchlink-script' type='text/javascript'>" /> |
275 | 43 | <!-- | 43 | <!-- |
276 | 44 | 44 | ||
278 | 45 | YUI().use('io-base', 'code.branchlinks', function(Y) { | 45 | LPS.use('io-base', 'code.branchlinks', function(Y) { |
279 | 46 | 46 | ||
280 | 47 | if(Y.UA.ie) { | 47 | if(Y.UA.ie) { |
281 | 48 | return; | 48 | return; |
282 | 49 | 49 | ||
283 | === modified file 'lib/lp/code/templates/branchmergeproposal-generic-listing.pt' | |||
284 | --- lib/lp/code/templates/branchmergeproposal-generic-listing.pt 2009-11-04 13:56:17 +0000 | |||
285 | +++ lib/lp/code/templates/branchmergeproposal-generic-listing.pt 2009-12-07 23:15:25 +0000 | |||
286 | @@ -24,7 +24,7 @@ | |||
287 | 24 | </form> | 24 | </form> |
288 | 25 | <script type="text/javascript"> | 25 | <script type="text/javascript"> |
289 | 26 | 26 | ||
291 | 27 | YUI().use('node', function(Y) { | 27 | LPS.use('node', function(Y) { |
292 | 28 | 28 | ||
293 | 29 | function submit_filter() { | 29 | function submit_filter() { |
294 | 30 | Y.one('#filter_form').submit(); | 30 | Y.one('#filter_form').submit(); |
295 | 31 | 31 | ||
296 | === modified file 'lib/lp/registry/browser/person.py' | |||
297 | --- lib/lp/registry/browser/person.py 2009-11-21 14:45:26 +0000 | |||
298 | +++ lib/lp/registry/browser/person.py 2009-12-07 23:15:25 +0000 | |||
299 | @@ -548,7 +548,10 @@ | |||
300 | 548 | @action(_("Renew"), name="renew") | 548 | @action(_("Renew"), name="renew") |
301 | 549 | def renew_action(self, action, data): | 549 | def renew_action(self, action, data): |
302 | 550 | member = self.context.person | 550 | member = self.context.person |
304 | 551 | member.renewTeamMembership(self.context.team) | 551 | # This if-statement prevents an exception if the user |
305 | 552 | # double clicks on the submit button. | ||
306 | 553 | if self.context.canBeRenewedByMember(): | ||
307 | 554 | member.renewTeamMembership(self.context.team) | ||
308 | 552 | self.request.response.addInfoNotification( | 555 | self.request.response.addInfoNotification( |
309 | 553 | _("Membership renewed until ${date}.", mapping=dict( | 556 | _("Membership renewed until ${date}.", mapping=dict( |
310 | 554 | date=self.context.dateexpires.strftime('%Y-%m-%d')))) | 557 | date=self.context.dateexpires.strftime('%Y-%m-%d')))) |
311 | 555 | 558 | ||
312 | === modified file 'lib/lp/registry/browser/tests/productrelease-views.txt' | |||
313 | --- lib/lp/registry/browser/tests/productrelease-views.txt 2009-09-11 16:00:24 +0000 | |||
314 | +++ lib/lp/registry/browser/tests/productrelease-views.txt 2009-12-07 23:15:25 +0000 | |||
315 | @@ -130,7 +130,7 @@ | |||
316 | 130 | >>> script = find_tag_by_id(view.render(), 'milestone-script') | 130 | >>> script = find_tag_by_id(view.render(), 'milestone-script') |
317 | 131 | >>> print script | 131 | >>> print script |
318 | 132 | <script id="milestone-script" type="text/javascript"> | 132 | <script id="milestone-script" type="text/javascript"> |
320 | 133 | YUI().use(... 'lp.milestoneoverlay'... | 133 | LPS.use(... 'lp.milestoneoverlay'... |
321 | 134 | var milestone_form_uri = '.../app/simple/+addmilestone/++form++'; | 134 | var milestone_form_uri = '.../app/simple/+addmilestone/++form++'; |
322 | 135 | var series_uri = '/app/simple'; | 135 | var series_uri = '/app/simple'; |
323 | 136 | ... | 136 | ... |
324 | 137 | 137 | ||
325 | === modified file 'lib/lp/registry/templates/object-timeline-graph.pt' | |||
326 | --- lib/lp/registry/templates/object-timeline-graph.pt 2009-11-24 09:30:01 +0000 | |||
327 | +++ lib/lp/registry/templates/object-timeline-graph.pt 2009-12-07 23:15:25 +0000 | |||
328 | @@ -32,7 +32,7 @@ | |||
329 | 32 | include_inactive = false; | 32 | include_inactive = false; |
330 | 33 | } | 33 | } |
331 | 34 | 34 | ||
333 | 35 | YUI().use('registry.timeline', 'node', function(Y) { | 35 | LPS.use('registry.timeline', 'node', function(Y) { |
334 | 36 | Y.on('domready', function(e) { | 36 | Y.on('domready', function(e) { |
335 | 37 | if (Y.UA.ie) { | 37 | if (Y.UA.ie) { |
336 | 38 | return; | 38 | return; |
337 | 39 | 39 | ||
338 | === modified file 'lib/lp/registry/templates/person-macros.pt' | |||
339 | --- lib/lp/registry/templates/person-macros.pt 2009-11-04 13:56:17 +0000 | |||
340 | +++ lib/lp/registry/templates/person-macros.pt 2009-12-07 23:15:25 +0000 | |||
341 | @@ -190,7 +190,7 @@ | |||
342 | 190 | condition="private_prefix"> | 190 | condition="private_prefix"> |
343 | 191 | <script type="text/javascript" | 191 | <script type="text/javascript" |
344 | 192 | tal:content="string: | 192 | tal:content="string: |
346 | 193 | YUI().use('node', 'event', function(Y) { | 193 | LPS.use('node', 'event', function(Y) { |
347 | 194 | // Prepend/remove 'private-' from team name based on visibility | 194 | // Prepend/remove 'private-' from team name based on visibility |
348 | 195 | // setting. User can choose to edit it back out, if they wish. | 195 | // setting. User can choose to edit it back out, if they wish. |
349 | 196 | function visibility_on_change(e) { | 196 | function visibility_on_change(e) { |
350 | 197 | 197 | ||
351 | === modified file 'lib/lp/registry/templates/product-new.pt' | |||
352 | --- lib/lp/registry/templates/product-new.pt 2009-11-04 13:56:17 +0000 | |||
353 | +++ lib/lp/registry/templates/product-new.pt 2009-12-07 23:15:25 +0000 | |||
354 | @@ -14,7 +14,7 @@ | |||
355 | 14 | * details widgets until the user states that the project they are | 14 | * details widgets until the user states that the project they are |
356 | 15 | * registering is not a duplicate. | 15 | * registering is not a duplicate. |
357 | 16 | */ | 16 | */ |
359 | 17 | YUI().use('node', 'lazr.effects', function(Y) { | 17 | LPS.use('node', 'lazr.effects', function(Y) { |
360 | 18 | Y.on('domready', function() { | 18 | Y.on('domready', function() { |
361 | 19 | /* These two regexps serve slightly different purposes. The first | 19 | /* These two regexps serve slightly different purposes. The first |
362 | 20 | * finds the leftmost run of valid url characters for the autofill | 20 | * finds the leftmost run of valid url characters for the autofill |
363 | 21 | 21 | ||
364 | === modified file 'lib/lp/registry/templates/productrelease-add-from-series.pt' | |||
365 | --- lib/lp/registry/templates/productrelease-add-from-series.pt 2009-11-04 13:56:17 +0000 | |||
366 | +++ lib/lp/registry/templates/productrelease-add-from-series.pt 2009-12-07 23:15:25 +0000 | |||
367 | @@ -14,7 +14,7 @@ | |||
368 | 14 | <tal:script | 14 | <tal:script |
369 | 15 | replace="structure | 15 | replace="structure |
370 | 16 | string:<script id='milestone-script' type='text/javascript'>" /> | 16 | string:<script id='milestone-script' type='text/javascript'>" /> |
372 | 17 | YUI().use('node', 'lp.milestoneoverlay', function (Y) { | 17 | LPS.use('node', 'lp.milestoneoverlay', function (Y) { |
373 | 18 | 18 | ||
374 | 19 | // This is a value for the SELECT OPTION which is passed with | 19 | // This is a value for the SELECT OPTION which is passed with |
375 | 20 | // the SELECT's "change" event. It includes some symbols that are not | 20 | // the SELECT's "change" event. It includes some symbols that are not |
376 | 21 | 21 | ||
377 | === modified file 'lib/lp/registry/templates/teammembership-index.pt' | |||
378 | --- lib/lp/registry/templates/teammembership-index.pt 2009-11-04 13:56:17 +0000 | |||
379 | +++ lib/lp/registry/templates/teammembership-index.pt 2009-12-07 23:15:25 +0000 | |||
380 | @@ -20,7 +20,7 @@ | |||
381 | 20 | use-macro="context/@@launchpad_widget_macros/yui2calendar-dependencies" /> | 20 | use-macro="context/@@launchpad_widget_macros/yui2calendar-dependencies" /> |
382 | 21 | 21 | ||
383 | 22 | <script type="text/javascript"> | 22 | <script type="text/javascript"> |
385 | 23 | YUI().use('node', 'lp.calendar', function(Y) { | 23 | LPS.use('node', 'lp.calendar', function(Y) { |
386 | 24 | // Ensure that when the picker is used the radio button switches | 24 | // Ensure that when the picker is used the radio button switches |
387 | 25 | // from 'Never' to 'On' and the expiry field is enabled. | 25 | // from 'Never' to 'On' and the expiry field is enabled. |
388 | 26 | Y.on("available", function(e) { | 26 | Y.on("available", function(e) { |
389 | 27 | 27 | ||
390 | === modified file 'lib/lp/registry/templates/timeline-macros.pt' | |||
391 | --- lib/lp/registry/templates/timeline-macros.pt 2009-11-04 13:56:17 +0000 | |||
392 | +++ lib/lp/registry/templates/timeline-macros.pt 2009-12-07 23:15:25 +0000 | |||
393 | @@ -35,7 +35,7 @@ | |||
394 | 35 | if (auto_resize == 'true') { | 35 | if (auto_resize == 'true') { |
395 | 36 | timeline_url += 'resize_frame=timeline-iframe&'; | 36 | timeline_url += 'resize_frame=timeline-iframe&'; |
396 | 37 | } | 37 | } |
398 | 38 | YUI().use('node', function(Y) { | 38 | LPS.use('node', function(Y) { |
399 | 39 | if (Y.UA.ie) { | 39 | if (Y.UA.ie) { |
400 | 40 | return; | 40 | return; |
401 | 41 | } | 41 | } |
402 | 42 | 42 | ||
403 | === modified file 'lib/lp/soyuz/templates/archive-edit-dependencies.pt' | |||
404 | --- lib/lp/soyuz/templates/archive-edit-dependencies.pt 2009-11-12 17:26:17 +0000 | |||
405 | +++ lib/lp/soyuz/templates/archive-edit-dependencies.pt 2009-12-07 23:15:25 +0000 | |||
406 | @@ -62,7 +62,7 @@ | |||
407 | 62 | </div> <!-- launchpad_form --> | 62 | </div> <!-- launchpad_form --> |
408 | 63 | 63 | ||
409 | 64 | <script type="text/javascript"> | 64 | <script type="text/javascript"> |
411 | 65 | YUI().use("node", function(Y) { | 65 | LPS.use("node", function(Y) { |
412 | 66 | 66 | ||
413 | 67 | // Highlight (setting bold font-weight) the label for the | 67 | // Highlight (setting bold font-weight) the label for the |
414 | 68 | // selected option in a given NodesList. Assumes the input is | 68 | // selected option in a given NodesList. Assumes the input is |
415 | 69 | 69 | ||
416 | === modified file 'lib/lp/soyuz/templates/archive-macros.pt' | |||
417 | --- lib/lp/soyuz/templates/archive-macros.pt 2009-11-04 19:59:16 +0000 | |||
418 | +++ lib/lp/soyuz/templates/archive-macros.pt 2009-12-07 23:15:25 +0000 | |||
419 | @@ -10,7 +10,7 @@ | |||
420 | 10 | </tal:comment> | 10 | </tal:comment> |
421 | 11 | 11 | ||
422 | 12 | <script type="text/javascript"> | 12 | <script type="text/javascript"> |
424 | 13 | YUI().use('node', 'io-base', 'lazr.anim', 'soyuz-base', function(Y) { | 13 | LPS.use('node', 'io-base', 'lazr.anim', 'soyuz-base', function(Y) { |
425 | 14 | 14 | ||
426 | 15 | 15 | ||
427 | 16 | /* | 16 | /* |
428 | 17 | 17 | ||
429 | === modified file 'lib/lp/soyuz/templates/archive-packages.pt' | |||
430 | --- lib/lp/soyuz/templates/archive-packages.pt 2009-11-04 13:56:17 +0000 | |||
431 | +++ lib/lp/soyuz/templates/archive-packages.pt 2009-12-07 23:15:25 +0000 | |||
432 | @@ -23,7 +23,7 @@ | |||
433 | 23 | </tal:devmode> | 23 | </tal:devmode> |
434 | 24 | <script type="text/javascript" id="repository-size-update" | 24 | <script type="text/javascript" id="repository-size-update" |
435 | 25 | tal:condition="view/archive_url"> | 25 | tal:condition="view/archive_url"> |
437 | 26 | YUI().use('io-base', 'lazr.anim', 'node', 'soyuz-base', | 26 | LPS.use('io-base', 'lazr.anim', 'node', 'soyuz-base', |
438 | 27 | 'soyuz.update_archive_build_statuses', function(Y) { | 27 | 'soyuz.update_archive_build_statuses', function(Y) { |
439 | 28 | 28 | ||
440 | 29 | 29 | ||
441 | 30 | 30 | ||
442 | === modified file 'lib/lp/soyuz/templates/archive-subscribers.pt' | |||
443 | --- lib/lp/soyuz/templates/archive-subscribers.pt 2009-09-29 07:21:40 +0000 | |||
444 | +++ lib/lp/soyuz/templates/archive-subscribers.pt 2009-12-07 23:15:25 +0000 | |||
445 | @@ -98,7 +98,7 @@ | |||
446 | 98 | </form> | 98 | </form> |
447 | 99 | </div><!-- class="portlet" --> | 99 | </div><!-- class="portlet" --> |
448 | 100 | <script type="text/javascript" id="setup-archivesubscribers-index"> | 100 | <script type="text/javascript" id="setup-archivesubscribers-index"> |
450 | 101 | YUI().use('soyuz.archivesubscribers_index', function(Y) { | 101 | LPS.use('soyuz.archivesubscribers_index', function(Y) { |
451 | 102 | Y.soyuz.setup_archivesubscribers_index(); | 102 | Y.soyuz.setup_archivesubscribers_index(); |
452 | 103 | }); | 103 | }); |
453 | 104 | </script> | 104 | </script> |
454 | 105 | 105 | ||
455 | === modified file 'lib/lp/translations/browser/language.py' | |||
456 | --- lib/lp/translations/browser/language.py 2009-10-31 11:06:44 +0000 | |||
457 | +++ lib/lp/translations/browser/language.py 2009-12-07 23:15:25 +0000 | |||
458 | @@ -29,6 +29,7 @@ | |||
459 | 29 | enabled_with_permission, GetitemNavigation, LaunchpadEditFormView, | 29 | enabled_with_permission, GetitemNavigation, LaunchpadEditFormView, |
460 | 30 | LaunchpadFormView, LaunchpadView, Link, NavigationMenu) | 30 | LaunchpadFormView, LaunchpadView, Link, NavigationMenu) |
461 | 31 | from lp.translations.utilities.pluralforms import make_friendly_plural_forms | 31 | from lp.translations.utilities.pluralforms import make_friendly_plural_forms |
462 | 32 | from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities | ||
463 | 32 | 33 | ||
464 | 33 | from canonical.widgets import LabeledMultiCheckBoxWidget | 34 | from canonical.widgets import LabeledMultiCheckBoxWidget |
465 | 34 | 35 | ||
466 | @@ -202,6 +203,13 @@ | |||
467 | 202 | 203 | ||
468 | 203 | return pluralforms_list | 204 | return pluralforms_list |
469 | 204 | 205 | ||
470 | 206 | @property | ||
471 | 207 | def add_question_url(self): | ||
472 | 208 | rosetta = getUtility(ILaunchpadCelebrities).lp_translations | ||
473 | 209 | return canonical_url( | ||
474 | 210 | rosetta, | ||
475 | 211 | view_name='+addquestion', | ||
476 | 212 | rootsite='answers') | ||
477 | 205 | 213 | ||
478 | 206 | class LanguageAdminView(LaunchpadEditFormView): | 214 | class LanguageAdminView(LaunchpadEditFormView): |
479 | 207 | """Handle an admin form submission.""" | 215 | """Handle an admin form submission.""" |
480 | 208 | 216 | ||
481 | === modified file 'lib/lp/translations/stories/distroseries/xx-distroseries-templates.txt' | |||
482 | --- lib/lp/translations/stories/distroseries/xx-distroseries-templates.txt 2009-10-30 10:09:17 +0000 | |||
483 | +++ lib/lp/translations/stories/distroseries/xx-distroseries-templates.txt 2009-12-07 23:15:25 +0000 | |||
484 | @@ -1,11 +1,15 @@ | |||
486 | 1 | = Templates view for DistroSeries = | 1 | |
487 | 2 | |||
488 | 3 | Templates view for DistroSeries | ||
489 | 4 | =============================== | ||
490 | 2 | 5 | ||
491 | 3 | The +templates view for DistroSeries gives an overview of the translation | 6 | The +templates view for DistroSeries gives an overview of the translation |
492 | 4 | templates in this series and provides easy access to the various subpages of | 7 | templates in this series and provides easy access to the various subpages of |
493 | 5 | each template. | 8 | each template. |
494 | 6 | 9 | ||
495 | 7 | 10 | ||
497 | 8 | == Getting there == | 11 | Getting there |
498 | 12 | ------------- | ||
499 | 9 | 13 | ||
500 | 10 | To get to the listing of all templates, one needs to use the link | 14 | To get to the listing of all templates, one needs to use the link |
501 | 11 | from the distribution series translations page. | 15 | from the distribution series translations page. |
502 | @@ -16,7 +20,45 @@ | |||
503 | 16 | >>> print user_browser.url | 20 | >>> print user_browser.url |
504 | 17 | http://translations.launchpad.dev/ubuntu/hoary/+templates | 21 | http://translations.launchpad.dev/ubuntu/hoary/+templates |
505 | 18 | 22 | ||
507 | 19 | == The templates table == | 23 | The templates table |
508 | 24 | ------------------- | ||
509 | 25 | |||
510 | 26 | Full template listing for a distribution series is reached by following | ||
511 | 27 | a link from the distribution series translations page. | ||
512 | 28 | |||
513 | 29 | >>> anon_browser.open( | ||
514 | 30 | ... 'http://translations.launchpad.dev/ubuntu/hoary') | ||
515 | 31 | >>> anon_browser.getLink('full list of templates').click() | ||
516 | 32 | |||
517 | 33 | Full listing of templates shows source package name, template name and | ||
518 | 34 | the date of last update for this distribution series. | ||
519 | 35 | |||
520 | 36 | >>> table = find_tag_by_id(anon_browser.contents, 'templates_table') | ||
521 | 37 | >>> print extract_text(table) | ||
522 | 38 | Source package Template name Last update | ||
523 | 39 | evolution disabled-template 2007-01-05 | ||
524 | 40 | evolution evolution-2.2 2005-05-06 | ||
525 | 41 | evolution man 2006-08-14 | ||
526 | 42 | mozilla pkgconf-mozilla 2005-05-06 | ||
527 | 43 | pmount man 2006-08-14 | ||
528 | 44 | pmount pmount 2005-05-06 | ||
529 | 45 | |||
530 | 46 | |||
531 | 47 | Logged-in users will see a link from distro series | ||
532 | 48 | >>> user_browser.open( | ||
533 | 49 | ... 'http://translations.launchpad.dev/ubuntu/hoary') | ||
534 | 50 | >>> user_browser.getLink('full list of templates').click() | ||
535 | 51 | |||
536 | 52 | Logged-in users can also choose to download all translations for each | ||
537 | 53 | of the templates. | ||
538 | 54 | |||
539 | 55 | >>> table = find_tag_by_id(user_browser.contents, 'templates_table') | ||
540 | 56 | >>> print extract_text(table) | ||
541 | 57 | Source package Template name Last update Actions | ||
542 | 58 | evolution disabled-template 2007-01-05 Download | ||
543 | 59 | ... | ||
544 | 60 | mozilla pkgconf-mozilla 2005-05-06 Download | ||
545 | 61 | ... | ||
546 | 20 | 62 | ||
547 | 21 | Administrator can see all editing options. | 63 | Administrator can see all editing options. |
548 | 22 | 64 | ||
549 | @@ -28,16 +70,17 @@ | |||
550 | 28 | 70 | ||
551 | 29 | >>> table = find_tag_by_id(admin_browser.contents, 'templates_table') | 71 | >>> table = find_tag_by_id(admin_browser.contents, 'templates_table') |
552 | 30 | >>> print extract_text(table) | 72 | >>> print extract_text(table) |
563 | 31 | Source package Template name Actions | 73 | Source package Template name Last update Actions |
564 | 32 | evolution disabled-template Edit Upload Download Administer | 74 | evolution disabled-template 2007-01-05 Edit Upload Download Administer |
565 | 33 | evolution evolution-2.2 Edit Upload Download Administer | 75 | evolution evolution-2.2 2005-05-06 Edit Upload Download Administer |
566 | 34 | evolution man Edit Upload Download Administer | 76 | evolution man 2006-08-14 Edit Upload Download Administer |
567 | 35 | mozilla pkgconf-mozilla Edit Upload Download Administer | 77 | mozilla pkgconf-mozilla 2005-05-06 Edit Upload Download Administer |
568 | 36 | pmount man Edit Upload Download Administer | 78 | pmount man 2006-08-14 Edit Upload Download Administer |
569 | 37 | pmount pmount Edit Upload Download Administer | 79 | pmount pmount 2005-05-06 Edit Upload Download Administer |
570 | 38 | 80 | ||
571 | 39 | 81 | ||
572 | 40 | == Links to the templates == | 82 | Links to the templates |
573 | 83 | ---------------------- | ||
574 | 41 | 84 | ||
575 | 42 | Clicking on a template name will take the user to that template's overview | 85 | Clicking on a template name will take the user to that template's overview |
576 | 43 | page. | 86 | page. |
577 | 44 | 87 | ||
578 | === modified file 'lib/lp/translations/stories/productseries/xx-productseries-templates.txt' | |||
579 | --- lib/lp/translations/stories/productseries/xx-productseries-templates.txt 2009-10-30 10:09:17 +0000 | |||
580 | +++ lib/lp/translations/stories/productseries/xx-productseries-templates.txt 2009-12-07 23:15:25 +0000 | |||
581 | @@ -1,13 +1,18 @@ | |||
583 | 1 | = Templates view for ProductSeries = | 1 | |
584 | 2 | |||
585 | 3 | Templates view for ProductSeries | ||
586 | 4 | ================================ | ||
587 | 2 | 5 | ||
588 | 3 | The +templates view for ProductSeries gives an overview of the translation | 6 | The +templates view for ProductSeries gives an overview of the translation |
589 | 4 | templates in this series and provides easy access to the various subpages of | 7 | templates in this series and provides easy access to the various subpages of |
590 | 5 | each template. | 8 | each template. |
591 | 6 | 9 | ||
596 | 7 | == Preparation == | 10 | |
597 | 8 | 11 | Preparation | |
598 | 9 | To test the ordering of templates in the listing, we need another template | 12 | ----------- |
599 | 10 | that is new but must appear at the top of the list. | 13 | |
600 | 14 | To test the ordering of templates in the listing, we need another | ||
601 | 15 | template that is new but must appear at the top of the list. | ||
602 | 11 | 16 | ||
603 | 12 | >>> login('foo.bar@canonical.com') | 17 | >>> login('foo.bar@canonical.com') |
604 | 13 | >>> from zope.component import getUtility | 18 | >>> from zope.component import getUtility |
605 | @@ -18,7 +23,9 @@ | |||
606 | 18 | ... name='at-the-top') | 23 | ... name='at-the-top') |
607 | 19 | >>> logout() | 24 | >>> logout() |
608 | 20 | 25 | ||
610 | 21 | == Getting there == | 26 | |
611 | 27 | Getting there | ||
612 | 28 | ------------- | ||
613 | 22 | 29 | ||
614 | 23 | To get to the listing of all templates, one needs to use the link | 30 | To get to the listing of all templates, one needs to use the link |
615 | 24 | from the product series translations page. | 31 | from the product series translations page. |
616 | @@ -30,16 +37,17 @@ | |||
617 | 30 | http://translations.launchpad.dev/evolution/trunk/+templates | 37 | http://translations.launchpad.dev/evolution/trunk/+templates |
618 | 31 | 38 | ||
619 | 32 | 39 | ||
621 | 33 | == The templates table == | 40 | The templates table |
622 | 41 | ------------------- | ||
623 | 34 | 42 | ||
624 | 35 | The page shows a table of all templates and links to their subpages. | 43 | The page shows a table of all templates and links to their subpages. |
625 | 36 | 44 | ||
626 | 37 | >>> table = find_tag_by_id(user_browser.contents, 'templates_table') | 45 | >>> table = find_tag_by_id(user_browser.contents, 'templates_table') |
627 | 38 | >>> print extract_text(table) | 46 | >>> print extract_text(table) |
632 | 39 | Template name Actions | 47 | Template name Last update Actions |
633 | 40 | at-the-top Download | 48 | at-the-top ... Download |
634 | 41 | evolution-2.2 Download | 49 | evolution-2.2 2005-08-25 Download |
635 | 42 | evolution-2.2-test Download | 50 | evolution-2.2-test 2006-12-13 Download |
636 | 43 | 51 | ||
637 | 44 | If an administrator views this page, links to the templates admin page are | 52 | If an administrator views this page, links to the templates admin page are |
638 | 45 | shown, too. | 53 | shown, too. |
639 | @@ -48,13 +56,14 @@ | |||
640 | 48 | ... 'http://translations.launchpad.dev/evolution/trunk/+templates') | 56 | ... 'http://translations.launchpad.dev/evolution/trunk/+templates') |
641 | 49 | >>> table = find_tag_by_id(admin_browser.contents, 'templates_table') | 57 | >>> table = find_tag_by_id(admin_browser.contents, 'templates_table') |
642 | 50 | >>> print extract_text(table) | 58 | >>> print extract_text(table) |
650 | 51 | Template name Actions | 59 | Template name Last update Actions |
651 | 52 | at-the-top Edit Upload Download Administer | 60 | at-the-top ... Edit Upload Download Administer |
652 | 53 | evolution-2.2 Edit Upload Download Administer | 61 | evolution-2.2 2005-08-25 Edit Upload Download Administer |
653 | 54 | evolution-2.2-test Edit Upload Download Administer | 62 | evolution-2.2-test 2006-12-13 Edit Upload Download Administer |
654 | 55 | 63 | ||
655 | 56 | 64 | ||
656 | 57 | == Links to the templates == | 65 | Links to the templates |
657 | 66 | ---------------------- | ||
658 | 58 | 67 | ||
659 | 59 | Clicking on a template name will take the user to that template's overview | 68 | Clicking on a template name will take the user to that template's overview |
660 | 60 | page. | 69 | page. |
661 | 61 | 70 | ||
662 | === modified file 'lib/lp/translations/stories/standalone/xx-language.txt' | |||
663 | --- lib/lp/translations/stories/standalone/xx-language.txt 2009-10-31 11:06:44 +0000 | |||
664 | +++ lib/lp/translations/stories/standalone/xx-language.txt 2009-12-07 23:15:25 +0000 | |||
665 | @@ -1,6 +1,15 @@ | |||
666 | 1 | |||
667 | 2 | |||
668 | 3 | Languages view | ||
669 | 4 | ============== | ||
670 | 5 | |||
671 | 1 | Here is the tale of languages. We will see how to create, find and edit | 6 | Here is the tale of languages. We will see how to create, find and edit |
672 | 2 | them. | 7 | them. |
673 | 3 | 8 | ||
674 | 9 | |||
675 | 10 | Getting there | ||
676 | 11 | ------------- | ||
677 | 12 | |||
678 | 4 | Launchpad Translations has a main page. | 13 | Launchpad Translations has a main page. |
679 | 5 | 14 | ||
680 | 6 | >>> admin_browser.open('http://translations.launchpad.dev/') | 15 | >>> admin_browser.open('http://translations.launchpad.dev/') |
681 | @@ -11,7 +20,12 @@ | |||
682 | 11 | >>> print admin_browser.url | 20 | >>> print admin_browser.url |
683 | 12 | http://translations.launchpad.dev/+languages | 21 | http://translations.launchpad.dev/+languages |
684 | 13 | 22 | ||
686 | 14 | Following the link, there is a form to add new languages. | 23 | |
687 | 24 | Adding new languages | ||
688 | 25 | -------------------- | ||
689 | 26 | |||
690 | 27 | Following the link from the translations main page, there is a form to | ||
691 | 28 | add new languages. | ||
692 | 15 | 29 | ||
693 | 16 | >>> admin_browser.getLink('Add new language').click() | 30 | >>> admin_browser.getLink('Add new language').click() |
694 | 17 | >>> print admin_browser.url | 31 | >>> print admin_browser.url |
695 | @@ -65,11 +79,16 @@ | |||
696 | 65 | ... | 79 | ... |
697 | 66 | LinkNotFoundError | 80 | LinkNotFoundError |
698 | 67 | 81 | ||
700 | 68 | >>> user_browser.open('http://translations.launchpad.dev/+languages/+add') | 82 | >>> user_browser.open( |
701 | 83 | ... 'http://translations.launchpad.dev/+languages/+add') | ||
702 | 69 | Traceback (most recent call last): | 84 | Traceback (most recent call last): |
703 | 70 | ... | 85 | ... |
704 | 71 | Unauthorized:... | 86 | Unauthorized:... |
705 | 72 | 87 | ||
706 | 88 | |||
707 | 89 | Searching for a language | ||
708 | 90 | ------------------------ | ||
709 | 91 | |||
710 | 73 | From the top languages page, anyone can find languages. | 92 | From the top languages page, anyone can find languages. |
711 | 74 | 93 | ||
712 | 75 | >>> browser.open('http://translations.launchpad.dev/+languages') | 94 | >>> browser.open('http://translations.launchpad.dev/+languages') |
713 | @@ -82,7 +101,11 @@ | |||
714 | 82 | >>> print browser.url | 101 | >>> print browser.url |
715 | 83 | http://translations.launchpad.dev/+languages/+index?find=Spanish | 102 | http://translations.launchpad.dev/+languages/+index?find=Spanish |
716 | 84 | 103 | ||
718 | 85 | And following one of the found languages, we can see a brief information | 104 | |
719 | 105 | Read language information | ||
720 | 106 | ------------------------- | ||
721 | 107 | |||
722 | 108 | Following one of the found languages, we can see a brief information | ||
723 | 86 | about the selected language. | 109 | about the selected language. |
724 | 87 | 110 | ||
725 | 88 | >>> browser.getLink('Spanish').click() | 111 | >>> browser.getLink('Spanish').click() |
726 | @@ -128,14 +151,50 @@ | |||
727 | 128 | ...Uruguay... | 151 | ...Uruguay... |
728 | 129 | ...Venezuela... | 152 | ...Venezuela... |
729 | 130 | 153 | ||
731 | 131 | >>> topcontributors_portlet = find_portlet(browser.contents, 'Top contributors') | 154 | >>> topcontributors_portlet = find_portlet( |
732 | 155 | ... browser.contents, 'Top contributors') | ||
733 | 132 | >>> print topcontributors_portlet | 156 | >>> print topcontributors_portlet |
734 | 133 | <... | 157 | <... |
735 | 134 | ...Carlos Perelló MarÃn... | 158 | ...Carlos Perelló MarÃn... |
736 | 135 | 159 | ||
737 | 160 | Our test sample data does not know about plural forms of | ||
738 | 161 | Abkhazian and about countries where this language is spoken. | ||
739 | 162 | |||
740 | 163 | We will see a note about missing plural forms and a link to Rosetta | ||
741 | 164 | add question page for informing Rosetta admin about the right plural | ||
742 | 165 | form. | ||
743 | 166 | |||
744 | 167 | >>> browser.open('http://translations.launchpad.dev/+languages/ab') | ||
745 | 168 | >>> print extract_text(find_portlet(browser.contents, 'Plural forms' | ||
746 | 169 | ... ).renderContents()) | ||
747 | 170 | Plural forms | ||
748 | 171 | Unfortunately, Launchpad doesn't know the plural | ||
749 | 172 | form information for this language... | ||
750 | 173 | |||
751 | 174 | >>> print browser.getLink(id='plural_question').url | ||
752 | 175 | http://answers.launchpad.dev/rosetta/+addquestion | ||
753 | 176 | |||
754 | 177 | We will see a note that Launchpad does not know in which countries | ||
755 | 178 | this language is spoken and a link to add question page for informing | ||
756 | 179 | Rosetta admin about the countries where this page is officially spoken. | ||
757 | 180 | |||
758 | 181 | >>> countries_portlet = find_portlet(browser.contents, 'Countries') | ||
759 | 182 | >>> print countries_portlet | ||
760 | 183 | <... | ||
761 | 184 | Abkhazian is not registered as being spoken in any | ||
762 | 185 | country... | ||
763 | 186 | |||
764 | 187 | >>> print browser.getLink(id='country_question').url | ||
765 | 188 | http://answers.launchpad.dev/rosetta/+addquestion | ||
766 | 189 | |||
767 | 190 | |||
768 | 191 | Edit language information | ||
769 | 192 | ------------------------- | ||
770 | 193 | |||
771 | 136 | Finally, there is the edit form to change language basic information. | 194 | Finally, there is the edit form to change language basic information. |
772 | 137 | 195 | ||
774 | 138 | >>> user_browser.open('http://translations.launchpad.dev/+languages/es') | 196 | >>> user_browser.open( |
775 | 197 | ... 'http://translations.launchpad.dev/+languages/es') | ||
776 | 139 | >>> print user_browser.url | 198 | >>> print user_browser.url |
777 | 140 | http://translations.launchpad.dev/+languages/es | 199 | http://translations.launchpad.dev/+languages/es |
778 | 141 | 200 | ||
779 | @@ -146,7 +205,8 @@ | |||
780 | 146 | ... | 205 | ... |
781 | 147 | LinkNotFoundError | 206 | LinkNotFoundError |
782 | 148 | 207 | ||
784 | 149 | >>> user_browser.open('http://translations.launchpad.dev/+languages/es/+admin') | 208 | >>> user_browser.open( |
785 | 209 | ... 'http://translations.launchpad.dev/+languages/es/+admin') | ||
786 | 150 | Traceback (most recent call last): | 210 | Traceback (most recent call last): |
787 | 151 | ... | 211 | ... |
788 | 152 | Unauthorized:... | 212 | Unauthorized:... |
789 | @@ -155,7 +215,8 @@ | |||
790 | 155 | 215 | ||
791 | 156 | >>> from canonical.launchpad.testing.pages import strip_label | 216 | >>> from canonical.launchpad.testing.pages import strip_label |
792 | 157 | 217 | ||
794 | 158 | >>> admin_browser.open('http://translations.launchpad.dev/+languages/es') | 218 | >>> admin_browser.open( |
795 | 219 | ... 'http://translations.launchpad.dev/+languages/es') | ||
796 | 159 | >>> print admin_browser.url | 220 | >>> print admin_browser.url |
797 | 160 | http://translations.launchpad.dev/+languages/es | 221 | http://translations.launchpad.dev/+languages/es |
798 | 161 | 222 | ||
799 | 162 | 223 | ||
800 | === modified file 'lib/lp/translations/templates/language-index.pt' | |||
801 | --- lib/lp/translations/templates/language-index.pt 2009-09-17 14:45:59 +0000 | |||
802 | +++ lib/lp/translations/templates/language-index.pt 2009-12-07 23:15:25 +0000 | |||
803 | @@ -43,8 +43,10 @@ | |||
804 | 43 | <p class="helpwanted"> | 43 | <p class="helpwanted"> |
805 | 44 | Unfortunately, Launchpad doesn't know the plural form | 44 | Unfortunately, Launchpad doesn't know the plural form |
806 | 45 | information for this language. If you know it, please open a | 45 | information for this language. If you know it, please open a |
809 | 46 | <a href="/rosetta/+addticket">ticket</a> with that information, | 46 | <a id='plural_question' |
810 | 47 | so we can add it to Launchpad. | 47 | tal:attributes="href view/add_question_url" |
811 | 48 | >question</a> | ||
812 | 49 | with that information, so we can add it to Launchpad. | ||
813 | 48 | </p> | 50 | </p> |
814 | 49 | </tal:has_not_pluralforms> | 51 | </tal:has_not_pluralforms> |
815 | 50 | </div> | 52 | </div> |
816 | @@ -124,8 +126,11 @@ | |||
817 | 124 | </tal:language> | 126 | </tal:language> |
818 | 125 | is not registered as being spoken in any country. If you know | 127 | is not registered as being spoken in any country. If you know |
819 | 126 | about a country that officially speaks this language, please | 128 | about a country that officially speaks this language, please |
822 | 127 | open a <a href="/rosetta/+addticket">ticket</a> with that | 129 | open a |
823 | 128 | information, so we can add it to Launchpad. | 130 | <a id='country_question' |
824 | 131 | tal:attributes="href view/add_question_url" | ||
825 | 132 | >question</a> | ||
826 | 133 | with that information, so we can add it to Launchpad. | ||
827 | 129 | </p> | 134 | </p> |
828 | 130 | </tal:has_not_countries> | 135 | </tal:has_not_countries> |
829 | 131 | </div> | 136 | </div> |
830 | 132 | 137 | ||
831 | === modified file 'lib/lp/translations/templates/object-templates.pt' | |||
832 | --- lib/lp/translations/templates/object-templates.pt 2009-11-24 19:23:52 +0000 | |||
833 | +++ lib/lp/translations/templates/object-templates.pt 2009-12-07 23:15:25 +0000 | |||
834 | @@ -26,16 +26,16 @@ | |||
835 | 26 | </style> | 26 | </style> |
836 | 27 | <style tal:condition="view/is_distroseries" type="text/css"> | 27 | <style tal:condition="view/is_distroseries" type="text/css"> |
837 | 28 | #templates_table { | 28 | #templates_table { |
839 | 29 | width: 72em; | 29 | width: 79em; |
840 | 30 | } | 30 | } |
841 | 31 | </style> | 31 | </style> |
842 | 32 | <style tal:condition="not:view/is_distroseries" type="text/css"> | 32 | <style tal:condition="not:view/is_distroseries" type="text/css"> |
843 | 33 | #templates_table { | 33 | #templates_table { |
845 | 34 | width: 50em; | 34 | width: 58em; |
846 | 35 | } | 35 | } |
847 | 36 | </style> | 36 | </style> |
848 | 37 | <script language="JavaScript" type="text/javascript"> | 37 | <script language="JavaScript" type="text/javascript"> |
850 | 38 | YUI().use('node-base', 'event-delegate', function(Y) { | 38 | LPS.use('node-base', 'event-delegate', function(Y) { |
851 | 39 | Y.on('domready', function(e) { | 39 | Y.on('domready', function(e) { |
852 | 40 | Y.all('#templates_table .template_links').addClass( | 40 | Y.all('#templates_table .template_links').addClass( |
853 | 41 | 'inactive_links'); | 41 | 'inactive_links'); |
854 | @@ -75,6 +75,7 @@ | |||
855 | 75 | <th tal:condition="view/is_distroseries" | 75 | <th tal:condition="view/is_distroseries" |
856 | 76 | class="sourcepackage_column">Source package</th> | 76 | class="sourcepackage_column">Source package</th> |
857 | 77 | <th class="template_column">Template name</th> | 77 | <th class="template_column">Template name</th> |
858 | 78 | <th class="lastupdate_column">Last update</th> | ||
859 | 78 | <th class="actions_column" | 79 | <th class="actions_column" |
860 | 79 | tal:condition="context/required:launchpad.AnyPerson"> | 80 | tal:condition="context/required:launchpad.AnyPerson"> |
861 | 80 | Actions</th> | 81 | Actions</th> |
862 | @@ -88,6 +89,22 @@ | |||
863 | 88 | </td> | 89 | </td> |
864 | 89 | <td class="template_column"><a tal:attributes="href template/fmt:url" | 90 | <td class="template_column"><a tal:attributes="href template/fmt:url" |
865 | 90 | tal:content="template/name">Template name</a></td> | 91 | tal:content="template/name">Template name</a></td> |
866 | 92 | <td class="lastupdate_column"> | ||
867 | 93 | <span class="sortkey" | ||
868 | 94 | tal:condition="template/date_last_updated" | ||
869 | 95 | tal:content="template/date_last_updated/fmt:datetime"> | ||
870 | 96 | time sort key | ||
871 | 97 | </span> | ||
872 | 98 | <span class="lastupdate_column" | ||
873 | 99 | tal:condition="template/date_last_updated" | ||
874 | 100 | tal:attributes=" | ||
875 | 101 | title template/date_last_updated/fmt:datetime" | ||
876 | 102 | tal:content=" | ||
877 | 103 | template/date_last_updated/fmt:approximatedate" | ||
878 | 104 | > | ||
879 | 105 | 2009-09-23 | ||
880 | 106 | </span> | ||
881 | 107 | </td> | ||
882 | 91 | <td class="actions_column" | 108 | <td class="actions_column" |
883 | 92 | tal:condition="context/required:launchpad.AnyPerson"> | 109 | tal:condition="context/required:launchpad.AnyPerson"> |
884 | 93 | <div class="template_links"> | 110 | <div class="template_links"> |
885 | 94 | 111 | ||
886 | === modified file 'lib/lp/translations/templates/pofile-export.pt' | |||
887 | --- lib/lp/translations/templates/pofile-export.pt 2009-11-10 21:04:19 +0000 | |||
888 | +++ lib/lp/translations/templates/pofile-export.pt 2009-12-07 23:15:25 +0000 | |||
889 | @@ -13,7 +13,7 @@ | |||
890 | 13 | } | 13 | } |
891 | 14 | </style> | 14 | </style> |
892 | 15 | <script type="text/javascript"> | 15 | <script type="text/javascript"> |
894 | 16 | YUI().use('node', 'event', function(Y){ | 16 | LPS.use('node', 'event', function(Y){ |
895 | 17 | Y.on('domready', function(){ | 17 | Y.on('domready', function(){ |
896 | 18 | // The pochanged option is only available for the PO format. | 18 | // The pochanged option is only available for the PO format. |
897 | 19 | var formatlist = Y.one('#div_format select'); | 19 | var formatlist = Y.one('#div_format select'); |
898 | 20 | 20 | ||
899 | === modified file 'lib/lp/translations/templates/pofile-translate.pt' | |||
900 | --- lib/lp/translations/templates/pofile-translate.pt 2009-11-04 19:59:16 +0000 | |||
901 | +++ lib/lp/translations/templates/pofile-translate.pt 2009-12-07 23:15:25 +0000 | |||
902 | @@ -20,7 +20,7 @@ | |||
903 | 20 | <script type="text/javascript"> | 20 | <script type="text/javascript"> |
904 | 21 | registerLaunchpadFunction(insertAllExpansionButtons); | 21 | registerLaunchpadFunction(insertAllExpansionButtons); |
905 | 22 | 22 | ||
907 | 23 | YUI().use('node', 'cookie', 'anim', 'lp.pofile', function(Y) { | 23 | LPS.use('node', 'cookie', 'anim', 'lp.pofile', function(Y) { |
908 | 24 | 24 | ||
909 | 25 | var hide_notification = function(node) { | 25 | var hide_notification = function(node) { |
910 | 26 | var hide_anim = new Y.Anim({ | 26 | var hide_anim = new Y.Anim({ |
911 | 27 | 27 | ||
912 | === modified file 'lib/lp/translations/templates/translation-import-queue-macros.pt' | |||
913 | --- lib/lp/translations/templates/translation-import-queue-macros.pt 2009-11-20 14:15:34 +0000 | |||
914 | +++ lib/lp/translations/templates/translation-import-queue-macros.pt 2009-12-07 23:15:25 +0000 | |||
915 | @@ -18,7 +18,7 @@ | |||
916 | 18 | </script> | 18 | </script> |
917 | 19 | 19 | ||
918 | 20 | <script type="text/javascript"> | 20 | <script type="text/javascript"> |
920 | 21 | YUI().use( 'translations', 'event', function(Y) { | 21 | LPS.use( 'translations', 'event', function(Y) { |
921 | 22 | Y.on('domready', function(e) { | 22 | Y.on('domready', function(e) { |
922 | 23 | Y.translations.initialize_import_queue_page(Y); | 23 | Y.translations.initialize_import_queue_page(Y); |
923 | 24 | }); | 24 | }); |
924 | 25 | 25 | ||
925 | === modified file 'lib/lp/translations/templates/translationimportqueueentry-index.pt' | |||
926 | --- lib/lp/translations/templates/translationimportqueueentry-index.pt 2009-11-04 13:56:17 +0000 | |||
927 | +++ lib/lp/translations/templates/translationimportqueueentry-index.pt 2009-12-07 23:15:25 +0000 | |||
928 | @@ -14,7 +14,7 @@ | |||
929 | 14 | } | 14 | } |
930 | 15 | </style> | 15 | </style> |
931 | 16 | <script type="text/javascript"> | 16 | <script type="text/javascript"> |
933 | 17 | YUI().use('node', 'lazr.anim', function(Y) { | 17 | LPS.use('node', 'lazr.anim', function(Y) { |
934 | 18 | var fields = {'POT': | 18 | var fields = {'POT': |
935 | 19 | ['field.name', 'field.translation_domain', | 19 | ['field.name', 'field.translation_domain', |
936 | 20 | 'field.languagepack'], | 20 | 'field.languagepack'], |
937 | 21 | 21 | ||
938 | === modified file 'lib/lp/translations/templates/translationmessage-translate.pt' | |||
939 | --- lib/lp/translations/templates/translationmessage-translate.pt 2009-09-17 07:28:30 +0000 | |||
940 | +++ lib/lp/translations/templates/translationmessage-translate.pt 2009-12-07 23:15:25 +0000 | |||
941 | @@ -18,7 +18,7 @@ | |||
942 | 18 | tal:define="lp_js string:${icingroot}/build" | 18 | tal:define="lp_js string:${icingroot}/build" |
943 | 19 | tal:attributes="src string:${lp_js}/translations/pofile.js"></script> | 19 | tal:attributes="src string:${lp_js}/translations/pofile.js"></script> |
944 | 20 | <script type="text/javascript"> | 20 | <script type="text/javascript"> |
946 | 21 | YUI().use('node', 'lp.pofile', function(Y) { | 21 | LPS.use('node', 'lp.pofile', function(Y) { |
947 | 22 | Y.on('domready', Y.lp.pofile.setupSuggestionDismissal); | 22 | Y.on('domready', Y.lp.pofile.setupSuggestionDismissal); |
948 | 23 | }); | 23 | }); |
949 | 24 | </script> | 24 | </script> |
Summary
-------
This branch fixes an oops caused by the user double clicking +expiringmember ship/$team form's submit button.
on the /~$user/
The view class now checks if the membership can be renewed
before calling the method in the model that raises the exception.
The view still displays the message saying that the membership has been
renewed, because it is very unlikely that the user would be able to try to
renew an unrenewable membership without double clicking, since the form will
not show up on the page if the membership will not be expiring within seven
days.
Tests
-----
./bin/test -vvt 'xx-member- renewed- membership. txt|teammembers hip-email- notification. txt'
Demo and Q/A
------------
* Log in as <email address hidden> launchpad. dev/~guadamen/ +members launchpad. dev/~name16/ +expiringmember ship/guadamen
* Open http://
* Edit Foo Bar's membership.
* Set the expiration within 7 days in the future.
(Surprisingly, you can set the team's admin's membership to expire, and
before this fix the admin would get the same exception when double
clicking to renew the membership.)
* Open http://
* Double click on the Renew button.
* Instead of an OOPS, you should the person index page with a notice
that the membership has been renewed to some time next year.