Commit 83e52c00 authored by wenjie.zheng's avatar wenjie.zheng

erp5_core: ERP5Site_updateTranslationTable uses accessor to get state title.

parent 93f60cb5
......@@ -96,13 +96,14 @@ for portal_type in portal_type_list:\n
translated_message=translated_message))\n
\n
# translate state title as well\n
if state.title != \'\' :\n
state_title = state.getTitle()\n
if state_title not in [None, \'\']:\n
state_var_title = \'%s_title\' % state_var\n
msg_id = getMessageIdWithContext(state.title, \'state\', wf_id)\n
msg_id = getMessageIdWithContext(state_title, \'state\', wf_id)\n
translated_message = context.Localizer.erp5_ui.gettext(msg_id, default=\'\', lang=lang).encode(\'utf-8\')\n
if translated_message == \'\':\n
msg_id = state.title\n
translated_message = context.Localizer.erp5_ui.gettext(state.title.decode(\'utf-8\'), lang=lang).encode(\'utf-8\')\n
msg_id = state_title\n
translated_message = context.Localizer.erp5_ui.gettext(state_title.decode(\'utf-8\'), lang=lang).encode(\'utf-8\')\n
key = (lang, pt_id, state_var_title, state_ref, msg_id)\n
if not translated_keys.has_key(key):\n
translated_keys[key] = None # mark as translated\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