launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #16473
[Merge] lp:~wgrant/launchpad/translator-url into lp:launchpad
William Grant has proposed merging lp:~wgrant/launchpad/translator-url into lp:launchpad.
Commit message:
Define a URL for ITranslator rather than constructing it manually in views.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #249194 in Launchpad itself: "No application tabs on translator views"
https://bugs.launchpad.net/launchpad/+bug/249194
For more details, see:
https://code.launchpad.net/~wgrant/launchpad/translator-url/+merge/208262
Define a URL for ITranslator rather than constructing it manually in views. This fixes the application tabs to work like every other page on Launchpad, rather than being missing entirely.
--
https://code.launchpad.net/~wgrant/launchpad/translator-url/+merge/208262
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/translator-url into lp:launchpad.
=== modified file 'lib/lp/translations/browser/configure.zcml'
--- lib/lp/translations/browser/configure.zcml 2014-02-24 06:50:46 +0000
+++ lib/lp/translations/browser/configure.zcml 2014-02-26 03:44:57 +0000
@@ -68,6 +68,11 @@
<browser:defaultView
for="lp.translations.interfaces.translator.ITranslator"
name="+admin"/>
+ <browser:url
+ for="lp.translations.interfaces.translator.ITranslator"
+ path_expression="string:${language/code}"
+ attribute_to_parent="translationgroup"
+ rootsite="translations"/>
<browser:page
name="+admin"
for="lp.translations.interfaces.translator.ITranslator"
=== modified file 'lib/lp/translations/templates/translationgroup-index.pt'
--- lib/lp/translations/templates/translationgroup-index.pt 2012-06-15 16:23:50 +0000
+++ lib/lp/translations/templates/translationgroup-index.pt 2014-02-26 03:44:57 +0000
@@ -86,7 +86,7 @@
condition="not:view/user_can_edit">
<a tal:condition="
translator/context/required:launchpad.Edit"
- tal:attributes="href string:${translator/code}/+edit"
+ tal:attributes="href translator/context/fmt:url/+edit"
class="edit sprite action-icon"></a>
</tal:notadmin>
</td>
@@ -99,11 +99,11 @@
</td>
<td tal:condition="view/user_can_edit">
<a tal:attributes="
- href translator/code;
+ href translator/context/fmt:url;
id string:edit-${translator/code}-translator"
title="Change translator and documentation link"
alt="Change" class="edit sprite"></a>
- <a tal:attributes="href string:${translator/code}/+remove"
+ <a tal:attributes="href translator/context/fmt:url/+remove"
alt="Remove" title="Remove translator"
class="remove sprite"></a>
</td>
Follow ups