Commit ec477dd9 authored by Dave Cridland's avatar Dave Cridland

Merge pull request #90 from akrherz/of593

OF-593 LocaleUtils: convert dots to underscores
parents 277f3f21 12ebbb9b
......@@ -474,7 +474,7 @@ public class LocaleUtils {
if (locale == null) {
locale = JiveGlobals.getLocale();
}
String i18nFile = pluginName + "_i18n";
String i18nFile = getI18nFile(pluginName);
// Retrieve classloader from pluginName.
final XMPPServer xmppServer = XMPPServer.getInstance();
......@@ -511,7 +511,7 @@ public class LocaleUtils {
public static ResourceBundle getPluginResourceBundle(String pluginName) throws Exception {
final Locale locale = JiveGlobals.getLocale();
String i18nFile = pluginName + "_i18n";
String i18nFile = getI18nFile(pluginName);
// Retrieve classloader from pluginName.
final XMPPServer xmppServer = XMPPServer.getInstance();
......@@ -525,6 +525,10 @@ public class LocaleUtils {
return ResourceBundle.getBundle(i18nFile, locale, pluginClassLoader);
}
private static String getI18nFile(String pluginName) {
return pluginName.replace('.', '_') + "_i18n";
}
/**
* Returns an internationalized string loaded from a resource bundle using
* the passed in Locale substituting the passed in arguments. Substitution
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment