diff --git a/json2properties-generator/pom.xml b/json2properties-generator/pom.xml index 5738e25..5bd3c4c 100644 --- a/json2properties-generator/pom.xml +++ b/json2properties-generator/pom.xml @@ -6,7 +6,7 @@ com.namics.oss.magnolia magnolia-dictionary-parent - 1.3.3 + 1.3.4-SNAPSHOT json2properties-generator diff --git a/magnolia-dictionary/pom.xml b/magnolia-dictionary/pom.xml index cfc196f..2c0f480 100644 --- a/magnolia-dictionary/pom.xml +++ b/magnolia-dictionary/pom.xml @@ -6,7 +6,7 @@ com.namics.oss.magnolia magnolia-dictionary-parent - 1.3.3 + 1.3.4-SNAPSHOT magnolia-dictionary diff --git a/magnolia-dictionary/src/main/java/com/namics/oss/magnolia/dictionary/DictionaryModule.java b/magnolia-dictionary/src/main/java/com/namics/oss/magnolia/dictionary/DictionaryModule.java index 812a549..47f2606 100644 --- a/magnolia-dictionary/src/main/java/com/namics/oss/magnolia/dictionary/DictionaryModule.java +++ b/magnolia-dictionary/src/main/java/com/namics/oss/magnolia/dictionary/DictionaryModule.java @@ -55,7 +55,6 @@ public void start(ModuleLifecycleContext moduleLifecycleContext) { LOG.info("Start Dictionary module: Load labels to dictionary"); messagesInstaller.loadLabelsToDictionary(); } - dictionaryMessageBundlesLoader.reload(); } @Override diff --git a/magnolia-dictionary/src/main/java/com/namics/oss/magnolia/dictionary/i18nsystem/DictionaryMessageBundlesLoader.java b/magnolia-dictionary/src/main/java/com/namics/oss/magnolia/dictionary/i18nsystem/DictionaryMessageBundlesLoader.java index 5c9e86a..5bb8822 100644 --- a/magnolia-dictionary/src/main/java/com/namics/oss/magnolia/dictionary/i18nsystem/DictionaryMessageBundlesLoader.java +++ b/magnolia-dictionary/src/main/java/com/namics/oss/magnolia/dictionary/i18nsystem/DictionaryMessageBundlesLoader.java @@ -37,7 +37,7 @@ public class DictionaryMessageBundlesLoader implements EventListener { private static final Logger LOG = LoggerFactory.getLogger(DictionaryMessageBundlesLoader.class); private final Provider systemContextProvider; - private Map messages = Collections.emptyMap(); + private Map messages; @Inject public DictionaryMessageBundlesLoader(final Provider systemContextProvider) { @@ -84,6 +84,9 @@ private Stream> streamMessages(final Locale locale, fi } public Map getMessages() { + if(messages == null) { + reload(); + } return messages; } diff --git a/magnolia-dictionary/src/main/resources/META-INF/magnolia/magnolia-dictionary.xml b/magnolia-dictionary/src/main/resources/META-INF/magnolia/magnolia-dictionary.xml index f118ac9..a6e8af6 100644 --- a/magnolia-dictionary/src/main/resources/META-INF/magnolia/magnolia-dictionary.xml +++ b/magnolia-dictionary/src/main/resources/META-INF/magnolia/magnolia-dictionary.xml @@ -43,6 +43,16 @@ i18n */* + + site + * + true + + + multisite + * + true + diff --git a/pom.xml b/pom.xml index c72328e..7d68d3e 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.namics.oss.magnolia magnolia-dictionary-parent - 1.3.3 + 1.3.4-SNAPSHOT pom ${project.artifactId}