diff --git a/json2properties-generator/pom.xml b/json2properties-generator/pom.xml index cba3742..50459c7 100644 --- a/json2properties-generator/pom.xml +++ b/json2properties-generator/pom.xml @@ -6,7 +6,7 @@ com.namics.oss.magnolia magnolia-dictionary-parent - 1.3.2 + 1.3.3-SNAPSHOT json2properties-generator diff --git a/magnolia-dictionary/pom.xml b/magnolia-dictionary/pom.xml index 34ff095..bd7cf0b 100644 --- a/magnolia-dictionary/pom.xml +++ b/magnolia-dictionary/pom.xml @@ -6,7 +6,7 @@ com.namics.oss.magnolia magnolia-dictionary-parent - 1.3.2 + 1.3.3-SNAPSHOT magnolia-dictionary diff --git a/magnolia-dictionary/src/main/java/com/namics/oss/magnolia/dictionary/i18nsystem/DictionaryTranslationServiceImpl.java b/magnolia-dictionary/src/main/java/com/namics/oss/magnolia/dictionary/i18nsystem/DictionaryTranslationServiceImpl.java index 942cc07..2bedcb0 100644 --- a/magnolia-dictionary/src/main/java/com/namics/oss/magnolia/dictionary/i18nsystem/DictionaryTranslationServiceImpl.java +++ b/magnolia-dictionary/src/main/java/com/namics/oss/magnolia/dictionary/i18nsystem/DictionaryTranslationServiceImpl.java @@ -97,7 +97,8 @@ protected Optional doGetMessage(final String[] keys, final Locale locale .flatMap(properties -> Arrays.stream(keys) .map(DictionaryUtils::getValidMessageNodeName) - .map(properties::getProperty) + .map(key -> Optional.ofNullable(properties.getProperty(key))) + .flatMap(Optional::stream) ) .findFirst(); } 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 88a6ea4..f118ac9 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 @@ -38,6 +38,13 @@ + + + i18n + */* + + + magnolia diff --git a/pom.xml b/pom.xml index 863d4b6..ad263bf 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.namics.oss.magnolia magnolia-dictionary-parent - 1.3.2 + 1.3.3-SNAPSHOT pom ${project.artifactId}