Merge lp:~jtv/launchpad/bug-433989 into lp:launchpad

Proposed by Jeroen T. Vermeulen
Status: Merged
Approved by: Jeroen T. Vermeulen
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~jtv/launchpad/bug-433989
Merge into: lp:launchpad
Diff against target: 97 lines
4 files modified
lib/lp/translations/browser/configure.zcml (+0/-1)
lib/lp/translations/browser/language.py (+3/-12)
lib/lp/translations/browser/translationgroup.py (+6/-0)
lib/lp/translations/browser/translator.py (+5/-6)
To merge this branch: bzr merge lp:~jtv/launchpad/bug-433989
Reviewer Review Type Date Requested Status
Eleanor Berger (community) Approve
Review via email: mp+12180@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

= Bug 433989 =

I missed a few spots when I updated the page headings for the
TranslationGroup and Translator pages. (A Translator is really just a
membership record in a TranslationGroup).

Of these, I fixed a bad page title that still contained too much context
but left the other—a missing breadcrumb for Translator—unfixed. The
reason is that the breadcrumb would link to a page that not everyone who
saw it would have access to.

As a drive-by cleanup, this branch also removes LanguageNavigation which
became unnecessary as Salgado fixed the bug that made it necessary last
week.

To see the change, go to

https://translations.launchpad.dev/+groups/launchpad-translators/+reassign

or

https://translations.net.launchpad.net/+groups/launchpad-translators/+reassign

...before and after the change. The last breadcrumb should become a lot
shorter.

No lint.

Jeroen

Revision history for this message
Eleanor Berger (intellectronica) wrote :

r=me
ui=me

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/translations/browser/configure.zcml'
2--- lib/lp/translations/browser/configure.zcml 2009-09-24 15:33:40 +0000
3+++ lib/lp/translations/browser/configure.zcml 2009-09-28 09:49:12 +0000
4@@ -299,7 +299,6 @@
5 <browser:navigation
6 module="lp.translations.browser.language"
7 classes="
8- LanguageNavigation
9 LanguageSetNavigation"/>
10 <browser:defaultView
11 for="canonical.launchpad.interfaces.ILanguage"
12
13=== modified file 'lib/lp/translations/browser/language.py'
14--- lib/lp/translations/browser/language.py 2009-09-17 21:03:25 +0000
15+++ lib/lp/translations/browser/language.py 2009-09-28 09:49:12 +0000
16@@ -7,7 +7,6 @@
17 __all__ = [
18 'LanguageAddView',
19 'LanguageAdminView',
20- 'LanguageNavigation',
21 'LanguageSetBreadcrumb',
22 'LanguageSetContextMenu',
23 'LanguageSetNavigation',
24@@ -26,9 +25,9 @@
25 ITranslationsPerson)
26 from lp.translations.browser.translations import TranslationsMixin
27 from canonical.launchpad.webapp import (
28- GetitemNavigation, LaunchpadView, LaunchpadFormView,
29- LaunchpadEditFormView, action, canonical_url, ContextMenu, Navigation,
30- NavigationMenu, enabled_with_permission, Link, custom_widget)
31+ action, canonical_url, ContextMenu, custom_widget,
32+ enabled_with_permission, GetitemNavigation, LaunchpadEditFormView,
33+ LaunchpadFormView, LaunchpadView, Link, NavigationMenu)
34 from lp.translations.utilities.pluralforms import make_friendly_plural_forms
35
36 from canonical.widgets import LabeledMultiCheckBoxWidget
37@@ -43,14 +42,6 @@
38 return englishname
39
40
41-class LanguageNavigation(Navigation):
42- """Make breadcrumb appear for language."""
43- # XXX: JeroenVermeulen 2009-09-18, bug=423898: Salgado is working to
44- # make this Navigation class obsolete. Once 423898 is solved, this
45- # class and the ZCML referring to it can go.
46- usedfor = ILanguage
47-
48-
49 class LanguageBreadcrumb(Breadcrumb):
50 """`Breadcrumb` for `ILanguage`."""
51 @property
52
53=== modified file 'lib/lp/translations/browser/translationgroup.py'
54--- lib/lp/translations/browser/translationgroup.py 2009-09-17 11:28:13 +0000
55+++ lib/lp/translations/browser/translationgroup.py 2009-09-28 09:49:12 +0000
56@@ -212,6 +212,12 @@
57 class TranslationGroupReassignmentView(ObjectReassignmentView):
58 """View class for changing translation group owner."""
59
60+ page_title = "Change owner"
61+
62+ @property
63+ def label(self):
64+ return "Change the owner of %s" % self.contextName
65+
66 @property
67 def contextName(self):
68 return self.context.title or self.context.name
69
70=== modified file 'lib/lp/translations/browser/translator.py'
71--- lib/lp/translations/browser/translator.py 2009-09-17 14:29:22 +0000
72+++ lib/lp/translations/browser/translator.py 2009-09-28 09:49:12 +0000
73@@ -2,6 +2,11 @@
74 # GNU Affero General Public License version 3 (see the file LICENSE).
75
76 __metaclass__ = type
77+__all__ = [
78+ 'TranslatorAdminView',
79+ 'TranslatorEditView',
80+ 'TranslatorRemoveView',
81+ ]
82
83 import cgi
84
85@@ -11,12 +16,6 @@
86 action, canonical_url, LaunchpadEditFormView, LaunchpadFormView)
87 from canonical.launchpad.webapp.menu import structured
88
89-__all__ = [
90- 'TranslatorAdminView',
91- 'TranslatorEditView',
92- 'TranslatorRemoveView',
93- ]
94-
95
96 class TranslatorAdminView(LaunchpadEditFormView):
97 """View class to administer ITranslator objects"""