Commit bc2cfd7d authored by Vincent Pelletier's avatar Vincent Pelletier

Add a check for Message-based translation.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20954 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dbef2129
......@@ -2919,7 +2919,9 @@ class TestCMFActivity(ERP5TypeTestCase):
TO_STRING = 'Bar'
LANGUAGE = 'xx'
def translationTest(context):
from Products.ERP5Type.Message import Message
context.setTitle(context.Base_translateString(FROM_STRING))
context.setDescription(str(Message('erp5_ui', FROM_STRING)))
portal = self.getPortalObject()
portal.Localizer.erp5_ui.manage_addLanguage(LANGUAGE)
# Add FROM_STRING to the message catalog
......@@ -2945,6 +2947,7 @@ class TestCMFActivity(ERP5TypeTestCase):
finally:
delattr(Organisation, 'translationTest')
self.assertEqual(TO_STRING, organisation.getTitle())
self.assertEqual(TO_STRING, organisation.getDescription())
def test_112_checkLocalizerWorksSQLQueue(self, quiet=0, run=run_all_test):
if not run: return
......
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