Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions Essentials/src/main/java/com/earth2me/essentials/I18n.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public static String tlLocale(final Locale locale, final String tlKey, final Obj
if (objects.length == 0) {
return NODOUBLEMARK.matcher(instance.translate(locale, tlKey)).replaceAll("'");
} else {
return instance.format(tlKey, objects);
return instance.format(locale, tlKey, objects);
}
}

Expand Down Expand Up @@ -162,10 +162,6 @@ private String translate(final Locale locale, final String string) {
}
}

private String format(final String string, final Object... objects) {
return format(currentLocale, string, objects);
}

private String format(final Locale locale, final String string, final Object... objects) {
String format = translate(locale, string);

Expand Down Expand Up @@ -281,7 +277,7 @@ public InputStream getResourceAsStream(final String string) {
* Reads .properties files as UTF-8 instead of ISO-8859-1, which is the default on Java 8/below.
* Java 9 fixes this by defaulting to UTF-8 for .properties files.
*/
private static class UTF8PropertiesControl extends ResourceBundle.Control {
private static final class UTF8PropertiesControl extends ResourceBundle.Control {
public ResourceBundle newBundle(final String baseName, final Locale locale, final String format, final ClassLoader loader, final boolean reload) throws IOException {
final String resourceName = toResourceName(toBundleName(baseName, locale), "properties");
ResourceBundle bundle = null;
Expand Down
Loading