Thanks for the review! Here is the latest diff. === modified file 'lib/lp/translations/browser/potemplate.py' --- lib/lp/translations/browser/potemplate.py 2009-12-14 15:50:40 +0000 +++ lib/lp/translations/browser/potemplate.py 2009-12-21 19:26:06 +0000 @@ -286,12 +286,25 @@ by_source_count = self.context.relatives_by_source.count() if (by_source_count > self.SHOW_RELATED_TEMPLATES): other = by_source_count - self.SHOW_RELATED_TEMPLATES + if (self.context.distroseries): + # XXX adiroiban 2009-12-21 bug=499058: A canonical_url for + # SourcePackageName is needed to avoid hardcoding this URL. + url = (canonical_url( + self.context.distroseries, rootsite="translations") + + "/+source/" + self.context.sourcepackagename.name + + "/+translations") + else: + url = canonical_url( + self.context.productseries, + rootsite="translations", + view_name="+templates") if other == 1: - return "one other template" + return " and one other template." % url else: - return "%d other templates" % other + return " and %d other templates." % ( + url, other) else: - return None + return "" @property def related_templates_by_name(self): === modified file 'lib/lp/translations/stories/standalone/xx-potemplate-index.txt' --- lib/lp/translations/stories/standalone/xx-potemplate-index.txt 2009-12-14 15:50:40 +0000 +++ lib/lp/translations/stories/standalone/xx-potemplate-index.txt 2009-12-21 19:44:38 +0000 @@ -114,7 +114,7 @@ When the branch or the source package contains less than five templates they are all displayed on the template page. -A source package with for templates are created. +A source package with five templates is created. >>> from zope.component import getUtility >>> from canonical.launchpad.interfaces.launchpad import ( @@ -140,7 +140,7 @@ ... sourcepackagename=package.sourcepackagename, name='fifth') >>> logout() -Visiting any template from the same page, user see link to the other +Visiting any template from the same page, user sees link to the other templates. >>> browser.open( @@ -155,7 +155,7 @@ For five template, the page displays the first four templates in alphabetical order, and a link to the page listing all templates. -Another template is added to the same source package to test this behaviour. +Another template is added to the same source package. >>> login('