code: public String applyParameters(String str)
  	{
  		Matcher matcher = pattern.matcher(str);
  		StringBuffer sb = new StringBuffer();
  		while (matcher.find())
  			matcher.appendReplacement(sb, resolveParameter(matcher.group("key")));
  		matcher.appendTail(sb);
  		str = sb.toString();
  		return translated ? I18n.format(str) : str;
  	}
docs: Applies parameters to the text.
  
  @param str the str
  @return the string