Merge lp:~danilo/launchpad/bug-691634 into lp:launchpad

Proposed by Данило Шеган
Status: Merged
Approved by: Данило Шеган
Approved revision: no longer in the source branch.
Merged at revision: 12106
Proposed branch: lp:~danilo/launchpad/bug-691634
Merge into: lp:launchpad
Diff against target: 100 lines (+7/-9)
7 files modified
lib/canonical/launchpad/interfaces/launchpad.py (+0/-1)
lib/canonical/launchpad/utilities/celebrities.py (+0/-1)
lib/lp/registry/browser/person.py (+1/-1)
lib/lp/translations/browser/language.py (+2/-2)
lib/lp/translations/browser/translations.py (+1/-1)
lib/lp/translations/stories/standalone/xx-language.txt (+2/-2)
lib/lp/translations/stories/standalone/xx-person-editlanguages.txt (+1/-1)
To merge this branch: bzr merge lp:~danilo/launchpad/bug-691634
Reviewer Review Type Date Requested Status
Brad Crittenden (community) code Approve
Review via email: mp+44077@code.launchpad.net

Commit message

[r=bac][ui=none][bug=691634] Get rid of rosetta celebrity.

Description of the change

= Bug 691634 =

Since 'rosetta' product has been removed and made an alias to 'launchpad', we've started seeing OOPSes on +translations pages which try to show a link to the answers URL for rosetta.

Actually, we've seen 857 of them yesterday.

== Proposed fix ==

Get rid of the lp_translations celebrity and use launchpad celebrity exclusively.

I am not bothering with lint fixes.

== Tests ==

Ideally, we would have removed the 'rosetta' product from the sampledata as well, when we would have seen tests fail. However, I am not worrying about that yet (it might cause more tests to fail and I am supposed to be off already).

== Demo and Q/A ==

Look at https://translations.launchpad.dev/ubuntu/hoary/+source/mozilla-firefox

 - before the change
 - after removing 'rosetta' project from the DB (just rename it in launchpad_dev DB: "update product set name='rosetta-gone' where name='rosetta';") - you get an OOPS
 - after this fix, it works again but points to "Launchpad itself" answers app.

For QA on production, use https://translations.launchpad.net/ubuntu/maverick/+source/openoffice.org/+translations (OOPSes right now) or any source package which has no active templates.

= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/canonical/launchpad/interfaces/launchpad.py
  lib/lp/translations/browser/language.py
  lib/lp/translations/browser/translations.py
  lib/lp/registry/browser/person.py
  lib/canonical/launchpad/utilities/celebrities.py

./lib/canonical/launchpad/interfaces/launchpad.py
      30: 'UnsafeFormGetSubmissionError' imported but unused
      30: 'IBasicLaunchpadRequest' imported but unused
      30: 'IOpenLaunchBag' imported but unused
      30: 'ILaunchpadRoot' imported but unused
      30: 'ILaunchBag' imported but unused

To post a comment you must log in.
Revision history for this message
Brad Crittenden (bac) wrote :

Thanks for the quick fix Danilos

review: Approve
Revision history for this message
Brad Crittenden (bac) wrote :

(just setting the review type)

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/launchpad/interfaces/launchpad.py'
2--- lib/canonical/launchpad/interfaces/launchpad.py 2010-12-13 22:43:03 +0000
3+++ lib/canonical/launchpad/interfaces/launchpad.py 2010-12-18 10:00:22 +0000
4@@ -121,7 +121,6 @@
5 launchpad = Attribute("The Launchpad project.")
6 launchpad_beta_testers = Attribute("The Launchpad Beta Testers team.")
7 launchpad_developers = Attribute("The Launchpad development team.")
8- lp_translations = Attribute("The Launchpad Translations product.")
9 obsolete_junk = Attribute("The Obsolete Junk project.")
10 ppa_key_guard = Attribute("The PPA signing keys owner.")
11 registry_experts = Attribute("The Registry Administrators team.")
12
13=== modified file 'lib/canonical/launchpad/utilities/celebrities.py'
14--- lib/canonical/launchpad/utilities/celebrities.py 2010-12-13 18:49:30 +0000
15+++ lib/canonical/launchpad/utilities/celebrities.py 2010-12-18 10:00:22 +0000
16@@ -146,7 +146,6 @@
17 launchpad_beta_testers = PersonCelebrityDescriptor(
18 'launchpad-beta-testers')
19 launchpad_developers = PersonCelebrityDescriptor('launchpad')
20- lp_translations = CelebrityDescriptor(IProductSet, 'rosetta')
21 obsolete_junk = CelebrityDescriptor(IProductSet, 'obsolete-junk')
22 ppa_key_guard = PersonCelebrityDescriptor('ppa-key-guard')
23 registry_experts = PersonCelebrityDescriptor('registry')
24
25=== modified file 'lib/lp/registry/browser/person.py'
26--- lib/lp/registry/browser/person.py 2010-12-17 15:01:53 +0000
27+++ lib/lp/registry/browser/person.py 2010-12-18 10:00:22 +0000
28@@ -2684,7 +2684,7 @@
29 @property
30 def answers_url(self):
31 return canonical_url(
32- getUtility(ILaunchpadCelebrities).lp_translations,
33+ getUtility(ILaunchpadCelebrities).launchpad,
34 rootsite='answers')
35
36
37
38=== modified file 'lib/lp/translations/browser/language.py'
39--- lib/lp/translations/browser/language.py 2010-11-23 23:22:27 +0000
40+++ lib/lp/translations/browser/language.py 2010-12-18 10:00:22 +0000
41@@ -276,9 +276,9 @@
42
43 @property
44 def add_question_url(self):
45- rosetta = getUtility(ILaunchpadCelebrities).lp_translations
46+ launchpad = getUtility(ILaunchpadCelebrities).launchpad
47 return canonical_url(
48- rosetta,
49+ launchpad,
50 view_name='+addquestion',
51 rootsite='answers')
52
53
54=== modified file 'lib/lp/translations/browser/translations.py'
55--- lib/lp/translations/browser/translations.py 2010-09-11 19:25:13 +0000
56+++ lib/lp/translations/browser/translations.py 2010-12-18 10:00:22 +0000
57@@ -69,7 +69,7 @@
58 @cachedproperty
59 def answers_url(self):
60 return canonical_url(
61- getUtility(ILaunchpadCelebrities).lp_translations,
62+ getUtility(ILaunchpadCelebrities).launchpad,
63 rootsite='answers')
64
65
66
67=== modified file 'lib/lp/translations/stories/standalone/xx-language.txt'
68--- lib/lp/translations/stories/standalone/xx-language.txt 2010-03-05 13:50:29 +0000
69+++ lib/lp/translations/stories/standalone/xx-language.txt 2010-12-18 10:00:22 +0000
70@@ -172,7 +172,7 @@
71 form information for this language...
72
73 >>> print browser.getLink(id='plural_question').url
74- http://answers.launchpad.dev/rosetta/+addquestion
75+ http://answers.launchpad.dev/launchpad/+addquestion
76
77 We will see a note that Launchpad does not know in which countries
78 this language is spoken and a link to add question page for informing
79@@ -185,7 +185,7 @@
80 country...
81
82 >>> print browser.getLink(id='country_question').url
83- http://answers.launchpad.dev/rosetta/+addquestion
84+ http://answers.launchpad.dev/launchpad/+addquestion
85
86
87 Edit language information
88
89=== modified file 'lib/lp/translations/stories/standalone/xx-person-editlanguages.txt'
90--- lib/lp/translations/stories/standalone/xx-person-editlanguages.txt 2010-02-05 13:25:46 +0000
91+++ lib/lp/translations/stories/standalone/xx-person-editlanguages.txt 2010-12-18 10:00:22 +0000
92@@ -106,7 +106,7 @@
93 >>> print find_spoken_languages(country_portlet)
94 []
95 >>> print country_portlet.first('a')['href']
96- http://answers.launchpad.dev/rosetta
97+ http://answers.launchpad.dev/launchpad
98
99 Back home in Brazil, Joao gets the equivalent for Brazil, where the
100 equivalent information is known.