From 44c371eca42e7f120c6eaa663d2b8928bc566d10 Mon Sep 17 00:00:00 2001
From: Vincent Pelletier <vincent@nexedi.com>
Date: Tue, 15 May 2007 17:25:31 +0000
Subject: [PATCH] Translation cache must always use the original (untranslated)
 value to avoid duplicates, because otherwise if "foo" translates as "bar",
 and "baz" translates also as "bar", only the first encountered will get
 indexed in translation table, meaning that any translated search on "baz"
 will produce no result. It causes the invisibility of some lines in listboxes
 typically when filtering by translated_workflow_state_title.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14500 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../portal_skins/erp5_core/ERP5Site_updateTranslationTable.xml  | 2 +-
 product/ERP5/bootstrap/erp5_core/bt/revision                    | 2 +-
 2 files changed, 2 insertions(+), 2 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 1c9848d425..6b659c8ea3 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
@@ -98,7 +98,7 @@ for wf in context.portal_workflow.objectValues():\n
         if state.title != \'\' :\n
           state_var_title = \'%s_title\' % state_var\n
           translated_message = context.Localizer.erp5_ui.gettext(state.title.decode(\'utf-8\'), lang=lang).encode(\'utf-8\')\n
-          key = (lang, state_var_title, translated_message)\n
+          key = (lang, state_var_title, state_id)\n
           if not translated_keys.has_key(key):\n
             translated_keys[key] = None # mark as translated\n
             obj = newTempBase(context, \'temp_translation_%d\' % i,\n
diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision
index 6f96da6692..55bd0ac4c4 100644
--- a/product/ERP5/bootstrap/erp5_core/bt/revision
+++ b/product/ERP5/bootstrap/erp5_core/bt/revision
@@ -1 +1 @@
-332
+333
-- 
2.30.9