appy.gen: removed from some pages superfluous translations of inexistent labels.

This commit is contained in:
Gaetan Delannay 2011-09-07 09:56:53 +02:00
parent b9c6283d9e
commit d2d3f9a745
5 changed files with 25 additions and 21 deletions

View file

@ -2,15 +2,17 @@
<metal:view define-macro="view">
<form name="executeAppyAction"
tal:define="formId python: '%s_%s' % (contextObj.UID(), name);
label python: contextObj.translate(widget['labelId']);
labelConfirm python: contextObj.translate(widget['labelId'] + '_confirm')"
label python: contextObj.translate(widget['labelId'])"
tal:attributes="id formId; action python: contextObj.absolute_url()+'/skyn/do'">
<input type="hidden" name="action" value="ExecuteAppyAction"/>
<input type="hidden" name="objectUid" tal:attributes="value contextObj/UID"/>
<input type="hidden" name="fieldName" tal:attributes="value name"/>
<input type="button" tal:condition="widget/confirm"
<tal:confirm condition="widget/confirm">
<input type="button"
tal:define="labelConfirm python: contextObj.translate(widget['labelId'] + '_confirm')"
tal:attributes="value label;
onClick python: 'askConfirm(\'form\', \'%s\', &quot;%s&quot;)' % (formId, labelConfirm)"/>
</tal:confirm>
<input type="submit" name="do" tal:condition="not: widget/confirm"
tal:attributes="value label" onClick="javascript:;"/>
<tal:comment replace="nothing">The previous onClick is simply used to prevent Plone

View file

@ -121,8 +121,7 @@
showPlusIcon python:not appyType['isBack'] and appyType['add'] and not maxReached and member.has_permission(addPermission, folder) and canWrite;
atMostOneRef python: (multiplicity[1] == 1) and (len(objs)&lt;=1);
label python: contextObj.translate('label', field=appyType['name']);
addConfirmMsg python: tool.translate('%s_addConfirm' % appyType['labelId']);
description python: contextObj.translate('descr', field=appyType['name']);
addConfirmMsg python: appyType['addConfirm'] and tool.translate('%s_addConfirm' % appyType['labelId']) or '';
navBaseCall python: 'askRefField(\'%s\',\'%s\',\'%s\',\'%s\',**v**)' % (ajaxHookId, contextObj.absolute_url(), fieldName, innerRef)">
<tal:comment replace="nothing">This macro displays the Reference widget on a "consult" page.
@ -167,8 +166,8 @@
</legend>
<tal:comment replace="nothing">Object description</tal:comment>
<!--p tal:condition="python: not innerRef and description.strip()"
tal:content="description" class="discreet" ></p-->
<p class="discreet" tal:condition="python: not innerRef and appyType['hasDescr']"
tal:content="python: contextObj.translate('descr', field=appyType['name'])"></p>
<tal:comment replace="nothing">Appy (top) navigation</tal:comment>
<metal:nav use-macro="here/skyn/navigate/macros/appyNavigate"/>

View file

@ -154,7 +154,7 @@
<th tal:repeat="colNb python:range(len(widget['columnsWidths']))"
tal:attributes="width python:widget['columnsWidths'][colNb];
align python:widget['columnsAligns'][colNb]"
tal:content="structure python: test(widget['hasHeaders'], contextObj.translate('%s_col%d' % (widget['labelId'], colNb+1)), '')">
tal:content="structure python: widget['hasHeaders'] and contextObj.translate('%s_col%d' % (widget['labelId'], colNb+1)) or ''">
</th>
</tr>
<tal:comment replace="nothing">The rows of widgets</tal:comment>