changeset 9085:8ad581d4690c

Fixed: do not fall back to default language; englisch works now correctly
author gernotbelger
date Fri, 25 May 2018 10:46:59 +0200
parents 3444c0bcc480
children b5dbcbaed42b
files artifacts/src/main/java/org/dive4elements/river/artifacts/resources/Resources.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/resources/Resources.java	Fri May 25 10:46:31 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/resources/Resources.java	Fri May 25 10:46:59 2018 +0200
@@ -12,6 +12,7 @@
 import java.util.Locale;
 import java.util.MissingResourceException;
 import java.util.ResourceBundle;
+import java.util.ResourceBundle.Control;
 
 import org.apache.log4j.Logger;
 
@@ -175,7 +176,7 @@
      * @return the translated message.
      */
     public static String getMsg(Locale locale, String key, String def) {
-        ResourceBundle bundle = ResourceBundle.getBundle("messages", locale);
+        ResourceBundle bundle = ResourceBundle.getBundle("messages", locale, Control.getNoFallbackControl(Control.FORMAT_DEFAULT));
 
         try {
             return bundle.getString(key);

http://dive4elements.wald.intevation.org