[ZPT] i18n error - is this the list ?
Gitte Wange
gitte@mmmanager.org
Wed, 16 Oct 2002 21:03:21 +0200
Florent Guillaume wrote:
> The ZPT code you showed is not enough for us to reproduce the problem
> and diagnose what's wrong.
>
> Florent
Arh sorry.
Do you want the entire source? Here goes: (Sorry for long post)
<html metal:define-macro="master"
tal:define="utool nocall:here/portal_url;
mtool here/portal_membership;
atool here/portal_actions;
wtool here/portal_workflow;
ratingtool here/portal_rating|nothing;
portal_object utool/getPortalObject;
layout_tool here/portal_layout|nothing;
portal_title portal_object/Title;
object_title here/Title;
portal_url here/portal_url;
member mtool/getAuthenticatedMember;
isAnon mtool/isAnonymousUser;
actions python: atool.listFilteredActionsFor( here );
user_actions actions/user;
object_actions actions/object;
workflow_actions actions/workflow;
folder_actions actions/folder;
global_actions actions/global;
wf_state python:wtool.getInfoFor(here,'review_state','');
"
i18n:domain="mmmskins"
>
<head>
<title tal:content="here/expanded_title"> Title goes here </title>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" />
<link rel="stylesheet" href="mmm_stylesheet.dtml" type="text/css"
tal:attributes="href here/mmm_stylesheet/absolute_url" />
<link rel="stylesheet" type="text/css" href="menu.css.dtml" id="css_menu"
tal:condition="layout_tool"
tal:attributes="href string:${here/portal_url}/menu.css" />
<link rel="stylesheet" type="text/css" href="menus_stylesheet.dtml"
tal:condition="layout_tool"
tal:attributes="href string:${here/portal_url}/menu_stylesheet" />
<link rel="SHORTCUT ICON" href="favicon.ico" />
</head>
<body>
<div class="topbar" metal:define-macro="top_bar"
tal:define="portal_title here/portal_properties/title" >
<a id="logo" tal:attributes="href portal_url; title
portal_title;"> </a>
<div class="top">
<div class="languageBox" tal:define="loc
nocall:here/Localizer|nothing" tal:condition="python:loc is not None">
<div tal:replace="structure loc/changeLanguageForm" />
</div>
<div class="searchBox">
<form name="searchform" action="search" target="_top">
<span i18n:translate="searchform_title">Search</span>
<input id="searchGadget" name="SearchableText"
type="text" size="15" />
<input class="context" type="submit" value=""
tal:attributes="value string:searchform_input" i18n:attributes="value" />
</form>
</div>
</div>
<div class="tabs" metal:use-macro="here/mmm_tabs/macros/mmm_tabs" >
Portal Tabs are here
</div>
<div class="personalBar"
metal:use-macro="here/mmm_bars/macros/personalBar"
tal:define="actions
python:here.portal_actions.listFilteredActionsFor(here);">
</div>
<div class="pathBar" metal:define-macro="pathBar">
<span id="Breadcrumbs" style="padding-top: 5px">
<span tal:repeat="bc here/mmm_breadcrumbs"
><a target="_top" href="."
tal:attributes="href bc/url|python:bc[1]; title
bc/longtitle" tal:content="bc/title"
>ID</a><span tal:condition="not:
repeat/bc/end"> » </span>
</span>
</span> *
<span
tal:define="homeobj mtool/getHomeFolder"
tal:condition="homeobj"
tal:omit-tag="">
<a href="/addtoFavorites"
tal:attributes="href
string:${here/absolute_url}/addtoFavorites"
i18n:translate="fav_command">Add to Favorites</a>
</span>
</div>
</div>
<div id="main_body">
<table class="columns"
width="100%" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td class="left">
<div metal:define-slot="left">
<table metal:define-macro="aboutBox"
class="box"
summary="About" cellpadding="0" cellspacing="0">
<thead>
<tr><th i18n:translate="about_title">About</th><th
class="empty"> </th></tr>
</thead>
<tbody>
<tr class="odd">
<td colspan="2">
<img src="img/icons/folder.gif" alt=""
tal:attributes="src here/getIcon;
alt here/meta_type;
title here/Title;"
i18n:attributes="alt; title" /> <span
tal:omit-tag="" tal:content="here/Title" i18n:translate="">Type</span>
</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</table>
</div>
</body>
</html>
I have tried removing the <div metal:define-slot="left"> and then
everything works fine ....
It's strange I think ....
Greetings,
Gitte Wange
>>I am about to move our skins into the new translation stuff ... and it's
>>really nice to work with the new i18n attributes ...
>>
>>But there is one thing I cannot figure out.
>>In our main_template we have a slot called 'left' ...
>>
>>If I do this in the template:
>><div metal:define-slot="left">
>> ... lots of HTML code here ...
>></div>
>>
>>I get the following error:
>>AssertionError
>>
>>Sorry, a site error occurred.
>>
>>Traceback (innermost last):
>>
>>Module ZPublisher.Publish, line 150, in publish_module
>>Module Products.Localizer, line 57, in new_publish
>>Module ZPublisher.Publish, line 114, in publish
>>Module Zope, line 171, in zpublisher_exception_hook
>>Module ZPublisher.Publish, line 98, in publish
>>Module ZPublisher.mapply, line 88, in mapply
>>Module ZPublisher.Publish, line 39, in call_object
>>Module Shared.DC.Scripts.Bindings, line 252, in __call__
>>Module Shared.DC.Scripts.Bindings, line 283, in _bindAndExec
>>Module Products.PageTemplates.ZopePageTemplate, line 228, in _exec
>>Module Products.PageTemplates.PageTemplate, line 95, in pt_render
>><ZopePageTemplate at /portal/test_html>
>>Module TAL.TALInterpreter, line 186, in __call__
>>Module TAL.TALInterpreter, line 230, in interpret
>>Module TAL.TALInterpreter, line 689, in do_useMacro
>>Module TAL.TALInterpreter, line 230, in interpret
>>Module TAL.TALInterpreter, line 476, in do_endI18nContext
>>AssertionError: (Also, an error occurred while attempting to render the
>>standard error message.)
>>
>>When I remove the <div> stuff everything works nice ....
>>I have tried naming the slot otherwise but it doesn't make the error
>>disappear ...
>>
>>Any good ideas ???
>