remove Id keyword
[jSite2.git] / src / net / pterodactylus / jsite / i18n / I18n.java
index e069fa5..8223a0b 100644 (file)
@@ -31,19 +31,24 @@ import java.util.Locale;
 import java.util.MissingResourceException;
 import java.util.Properties;
 import java.util.StringTokenizer;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.swing.KeyStroke;
 
 import net.pterodactylus.util.io.Closer;
+import net.pterodactylus.util.logging.Logging;
 
 /**
  * Class that handles i18n.
  * 
  * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
  */
 public class I18n {
 
+       /** Logger. */
+       private static final Logger logger = Logging.getLogger(I18n.class.getName());
+
        /** List of I18nables that are notified when the language changes. */
        private static final List<I18nable> i18nables = new ArrayList<I18nable>();
 
@@ -87,7 +92,8 @@ public class I18n {
                String value = null;
                value = currentLanguage.getProperty(key);
                if (value == null) {
-                       System.out.println("please fix “" + key + "”!");
+                       logger.log(Level.WARNING, "please fix “" + key + "”!", new Throwable());
+                       /* TODO - replace with value when done! */
                        return null;
                }
                if ((parameters != null) && (parameters.length > 0)) {
@@ -150,6 +156,9 @@ public class I18n {
                                modifierMask |= InputEvent.SHIFT_DOWN_MASK;
                        } else {
                                if (keyToken.startsWith("VK_")) {
+                                       if (keyToken.equals("VK_UNDEFINED")) {
+                                               return null;
+                                       }
                                        try {
                                                Field field = KeyEvent.class.getField(keyToken);
                                                return KeyStroke.getKeyStroke(field.getInt(null), modifierMask);