mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-10-23 06:32:32 +00:00
Rename _() for translation to _t() for Java 9 compatibility (ticket #1456)
This commit is contained in:
1 parent
04690bed9f
commit
22b9876b68
227 files changed
+2930
-2927
No files matched your search
@@ -44,28 +44,28 @@ public abstract class HelperBase {
|
||||
public void storeWriter(Writer out) { _out = out; }
|
||||
|
||||
/** translate a string */
|
||||
public String _(String s) {
|
||||
public String _t(String s) {
|
||||
return Messages.getString(s, _context);
|
||||
}
|
||||
|
||||
/**
|
||||
* translate a string with a parameter
|
||||
* This is a lot more expensive than _(s), so use sparingly.
|
||||
* This is a lot more expensive than _t(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"))
|
||||
* To tranlslate parameter also, use _t("foo {0} bar", _t("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) {
|
||||
public String _t(String s, Object o) {
|
||||
return Messages.getString(s, o, _context);
|
||||
}
|
||||
|
||||
/** two params @since 0.7.14 */
|
||||
public String _(String s, Object o, Object o2) {
|
||||
public String _t(String s, Object o, Object o2) {
|
||||
return Messages.getString(s, o, o2, _context);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user