From 5255df897c45b5d865afeee681445e7f3c4d7ace Mon Sep 17 00:00:00 2001
From: Mame Coumba Sall <mame@nexedi.com>
Date: Tue, 17 Mar 2009 16:33:15 +0000
Subject: [PATCH] 2009-03-17 mame script modified to use generic method to get
 message id with context

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26082 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../erp5_core/ERP5Site_updateTranslationTable.xml           | 6 +++---
 product/ERP5/bootstrap/erp5_core/bt/revision                | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_updateTranslationTable.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_updateTranslationTable.xml
index fdb2d9dde6..e9e2bee584 100644
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_updateTranslationTable.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_updateTranslationTable.xml
@@ -54,7 +54,7 @@
         <item>
             <key> <string>_body</string> </key>
             <value> <string>from Products.ERP5Type.Document import newTempBase\n
-from Products.ERP5Type.Utils import getTranslationStringWithContext\n
+from Products.ERP5Type.Utils import getMessageIdWithContext\n
 \n
 supported_languages = context.Localizer.get_supported_languages()\n
 translated_keys = {} # This dict prevents entering the same key twice\n
@@ -83,7 +83,7 @@ for wf in context.portal_workflow.objectValues():\n
         # translate state title as well\n
         if state.title != \'\' :\n
           state_var_title = \'%s_title\' % state_var\n
-          msg_id = msg_id = \'%s [state in %s]\' % (state.title, wf.id)\n
+          msg_id = getMessageIdWithContext(state.title,\'state\',wf.id)\n
           translated_message = context.Localizer.erp5_ui.gettext(msg_id, default=\'\').encode(\'utf-8\')\n
           if translated_message == \'\':\n
             translated_message = context.Localizer.erp5_ui.gettext(state.title.decode(\'utf-8\'), lang=lang).encode(\'utf-8\')\n
@@ -164,7 +164,7 @@ return printed\n
                             <string>Products.ERP5Type.Document</string>
                             <string>newTempBase</string>
                             <string>Products.ERP5Type.Utils</string>
-                            <string>getTranslationStringWithContext</string>
+                            <string>getMessageIdWithContext</string>
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>supported_languages</string>
diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision
index a2998a8b4a..4ee16cc341 100644
--- a/product/ERP5/bootstrap/erp5_core/bt/revision
+++ b/product/ERP5/bootstrap/erp5_core/bt/revision
@@ -1 +1 @@
-1120
\ No newline at end of file
+1122
\ No newline at end of file
-- 
2.30.9