public static String formatMessage(String key, Object... params)
{
- return MessageFormat.format(rb.getString(key), params);
+ try
+ {
+ return MessageFormat.format(rb.getString(key), params);
+ } catch (Exception e)
+ {
+ log.warning("I18N missing: " + loc + "\t" + key);
+
+ }
+ String value = "[missing key] " + key + "";
+ for (Object p : params)
+ {
+ value += " '" + p.toString() + "'";
+ }
+ return value;
}
public static String formatMessage(String key, String[] params)
{
- return MessageFormat.format(rb.getString(key), (Object[]) params);
+ return formatMessage(rb.getString(key), (Object[]) params);
}
/**