← Back to team overview

launchpad-reviewers team mailing list archive

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

 

Данило Шеган has proposed merging lp:~danilo/launchpad/bug-691634 into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  #691634 MutatedCelebrityError on SourcePackage:+translations page
  https://bugs.launchpad.net/bugs/691634


= 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
-- 
https://code.launchpad.net/~danilo/launchpad/bug-691634/+merge/44077
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~danilo/launchpad/bug-691634 into lp:launchpad.
=== modified file 'lib/canonical/launchpad/interfaces/launchpad.py'
--- lib/canonical/launchpad/interfaces/launchpad.py	2010-12-13 22:43:03 +0000
+++ lib/canonical/launchpad/interfaces/launchpad.py	2010-12-17 17:58:55 +0000
@@ -121,7 +121,6 @@
     launchpad = Attribute("The Launchpad project.")
     launchpad_beta_testers = Attribute("The Launchpad Beta Testers team.")
     launchpad_developers = Attribute("The Launchpad development team.")
-    lp_translations = Attribute("The Launchpad Translations product.")
     obsolete_junk = Attribute("The Obsolete Junk project.")
     ppa_key_guard = Attribute("The PPA signing keys owner.")
     registry_experts = Attribute("The Registry Administrators team.")

=== modified file 'lib/canonical/launchpad/utilities/celebrities.py'
--- lib/canonical/launchpad/utilities/celebrities.py	2010-12-13 18:49:30 +0000
+++ lib/canonical/launchpad/utilities/celebrities.py	2010-12-17 17:58:55 +0000
@@ -146,7 +146,6 @@
     launchpad_beta_testers = PersonCelebrityDescriptor(
         'launchpad-beta-testers')
     launchpad_developers = PersonCelebrityDescriptor('launchpad')
-    lp_translations = CelebrityDescriptor(IProductSet, 'rosetta')
     obsolete_junk = CelebrityDescriptor(IProductSet, 'obsolete-junk')
     ppa_key_guard = PersonCelebrityDescriptor('ppa-key-guard')
     registry_experts = PersonCelebrityDescriptor('registry')

=== modified file 'lib/lp/registry/browser/person.py'
--- lib/lp/registry/browser/person.py	2010-12-17 15:01:53 +0000
+++ lib/lp/registry/browser/person.py	2010-12-17 17:58:55 +0000
@@ -2684,7 +2684,7 @@
     @property
     def answers_url(self):
         return canonical_url(
-            getUtility(ILaunchpadCelebrities).lp_translations,
+            getUtility(ILaunchpadCelebrities).launchpad,
             rootsite='answers')
 
 

=== modified file 'lib/lp/translations/browser/language.py'
--- lib/lp/translations/browser/language.py	2010-11-23 23:22:27 +0000
+++ lib/lp/translations/browser/language.py	2010-12-17 17:58:55 +0000
@@ -276,9 +276,9 @@
 
     @property
     def add_question_url(self):
-        rosetta = getUtility(ILaunchpadCelebrities).lp_translations
+        launchpad = getUtility(ILaunchpadCelebrities).launchpad
         return canonical_url(
-            rosetta,
+            launchpad,
             view_name='+addquestion',
             rootsite='answers')
 

=== modified file 'lib/lp/translations/browser/translations.py'
--- lib/lp/translations/browser/translations.py	2010-09-11 19:25:13 +0000
+++ lib/lp/translations/browser/translations.py	2010-12-17 17:58:55 +0000
@@ -69,7 +69,7 @@
     @cachedproperty
     def answers_url(self):
         return canonical_url(
-            getUtility(ILaunchpadCelebrities).lp_translations,
+            getUtility(ILaunchpadCelebrities).launchpad,
             rootsite='answers')