diff --git a/src/java/com/threerings/util/MessageBundle.java b/src/java/com/threerings/util/MessageBundle.java index d65e29e38..19b1ad0e3 100644 --- a/src/java/com/threerings/util/MessageBundle.java +++ b/src/java/com/threerings/util/MessageBundle.java @@ -52,6 +52,15 @@ public class MessageBundle return MessageUtil.taint(text); } + /** + * Composes a message key with a single argument. The message can + * subsequently be translated in a single call using {@link #xlate}. + */ + public static String compose (String key, Object arg) + { + return MessageUtil.compose(key, new Object[] { arg }); + } + /** * Composes a message key with an array of arguments. The message can * subsequently be translated in a single call using {@link #xlate}. @@ -70,6 +79,16 @@ public class MessageBundle return MessageUtil.compose(key, args); } + /** + * A convenience method for calling {@link #compose(String,Object[])} + * with an array of arguments that will be automatically tainted (see + * {@link #taint}). + */ + public static String tcompose (String key, Object arg) + { + return MessageUtil.tcompose(key, new Object[] { arg }); + } + /** * A convenience method for calling {@link #compose(String,Object[])} * with an array of arguments that will be automatically tainted (see