-
Bug
-
Resolution: Won't Fix
-
Major
-
None
-
None
-
-
Empty show more show less
-
Sprint 2 (Vietnam)
-
0
In info.magnolia.i18nsystem.DefaultMessageBundlesLoader,
This line of code let user know that the old message will be replace with new one:
log.warn("Found duplicate key [{}] at file [{}]. The new key will overwrite the existing one. Please set the log level of this class to DEBUG to find out more.", key, propertiesFile);
But actually, the logic in the code below, it keeps the old messages:
final Properties properties = new Properties(); properties.load(inStream); Properties existingProperties = messages.get(locale); if (existingProperties != null) { checkForDuplicates(existingProperties, properties, propertiesFile); // this locale already exists in our bundle, add the new ones log.debug("Adding properties to already existing ones under {} locale", locale); properties.putAll(existingProperties); } messages.put(locale, properties);
In the case user want to modify the core messages:
- they have to create a module that extends core
- defines messages with same keys,
but it will not work.
So, the logic should be changed:
the new message should replace the old message.
Acceptance criteria
- relates to
-
MAGNOLIA-6453 DefaultMessageBundlesLoader: align log messages and javadocs with its business logic
- Closed