projects
/
jSite2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
enhance javadoc
[jSite2.git]
/
src
/
net
/
pterodactylus
/
jsite
/
i18n
/
I18n.java
diff --git
a/src/net/pterodactylus/jsite/i18n/I18n.java
b/src/net/pterodactylus/jsite/i18n/I18n.java
index
504dc88
..
ae6bef5
100644
(file)
--- 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) {
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);
}
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);
*/
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);
try {
Field field = KeyEvent.class.getField(value);
return field.getInt(null);
@@
-123,7
+121,8
@@
public class I18n {
/* ignore. */
}
}
/* ignore. */
}
}
- return value.toUpperCase().charAt(0);
+ System.err.println("please fix “" + key + "”!");
+ return KeyEvent.VK_UNDEFINED;
}
/**
}
/**