Commit b317dfb0 authored by Mame Coumba Sall's avatar Mame Coumba Sall

2009-03-16 mame

* modified script to reflect changes on msgid when workflow state titles are translated

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26044 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ba10d6e7
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
<value> <string>message_dict = {}\n <value> <string>message_dict = {}\n
\n \n
def add_message(message, comment):\n def add_message(message, comment):\n
\n
if not message:\n if not message:\n
return\n return\n
if message in message_dict:\n if message in message_dict:\n
...@@ -152,14 +153,21 @@ for i in page_template_list:\n ...@@ -152,14 +153,21 @@ for i in page_template_list:\n
#\n #\n
# Workflow\n # Workflow\n
#\n #\n
s_title_list = []\n
for i in context.portal_workflow.objectValues():\n for i in context.portal_workflow.objectValues():\n
add_message(i.title_or_id(), portal_url.getRelativeContentURL(i))\n add_message(i.title_or_id(), portal_url.getRelativeContentURL(i))\n
\n
if not i.states:\n if not i.states:\n
continue\n continue\n
for s in i.states.values():\n for s in i.states.values():\n
if s.title:\n s_title = s.title\n
add_message(s.title, portal_url.getRelativeContentURL(s))\n if s_title:\n
\n # adding a context in msg_id for more precise translation\n
msg_id = \'%s [state in %s]\' % (s_title, i.id)\n
add_message(msg_id, portal_url.getRelativeContentURL(s))\n
# also use state title as msg_id for compatibility\n
add_message(s_title, portal_url.getRelativeContentURL(s))\n
\n
if not i.transitions:\n if not i.transitions:\n
continue\n continue\n
for t in i.transitions.values():\n for t in i.transitions.values():\n
...@@ -275,7 +283,10 @@ return printed\n ...@@ -275,7 +283,10 @@ return printed\n
<string>value</string> <string>value</string>
<string>label</string> <string>label</string>
<string>Base_findStaticTranslationText</string> <string>Base_findStaticTranslationText</string>
<string>s_title_list</string>
<string>s</string> <string>s</string>
<string>s_title</string>
<string>msg_id</string>
<string>t</string> <string>t</string>
<string>worklist</string> <string>worklist</string>
<string>action_title</string> <string>action_title</string>
......
447 448
\ No newline at end of file \ 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