* Console:

- Add parameterized tag
      - Refactor confignav.jsp to java and tag
      - Start tagging profiles.jsp
This commit is contained in:
zzz
2009-10-26 14:24:25 +00:00
parent 5aa254a178
commit ac6d711a99
6 changed files with 139 additions and 31 deletions

View File

@@ -35,6 +35,22 @@ public abstract class HelperBase {
return Messages.getString(s, _context);
}
/**
* translate a string with a parameter
* This is a lot more expensive than _(s), so use sparingly.
*
* @param s string to be translated containing {0}
* The {0} will be replaced by the parameter.
* Single quotes must be doubled, i.e. ' -> '' in the string.
* @param o parameter, not translated.
* To tranlslate parameter also, use _("foo {0} bar", _("baz"))
* Do not double the single quotes in the parameter.
* Use autoboxing to call with ints, longs, floats, etc.
*/
public String _(String s, Object o) {
return Messages.getString(s, o, _context);
}
/**
* Mark a string for extraction by xgettext and translation.
* Use this only in static initializers.