Index: src/main/java/com/xpn/xwiki/web/XWikiMessageTool.java
===================================================================
--- src/main/java/com/xpn/xwiki/web/XWikiMessageTool.java	(révision 2133)
+++ src/main/java/com/xpn/xwiki/web/XWikiMessageTool.java	(copie de travail)
@@ -23,6 +23,7 @@
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Date;
@@ -137,7 +138,7 @@
         }
         return translation;
     }
-    
+
     /**
      * @return the list of internationalisation document bundle names as a list of XWiki page names
      *         ("Space.Document") or an empty list if no such documents have been found
@@ -271,4 +272,98 @@
         }
         return returnValue;
     }
+
+    /**
+     * Find a translation and set the <code>param0</code>. Each occurence of
+     * {0} is replaced by the <code>param0</code> value.
+     * 
+     * @param key the key string to find
+     * @param param0 the first param
+     * @return the translated string
+     */
+    public String get(String key, String param0)
+    {
+        Object[] params = { param0 };
+        return get(key, params);
+    }
+
+    /**
+     * Find a translation and set the params values. Each occurence of {XX} is
+     * replaced by the <code>paramXX</code> value.
+     * 
+     * @param key the key string to find
+     * @param param0 the first param
+     * @param param1 the second param
+     * @return the translated string
+     */
+    public String get(String key, String param0, String param1)
+    {
+        Object[] params = { param0, param1 };
+        return get(key, params);
+    }
+
+    /**
+     * Find a translation and set the params values. Each occurence of {XX} is
+     * replaced by the <code>paramXX</code> value.
+     * 
+     * @param key the key string to find
+     * @param param0 the first param
+     * @param param1 the second param
+     * @param param2 the third param
+     * @return the translated string
+     */
+    public String get(String key, String param0, String param1, String param2)
+    {
+        Object[] params = { param0, param1, param2 };
+        return get(key, params);
+    }
+
+    /**
+     * Find a translation and set the params values. Each occurence of {XX} is
+     * replaced by the <code>paramXX</code> value.
+     * 
+     * @param key the key string to find
+     * @param param0 the first param
+     * @param param1 the second param
+     * @param param2 the third param
+     * @param param3 the fourth param
+     * @return the translated string
+     */
+    public String get(String key, String param0, String param1, String param2,
+            String param3)
+    {
+        Object[] params = { param0, param1, param2, param3 };
+        return get(key, params);
+    }
+
+    /**
+     * Find a translation an then run on the param list to replace each param
+     * in the translated string
+     * 
+     * @param key the key string to find
+     * @param params the list of params
+     * @return the translated string
+     */
+    public String get(String key, List params)
+    {
+        return get(key, params.toArray());
+    }
+
+    /**
+     * Find a translation an then run on the param array to replace each param
+     * in the translated string
+     * 
+     * @param key the key string to find
+     * @param params an array with the params
+     * @return the translated string
+     */
+    private String get(String key, Object[] params)
+    {
+        String translation = get(key);
+        if (params != null) {
+            translation = MessageFormat.format(translation, params);
+        }
+        return translation;
+    }
+
 }
Index: src/test/java/com/xpn/xwiki/web/XWikiMessageToolTest.java
===================================================================
--- src/test/java/com/xpn/xwiki/web/XWikiMessageToolTest.java	(révision 2133)
+++ src/test/java/com/xpn/xwiki/web/XWikiMessageToolTest.java	(copie de travail)
@@ -21,16 +21,18 @@
  */
 package com.xpn.xwiki.web;
 
-import java.util.ListResourceBundle;
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
+import java.util.ListResourceBundle;
 
+import org.jmock.Mock;
+import org.jmock.cglib.MockObjectTestCase;
+
 import com.xpn.xwiki.XWiki;
+import com.xpn.xwiki.XWikiConfig;
 import com.xpn.xwiki.XWikiContext;
-import com.xpn.xwiki.XWikiConfig;
 import com.xpn.xwiki.doc.XWikiDocument;
-import org.jmock.cglib.MockObjectTestCase;
-import org.jmock.Mock;
 
 /**
  * Unit tests for the {@link com.xpn.xwiki.web.XWikiMessageTool} class.
@@ -111,6 +113,51 @@
     }
 
     /**
+     * A simple test to validate usage of parameters in bundles
+     */
+    public void testGetWithParameter()
+    {
+        this.mockXWiki.stubs().method("getXWikiPreference").will(returnValue(null));
+        this.mockXWiki.stubs().method("Param").will(returnValue("Space1.Doc1"));
+        this.mockXWiki.stubs().method("getDocument").with(eq("Space1.Doc1"), ANYTHING)
+            .will(returnValue(createDocument(111111L, "Space1.Doc1", "key=We have {0} new documents with {1} objects. {2}",
+                false)));
+
+        assertEquals("We have 12 new documents with 3 objects. {2}", this.tool.get("key", "12", "3"));
+    }
+
+    /**
+     * A simple test to validate usage of parameters in bundles
+     */
+    public void testGetWithParameterRepeats()
+    {
+        this.mockXWiki.stubs().method("getXWikiPreference").will(returnValue(null));
+        this.mockXWiki.stubs().method("Param").will(returnValue("Space1.Doc1"));
+        this.mockXWiki.stubs().method("getDocument").with(eq("Space1.Doc1"), ANYTHING)
+            .will(returnValue(createDocument(111111L, "Space1.Doc1", "key=We have {0}{1}-{0} new documents with {1}{1} objects",
+                false)));
+
+        assertEquals("We have 13-1 new documents with 33 objects", this.tool.get("key", "1", "3"));
+    }
+
+    /**
+     * A test to validate usage of parameters list in bundles
+     */
+    public void testGetWithParameterFromAList()
+    {
+        this.mockXWiki.stubs().method("getXWikiPreference").will(returnValue(null));
+        this.mockXWiki.stubs().method("Param").will(returnValue("Space1.Doc1"));
+        this.mockXWiki.stubs().method("getDocument").with(eq("Space1.Doc1"), ANYTHING)
+            .will(returnValue(createDocument(111111L, "Space1.Doc1", "key=We have {0} new documents with {1} objects",
+                false)));
+
+        List list = new ArrayList();
+        list.add("12");
+        list.add("3");
+        assertEquals("We have 12 new documents with 3 objects", this.tool.get("key", list));
+    }
+
+    /**
      * Verify that a document listed as a bundle document that doesn't exist is not returned as
      * a bundle document. 
      */
