diff --git a/util/src/main/java/tc/oc/pgm/util/text/TextTranslations.java b/util/src/main/java/tc/oc/pgm/util/text/TextTranslations.java index bbefdf6b60..8736b5e5fe 100644 --- a/util/src/main/java/tc/oc/pgm/util/text/TextTranslations.java +++ b/util/src/main/java/tc/oc/pgm/util/text/TextTranslations.java @@ -224,7 +224,7 @@ public static long loadKeys(Locale locale) { String format = resource.getString(key); // Single quotes are a special keyword that need to be escaped in MessageFormat - // Templates are not escaped, where as translations are escaped + // Templates are not escaped, whereas translations are escaped if (locale == SOURCE_LOCALE) format = format.replaceAll("'", "''"); TRANSLATIONS_TABLE.put(key, locale, new MessageFormat(format, locale)); diff --git a/util/src/main/java/tc/oc/pgm/util/text/UTF8Control.java b/util/src/main/java/tc/oc/pgm/util/text/UTF8Control.java index d27a6ca953..c9c754242e 100644 --- a/util/src/main/java/tc/oc/pgm/util/text/UTF8Control.java +++ b/util/src/main/java/tc/oc/pgm/util/text/UTF8Control.java @@ -6,6 +6,8 @@ import java.net.URL; import java.net.URLConnection; import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; import java.util.Locale; import java.util.PropertyResourceBundle; import java.util.ResourceBundle; @@ -49,4 +51,9 @@ public ResourceBundle newBundle( } return bundle; } + + @Override + public List getCandidateLocales(String name, Locale locale) { + return Arrays.asList(Locale.ROOT); + } }