forked from I2P_Developers/i2p.i2p
Rename _() for translation to _t() for Java 9 compatibility (ticket #1456)
This commit is contained in:
@@ -1546,7 +1546,7 @@ public class DataHelper {
|
||||
// years
|
||||
t = ngettext("1 year", "{0} years", (int) (ms / (365L * 24 * 60 * 60 * 1000)));
|
||||
} else {
|
||||
return _("n/a");
|
||||
return _t("n/a");
|
||||
}
|
||||
// Replace minus sign to work around
|
||||
// bug in Chrome (and IE?), line breaks at the minus sign
|
||||
@@ -1593,7 +1593,7 @@ public class DataHelper {
|
||||
// years
|
||||
t = ngettext("1 year", "{0} years", (int) (ms / (365L * 24 * 60 * 60 * 1000)));
|
||||
} else {
|
||||
return _("n/a");
|
||||
return _t("n/a");
|
||||
}
|
||||
if (ms < 0)
|
||||
t = t.replace("-", "−");
|
||||
@@ -1602,7 +1602,7 @@ public class DataHelper {
|
||||
|
||||
private static final String BUNDLE_NAME = "net.i2p.router.web.messages";
|
||||
|
||||
private static String _(String key) {
|
||||
private static String _t(String key) {
|
||||
return Translate.getString(key, I2PAppContext.getGlobalContext(), BUNDLE_NAME);
|
||||
}
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ abstract class LogWriterBase implements Runnable {
|
||||
private String dupMessage(int dupCount, LogRecord lastRecord, boolean reverse) {
|
||||
String arrows = reverse ? "↓↓↓" : "^^^";
|
||||
return LogRecordFormatter.getWhen(_manager, lastRecord) + ' ' + arrows + ' ' +
|
||||
_(dupCount, "1 similar message omitted", "{0} similar messages omitted") + ' ' + arrows + '\n';
|
||||
_t(dupCount, "1 similar message omitted", "{0} similar messages omitted") + ' ' + arrows + '\n';
|
||||
}
|
||||
|
||||
private static final String BUNDLE_NAME = "net.i2p.router.web.messages";
|
||||
@@ -154,7 +154,7 @@ abstract class LogWriterBase implements Runnable {
|
||||
* gettext
|
||||
* @since 0.9.3
|
||||
*/
|
||||
private String _(int a, String b, String c) {
|
||||
private String _t(int a, String b, String c) {
|
||||
return Translate.getString(a, b, c, _manager.getContext(), BUNDLE_NAME);
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ public abstract class Translate {
|
||||
* 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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user