-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 16.09.2009 10:05, Данило Шеган schrieb: > === modified file 'lib/lp/translations/browser/potemplate.py' All good [...] > === modified file 'lib/lp/translations/browser/tests/test_breadcrumbs.py' > --- lib/lp/translations/browser/tests/test_breadcrumbs.py 2009-09-11 10:38:49 +0000 > +++ lib/lp/translations/browser/tests/test_breadcrumbs.py 2009-09-16 06:17:21 +0000 > @@ -7,6 +7,8 @@ > > from zope.component import getUtility > > +from canonical.lazr.utils import smartquote > + > from canonical.launchpad.webapp.publisher import canonical_url > from canonical.launchpad.webapp.tests.breadcrumbs import ( > BaseBreadcrumbTestCase) > @@ -158,5 +160,20 @@ > ["Crumb Tester", "Series test", "Translations", "Serbian (sr)"]) > > > -def test_suite(): > - return unittest.TestLoader().loadTestsFromName(__name__) Huh? Is test_suite obsolete now? Or is this a mistake? > +class TestPOTemplateBreadcrumbs(BaseTranslationsBreadcrumbTestCase): > + def test_potemplate(self): > + product = self.factory.makeProduct( > + name='crumb-tester', displayname="Crumb Tester") > + series = self.factory.makeProductSeries( > + name="test", product=product) > + potemplate = self.factory.makePOTemplate(name="template", > + productseries=series) > + self._testContextBreadcrumbs( > + [product, series, potemplate], > + ["http://launchpad.dev/crumb-tester", > + "http://launchpad.dev/crumb-tester/test", > + "http://translations.launchpad.dev/crumb-tester/test", > + "http://translations.launchpad.dev/crumb-tester/test" > + "/+pots/template"], > + ["Crumb Tester", "Series test", "Translations", > + smartquote('Template "template"')]) > > === modified file 'lib/lp/translations/configure.zcml' Good. [...] > === modified file 'lib/lp/translations/doc/canonical_url_examples.txt' Good, too. [...] > === modified file 'lib/lp/translations/stories/navigation-links/potemplate.txt' Good, three. ;) [...] > === modified file 'lib/lp/translations/stories/standalone/xx-person-activity.txt' Good 4 u. [...] > === modified file 'lib/lp/translations/stories/standalone/xx-pofile-index.txt' Good. High 5! [...] > === modified file 'lib/lp/translations/stories/standalone/xx-potemplate-edit.txt' Got a 'Good' six pack. [...] > === modified file 'lib/lp/translations/stories/standalone/xx-rosetta-pofile-export.txt' 7th Good heavens! [...] > === modified file 'lib/lp/translations/stories/standalone/xx-rosetta-potemplate-export.txt' I 8 the Good. [...] > === modified file 'lib/lp/translations/stories/standalone/xx-rosetta-potemplate-index.txt' > --- lib/lp/translations/stories/standalone/xx-rosetta-potemplate-index.txt 2009-07-01 20:45:39 +0000 > +++ lib/lp/translations/stories/standalone/xx-rosetta-potemplate-index.txt 2009-09-16 06:17:21 +0000 > @@ -7,16 +7,14 @@ > >>> anon_browser.open("http://translations.launchpad.dev/" > ... "ubuntu/hoary/+source/evolution/+pots/evolution-2.2/") > >>> anon_browser.title > - 'Translation status for... > - ...Template "evolution-2.2" in Ubuntu Hoary package "evolution"...' > + 'Template ...evolution-2.2... : ...evolution... package : Translations : 5.04 : Ubuntu' > > The owner of the template is diplayed. > > >>> owner_display = find_tag_by_id(anon_browser.contents, > ... 'potemplate-owner') > >>> print extract_text(owner_display) > - This template is owned by > - Rosetta Administrators > + Owner: Rosetta Administrators > > The page lists the status of all the translations. It merges the > No Privileges Person's languages (which are South African) with > @@ -27,7 +25,7 @@ > > >>> content = find_main_content(anon_browser.contents) > >>> print extract_text(content.findAll('h1')[0]) > - Translation status for evolution-2.2 > + Translation status > > >>> table = content.findAll('table')[0] > >>> for row in table.findAll('tr'): > @@ -48,13 +46,13 @@ > >>> alternate_notice = find_tag_by_id(anon_browser.contents, > ... 'potemplate-relatives') > >>> print extract_text(alternate_notice) > - Other templates from the same source: evolution-2.2. > + Other templates here: evolution-2.2 > > The notice links to the alternate template. > > >>> print alternate_notice Why doesn't this have an extract_text? > > - Other templates from the same source: > + Other templates here: > evolution-2.2... >

> > @@ -82,7 +80,7 @@ > >>> alternate_notice = find_tag_by_id(anon_browser.contents, > ... 'potemplate-rel-by-name') > >>> print extract_text(alternate_notice) > - See the same template in: Ubuntu Hoary. > + Templates with the same name elsewhere: Ubuntu Hoary > >>> print alternate_notice > > @@ -92,7 +90,7 @@ > >>> alternate_notice = find_tag_by_id(anon_browser.contents, > ... 'potemplate-rel-by-name') > >>> print extract_text(alternate_notice) > - See the same template in: Evolution trunk. > + Templates with the same name elsewhere: Evolution trunk > >>> print alternate_notice > > > === modified file 'lib/lp/translations/templates/potemplate-index.pt' > --- lib/lp/translations/templates/potemplate-index.pt 2009-07-17 17:59:07 +0000 > +++ lib/lp/translations/templates/potemplate-index.pt 2009-09-16 06:17:21 +0000 > @@ -2,94 +2,141 @@ > xmlns="http://www.w3.org/1999/xhtml" > xmlns:tal="http://xml.zope.org/namespaces/tal" > xmlns:metal="http://xml.zope.org/namespaces/metal" > - xmlns:i18n="http://xml.zope.org/namespaces/i18n" > - xml:lang="en" > - lang="en" > - dir="ltr" > - metal:use-macro="view/macro:page/onecolumn" > - i18n:domain="rosetta" > + metal:use-macro="view/macro:page/main_only" > > > > > -
> - > -
> >
> -

> - Translation status for > - > - foo-dev > - > -

> - > - > - > + > + > +

Translation status

This should go into the 'label' property on the view to be displayed *above* the breadcrumbs. Or has that changed? All 'Good' after this ;-) > + [...] review approve merge approved But please make it merge-conditional on the test_suite thing and adding the 'label' property. Thanks for the good work! Henning -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkqw6/YACgkQBT3oW1L17ihW0QCdF0FusSC2VnzD0D6Z9JSvWkQC kVUAoMP9PUbyFZ59VQKZfpk4ApYIyHnR =kXyj -----END PGP SIGNATURE-----