Commit 2bef46d8 authored by Boris Kocherov's avatar Boris Kocherov Committed by Arnaud Fontaine

add TemplateTool_filterEmptyContentTranslation script

for filter empty content_translation dictonaries in vcs
parent 7ac96345
<?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>
46
\ No newline at end of file
47
\ 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