From 16689b51d42882ae0513b076e176ca2c9540610d Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Mon, 25 Sep 2006 05:27:09 +0000 Subject: [PATCH] We need these for binary compatibility with existing Game Gardens games. We may need the two argument versions as well, but I'll wait and see. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4378 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/util/MessageBundle.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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