mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-26 15:03:04 +00:00
Skip the MessageFormat parse in ForgeI18n for strings with no format syntax (#10894)
This commit is contained in:
1 parent
ae3c937073
commit
8418bad66d
1 file changed
+4
@@ -95,6 +95,10 @@ public class ForgeI18n {
|
||||
}
|
||||
|
||||
public static String parseFormat(final String format, final Object... args) {
|
||||
// No format elements and no quotes: MessageFormat would return the pattern unchanged, so skip parsing it
|
||||
if (format != null && format.indexOf('{') < 0 && format.indexOf('\'') < 0) {
|
||||
return format;
|
||||
}
|
||||
final ExtendedMessageFormat extendedMessageFormat = new ExtendedMessageFormat(format, customFactories);
|
||||
return extendedMessageFormat.format(args);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user