Affects Version/s: None
Fix Version/s: 5.5.2
Sprint:Basel 79, Basel 80, Basel 83
MAGNOLIA-6724 & MGNLGROOVY-143 we found that info.magnolia.i18nsystem.DefaultMessageBundlesLoader#logDuplicates and its verbose output in the log was printed twice – once upon component initialisation and once when calling info.magnolia.i18nsystem.TranslationServiceImpl#reloadMessageBundles.
The reason is that info.magnolia.i18nsystem.TranslationServiceImpl#setupMessageBundles creates a new instance of DefaultMessageBundlesLoader for each call, therefore omitting the component definition in META-INF/magnolia/i18n.xml of the i18n module.
It would be desirable to use
in order to only maintain one component and therefore preventing potential memory leaks.
However this will prevent for any changes in message properties files to be reflected in the translation service during runtime.
Possible workaround could be to add the possibility to reload message property files in DefaultMessageBundlesLoader or make it aware of changes in origins (info.magnolia.resourceloader.ResourceOriginChange). Ideally we move registration of the event handler for ModulesStartedEvent to the component DefaultMessageBundlesLoader.
We should investigate and also find out why the new instance call was added in the first place and what impact above change could have.