Commit ec264078 authored by Jérome Perrin's avatar Jérome Perrin

if domain is empty, no translation is performed


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31118 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7b3de15f
...@@ -2169,6 +2169,17 @@ class TestPropertySheet: ...@@ -2169,6 +2169,17 @@ class TestPropertySheet:
self.assertEquals('foo', doc.getTranslatedDummy()) self.assertEquals('foo', doc.getTranslatedDummy())
self.assertEquals(['foo'], self.portal.Localizer.default._translated) self.assertEquals(['foo'], self.portal.Localizer.default._translated)
# 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))
doc.setDummy('foo')
self.assertFalse(doc.getDummyTranslationDomain())
self.assertEquals('foo', doc.getTranslatedDummy())
self.assertEquals([], self.portal.Localizer.erp5_ui._translated)
# _aq_reset should be called implicitly when the system configuration # _aq_reset should be called implicitly when the system configuration
# changes: # changes:
def test_aq_reset_on_portal_types_properties_change(self): def test_aq_reset_on_portal_types_properties_change(self):
......
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