Commit 74ca0bec authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Do not expect all HTML pages to be in web page module

parent eb696886
import re import re
import json import json
portal = context.getPortalObject()
Base_translateString = context.Base_translateString Base_translateString = context.Base_translateString
...@@ -12,9 +14,8 @@ tmp_re = re.compile(r"""/[{}]/g, """"") ...@@ -12,9 +14,8 @@ tmp_re = re.compile(r"""/[{}]/g, """"")
translate_word = [] translate_word = []
web_page_list = context.Base_getListFileFromAppcache(only_html=1) for web_page in portal.web_page_module.searchFolder(portal_type='Web Page',
for web_page in web_page_list: reference=context.Base_getListFileFromAppcache(only_html=1)):
web_page = context.web_page_module.searchFolder(portal_type='Web Page',reference=web_page)[0]
data = attribute_filter_re.findall(web_page.getTextContent()) data = attribute_filter_re.findall(web_page.getTextContent())
for attribute in data: for attribute in data:
a = re.sub(r'[{|}]', "", attribute[1]) a = re.sub(r'[{|}]', "", attribute[1])
......
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