Activity log for bug #428882

Date Who What changed Old value New value Message
2009-09-13 14:29:27 Ethan Jucovy bug added bug
2009-09-13 14:29:27 Ethan Jucovy attachment added add_factory.diff http://launchpadlibrarian.net/31749913/add_factory.diff
2009-09-13 14:37:46 Ethan Jucovy description It is useful to be able to override the default zope.i18n.translationdomain.TranslationDomain -- for example I have one override that always injects a certain value into the translation mapping, and another that prepends all new catalogs rather than appending them. This is currently difficult without monkeypatching zope/i18n/zcml.py's `handler` or forking its `registerTranslations` function. The attached patch adds an optional `factory` argument to both `registerTranslations` and `handler` so that custom ZCML directives can invoke `registerTranslations` with their choice of ITranslationDomain. It might also be worth checking that the provided `factory` implements (or can be adapted to?) ITranslationDomain, and preventing startup if it does not. The <registerTranslations/> directive could also be extended with an optional `factory` parameter whose default is zope.i18n.translationdomain.TranslationDomain. This isn't necessary, though, and it's arguably cleaner to write new directives for particular overrides. It is useful to be able to override the default zope.i18n.translationdomain.TranslationDomain -- for example I have one override that always injects a certain value into the translation mapping, and another that prepends all new catalogs rather than appending them. This is currently difficult without monkeypatching zope/i18n/zcml.py's `handler` or forking its `registerTranslations` function. The attached patch adds an optional `factory` argument to both `registerTranslations` and `handler` so that custom ZCML directives can invoke `registerTranslations` with their choice of ITranslationDomain. It might also be worth checking that the object returned by the provided `factory` implements (or can be adapted to?) ITranslationDomain, and preventing startup if it does not. The <registerTranslations/> directive could also be extended with an optional `factory` parameter whose default is zope.i18n.translationdomain.TranslationDomain. This isn't necessary, though, and it's arguably cleaner to write new directives for particular overrides.
2010-04-14 23:37:59 Tres Seaver bug task added zope.i18n
2010-04-14 23:38:20 Tres Seaver zope3: status New Won't Fix
2010-04-14 23:39:41 Tres Seaver zope.i18n: importance Undecided Medium
2010-04-14 23:39:42 Tres Seaver zope.i18n: status New Triaged
2015-01-28 21:17:27 Tres Seaver zope.i18n: status Triaged Won't Fix