[PATCH 3 of 7] Fixed: do not fall back to default language; englisch works now correctly
Wald Commits
scm-commit at wald.intevation.org
Fri May 25 10:49:52 CEST 2018
# HG changeset patch
# User gernotbelger
# Date 1527238019 -7200
# Node ID 8ad581d4690cc0c1738aadb503dd39e6a5d98b05
# Parent 3444c0bcc4806e781c2af9c5a364aa2c6ecabba6
Fixed: do not fall back to default language; englisch works now correctly
diff -r 3444c0bcc480 -r 8ad581d4690c artifacts/src/main/java/org/dive4elements/river/artifacts/resources/Resources.java
--- 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);
More information about the Dive4Elements-commits
mailing list