diff --git a/bt5/erp5_content_translation/SkinTemplateItem/portal_skins/erp5_content_translation/TemplateTool_filterEmptyContentTranslation.xml b/bt5/erp5_content_translation/SkinTemplateItem/portal_skins/erp5_content_translation/TemplateTool_filterEmptyContentTranslation.xml new file mode 100644 index 0000000000000000000000000000000000000000..b7577a823598eaa9ae360b2006b792d54c4e94de --- /dev/null +++ b/bt5/erp5_content_translation/SkinTemplateItem/portal_skins/erp5_content_translation/TemplateTool_filterEmptyContentTranslation.xml @@ -0,0 +1,110 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Python Script" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_body</string> </key> + <value> <string encoding="cdata"><![CDATA[ + +if len(old_line_list) == 0 and len(new_line_list) == 6:\n + if \'\\n\'.join(new_line_list) == """\\\n +<key> <string>__translation_dict</string> </key>\n +<value>\n +<dictionary/>\n +</value>\n +</item>\n +<item>""":\n + return True\n +\n +return False\n + + +]]></string> </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>old_line_list, new_line_list</string> </value> + </item> + <item> + <key> <string>categories</string> </key> + <value> + <tuple> + <string>callable_type/script/diff_filter</string> + </tuple> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string encoding="cdata"><![CDATA[ + +This script filter the following xml changes :\n +@@\n ++ <key> <string>__translation_dict</string> </key>\n ++ <value>\n ++ <dictionary/>\n ++ </value>\n ++ </item>\n ++ <item>\n +@@\n + + +]]></string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>TemplateTool_filterEmptyContentTranslation</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Python Script</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_content_translation/bt/revision b/bt5/erp5_content_translation/bt/revision index abc4eff6ac83026669840d289fce80cc9a42baaa..801f1801027f3350b08ad85c984db805cd32e736 100644 --- a/bt5/erp5_content_translation/bt/revision +++ b/bt5/erp5_content_translation/bt/revision @@ -1 +1 @@ -46 \ No newline at end of file +47 \ No newline at end of file