Commit 5e7811a2 authored by Rafael Monnerat's avatar Rafael Monnerat

erp5_web_renderjs_ui: Use RJS Skin to check consistency

parent c900f2d7
......@@ -12,14 +12,17 @@ if not context.getAvailableLanguageList():
if context.getSkinSelectionName() != 'RJS':
return []
# find the .js containing translation data
gadget_translation_data_js = context.WebSite_getTranslationDataWebScriptValue()
if gadget_translation_data_js is None:
try:
context.getPortalObject().changeSkin("RJS")
# find the .js containing translation data
gadget_translation_data_js = context.WebSite_getTranslationDataWebScriptValue()
if gadget_translation_data_js is None:
return []
error_list = []
if context.WebSite_getTranslationDataTextContent(
) != gadget_translation_data_js.getTextContent():
error_list = []
if context.WebSite_getTranslationDataTextContent(
) != gadget_translation_data_js.getTextContent():
error_list.append("Translation data script content is not up to date")
if fixit:
......@@ -47,4 +50,6 @@ if context.WebSite_getTranslationDataTextContent(
error_list.extend(
context.WebSite_checkCacheModificationDateConsistency(fixit=True))
return error_list
return error_list
finally:
context.getPortalObject().changeSkin("View")
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