From de388268973f42f016d1cb23648b7d19e3d6084e Mon Sep 17 00:00:00 2001 From: lol768 Date: Sat, 25 Apr 2015 22:59:33 +0100 Subject: [PATCH] Escape apostrophes "The java.text.MessageFormat class uses the apostrophe (\u0027) as an escape character. Consequently, you need to write two consecutive apostrophes in your translation if you wish to display a single apostrophe" --- src/main/java/com/gmail/nossr50/locale/LocaleLoader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/locale/LocaleLoader.java b/src/main/java/com/gmail/nossr50/locale/LocaleLoader.java index 85d18e9f8..f882a2fc5 100644 --- a/src/main/java/com/gmail/nossr50/locale/LocaleLoader.java +++ b/src/main/java/com/gmail/nossr50/locale/LocaleLoader.java @@ -57,7 +57,7 @@ public final class LocaleLoader { public static String formatString(String string, Object... messageArguments) { if (messageArguments != null) { MessageFormat formatter = new MessageFormat(""); - formatter.applyPattern(string); + formatter.applyPattern(string.replace("'", "''")); string = formatter.format(messageArguments); }