mirror of
https://github.com/moparisthebest/davmail
synced 2024-08-13 16:53:51 -04:00
25 lines
675 B
Java
25 lines
675 B
Java
|
package davmail;
|
||
|
|
||
|
import java.text.MessageFormat;
|
||
|
import java.util.ResourceBundle;
|
||
|
|
||
|
/**
|
||
|
* Internationalization message.
|
||
|
*/
|
||
|
public class BundleMessage {
|
||
|
protected static final String MESSAGE_BUNDLE_NAME = "davmailmessages";
|
||
|
protected static final ResourceBundle MESSAGE_BUNDLE = ResourceBundle.getBundle(MESSAGE_BUNDLE_NAME);
|
||
|
protected final String key;
|
||
|
private final Object[] arguments;
|
||
|
|
||
|
public BundleMessage(String key, Object ... arguments) {
|
||
|
this.key = key;
|
||
|
this.arguments = arguments;
|
||
|
}
|
||
|
|
||
|
public String format() {
|
||
|
return MessageFormat.format(MESSAGE_BUNDLE.getString(key), arguments);
|
||
|
}
|
||
|
|
||
|
}
|