Commit 8d72e55e authored by wenjie.zheng's avatar wenjie.zheng

erp5_core: ERP5Site_updateTranslationTable, reconstruct function for new workflow structure.

parent 868150c0
......@@ -71,13 +71,13 @@ def catalog_translation_list(object_list):\n
# Translate every workflow state in the context of the state variable\n
object_list = []\n
portal_workflow = context.portal_workflow\n
for wf_id, portal_type_list in portal_workflow.getChainDict().items():\n
wf = getattr(portal_workflow, wf_id, None)\n
portal_type_list = context.portal_types.objectValues()\n
for wf in portal_workflow.objectValues():\n
if wf is None:\n
continue\n
state_var = wf.variables.getStateVar()\n
if wf.states:\n
for state_id, state in wf.states.items():\n
state_var = wf.getStateVariable()\n
if wf.getStateValueList():\n
for state_id, state in wf.getStateValueList().items():\n
for lang in supported_languages:\n
for portal_type in portal_type_list:\n
key = (lang, portal_type, state_var, state_id)\n
......
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