Handle bad formats with an exception. Translators MAKE SURE you watch for this error!
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
This commit is contained in:
parent
4441935a4a
commit
64a92530d9
1 changed files with 6 additions and 1 deletions
|
@ -88,7 +88,12 @@ public class ForgeI18n {
|
|||
|
||||
public static String parseMessage(final String i18nMessage, Object... args) {
|
||||
final String pattern = getPattern(i18nMessage);
|
||||
return parseFormat(pattern, args);
|
||||
try {
|
||||
return parseFormat(pattern, args);
|
||||
} catch (IllegalArgumentException e) {
|
||||
LOGGER.error("Illegal format found {}", pattern, e);
|
||||
return pattern;
|
||||
}
|
||||
}
|
||||
|
||||
public static String parseFormat(final String format, final Object... args) {
|
||||
|
|
Loading…
Reference in a new issue