X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Fjsite%2Fi18n%2FI18n.java;h=ae6bef5043b131d814839f4f2ca240ccdfe96d0d;hb=90f3a1c8e0c85f19c82130e49d7a605cb9e55286;hp=504dc8815ae3377347e5c20b6d60cb145b177225;hpb=2a6a72b633401f2a8391b604c064e1fb6b561308;p=jSite2.git diff --git a/src/net/pterodactylus/jsite/i18n/I18n.java b/src/net/pterodactylus/jsite/i18n/I18n.java index 504dc88..ae6bef5 100644 --- a/src/net/pterodactylus/jsite/i18n/I18n.java +++ b/src/net/pterodactylus/jsite/i18n/I18n.java @@ -87,7 +87,8 @@ public class I18n { String value = null; value = currentLanguage.getProperty(key); if (value == null) { - return key; + System.err.println("please fix “" + key + "”!"); + return null; } if ((parameters != null) && (parameters.length > 0)) { return MessageFormat.format(value, parameters); @@ -106,10 +107,7 @@ public class I18n { */ public static int getKey(String key) { String value = currentLanguage.getProperty(key); - if (value == null) { - return -1; - } - if (value.startsWith("VK_")) { + if ((value != null) && value.startsWith("VK_")) { try { Field field = KeyEvent.class.getField(value); return field.getInt(null); @@ -123,7 +121,8 @@ public class I18n { /* ignore. */ } } - return value.toUpperCase().charAt(0); + System.err.println("please fix “" + key + "”!"); + return KeyEvent.VK_UNDEFINED; } /**