Commit 634cea46 authored by Vincent Pelletier's avatar Vincent Pelletier

Follow new translation domain settings API.

changeTranslations was removed in c60e89fe in favour of single-value,
better-named setter.
parent ead071d4
......@@ -69,8 +69,8 @@ module_portal_type_value.edit(\n
type_base_category_list=(\'business_application\',),\n
type_group=\'module\')\n
# initialize translation domains\n
module_portal_type_value.changeTranslations(\n
properties=dict(title=\'erp5_ui\', short_title=\'erp5_ui\'))\n
module_portal_type_value.setTranslationDomain(\'title\', \'erp5_ui\')\n
module_portal_type_value.setTranslationDomain(\'short_title\', \'erp5_ui\')\n
\n
module_list_form_id = (\'%s_view%sList\' % (module_portal_type,\n
object_portal_type)).replace(\' \', \'\')\n
......
......@@ -48,9 +48,9 @@ class TestContentTranslation(ERP5TypeTestCase):
def afterSetUp(self):
# set up translation domain on Person type information.
from Products.ERP5Type.Accessor.Translation import TRANSLATION_DOMAIN_CONTENT_TRANSLATION
self.portal.portal_types.Person.changeTranslations(
dict(first_name=TRANSLATION_DOMAIN_CONTENT_TRANSLATION,
last_name=TRANSLATION_DOMAIN_CONTENT_TRANSLATION))
setTranslationDomain = self.portal.portal_types.Person.setTranslationDomain
setTranslationDomain('first_name', TRANSLATION_DOMAIN_CONTENT_TRANSLATION)
setTranslationDomain('last_name', TRANSLATION_DOMAIN_CONTENT_TRANSLATION)
def testCatalogSearch(self):
"""
......
......@@ -2410,8 +2410,8 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
self.assertEquals(['foo'], self.portal.Localizer.erp5_ui._translated)
# we can change the translation domain on the portal type
self.portal.portal_types.Person.changeTranslations(
dict(dummy='erp5_content'))
self.portal.portal_types.Person.setTranslationDomain('dummy',
'erp5_content')
transaction.commit()
self.assertEquals('erp5_content', doc.getDummyTranslationDomain())
......@@ -2428,8 +2428,7 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
# if domain is empty, no translation is performed
doc = self.portal.person_module.newContent(portal_type='Person')
self.portal.Localizer = DummyLocalizer()
self.portal.portal_types.Person.changeTranslations(
dict(dummy=None))
self.portal.portal_types.Person.setTranslationDomain('dummy', None)
transaction.commit()
doc.setDummy('foo')
......
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