Commit 2578ae7e authored by Jérome Perrin's avatar Jérome Perrin

test the full functionality of translated accessors


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17876 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 46073adb
......@@ -1729,8 +1729,23 @@ class TestPropertySheet:
self.assertEquals('erp5_ui', doc.getDummyTranslationDomain())
doc.setDummy('foo')
self.assertEquals('foo', doc.getTranslatedDummy())
# the value of the property is translated with erp5_ui
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.assertEquals('erp5_content', doc.getDummyTranslationDomain())
self.assertEquals('foo', doc.getTranslatedDummy())
self.assertEquals(['foo'],
self.portal.Localizer.erp5_content._translated)
# set on instance. It has priority over portal type
doc.setDummyTranslationDomain('default')
self.assertEquals('default', doc.getDummyTranslationDomain())
self.assertEquals('foo', doc.getTranslatedDummy())
self.assertEquals(['foo'], self.portal.Localizer.default._translated)
# _aq_reset should be called implicitly when the system configuration
# changes:
......
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