Commit fd0cae1f authored by Georgios Dagkakis's avatar Georgios Dagkakis

erp5_xhtml_style/field_render: do not translate title and/or description if TALESMethod

expression contains no_translate prefix for these fields
parent e19e4117
......@@ -10,16 +10,17 @@
field_errors python: request.get('field_errors', {});
field_has_error python: field_errors.has_key(field_id);
global form_id form_id | form/id | nothing;
tales_title_no_translate python: hasattr(field.tales.get('title'), 'hasPrefix') and field.tales.get('title').hasPrefix('no_translate');
tales_description_no_translate python: hasattr(field.tales.get('description'), 'hasPrefix') and field.tales.get('description').hasPrefix('no_translate');
field_description field/Field_getDescription;
translated_field_description python: tales_description_no_translate and field_description or here.Base_translateString(field_description);
is_web_mode is_web_mode | nothing">
<div tal:define="html_render python: field.render_htmlgrid(value, request, render_prefix=render_prefix, key_prefix=key_prefix)"
tal:attributes="title field_description;
class python: ' '.join([x for x in ['field', field.is_required() and 'required' or None, field_has_error and 'error' or None, field.get_value('css_class') or None] if x is not None])"
i18n:attributes="title" i18n:domain="ui">
tal:attributes="title translated_field_description;
class python: ' '.join([x for x in ['field', field.is_required() and 'required' or None, field_has_error and 'error' or None, field.get_value('css_class') or None] if x is not None])">
<tal:block tal:repeat="html_tuple html_render">
<label>
<tal:block tal:content="structure python: html_tuple[0]"
i18n:translate="" i18n:domain="ui" />
<tal:block tal:content="structure python: tales_title_no_translate and html_tuple[0] or here.Base_translateString(html_tuple[0])" />
<tal:block tal:condition="preferred_html_style_developper_mode">
<tal:block metal:use-macro="developper_shortcut_render/macros/field_developper" />
</tal:block>
......@@ -37,4 +38,4 @@
</div>
</tal:block>
</tal:block>
</tal:block>
</tal:block>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment