forked from I2P_Developers/i2p.i2p
Rename _() for translation to _t() for Java 9 compatibility (ticket #1456)
This commit is contained in:
@ -46,7 +46,7 @@ public class LogsHelper extends HelperBase {
|
||||
*/
|
||||
public String getLogs() {
|
||||
String str = formatMessages(_context.logManager().getBuffer().getMostRecentMessages());
|
||||
return "<p>" + _("File location") + ": <b><code>" + _context.logManager().currentFile() + "</code></b></p>" + str;
|
||||
return "<p>" + _t("File location") + ": <b><code>" + _context.logManager().currentFile() + "</code></b></p>" + str;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -97,10 +97,10 @@ public class LogsHelper extends HelperBase {
|
||||
str = FileUtil.readTextFile(f.getAbsolutePath(), 250, false);
|
||||
}
|
||||
if (str == null) {
|
||||
return "<p>" + _("File not found") + ": <b><code>" + f.getAbsolutePath() + "</code></b></p>";
|
||||
return "<p>" + _t("File not found") + ": <b><code>" + f.getAbsolutePath() + "</code></b></p>";
|
||||
} else {
|
||||
str = str.replace("&", "&").replace("<", "<").replace(">", ">");
|
||||
return "<p>" + _("File location") + ": <b><code>" + f.getAbsolutePath() + "</code></b></p><pre>" + str + "</pre>";
|
||||
return "<p>" + _t("File location") + ": <b><code>" + f.getAbsolutePath() + "</code></b></p><pre>" + str + "</pre>";
|
||||
}
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ public class LogsHelper extends HelperBase {
|
||||
/** formats in reverse order */
|
||||
private String formatMessages(List<String> msgs) {
|
||||
if (msgs.isEmpty())
|
||||
return "<p><i>" + _("No log messages") + "</i></p>";
|
||||
return "<p><i>" + _t("No log messages") + "</i></p>";
|
||||
boolean colorize = _context.getBooleanPropertyDefaultTrue("routerconsole.logs.color");
|
||||
StringBuilder buf = new StringBuilder(16*1024);
|
||||
buf.append("<ul>");
|
||||
@ -138,13 +138,13 @@ public class LogsHelper extends HelperBase {
|
||||
// Homeland Security Advisory System
|
||||
// http://www.dhs.gov/xinfoshare/programs/Copy_of_press_release_0046.shtm
|
||||
// but pink instead of yellow for WARN
|
||||
if (msg.contains(_("CRIT")))
|
||||
if (msg.contains(_t("CRIT")))
|
||||
color = "#cc0000";
|
||||
else if (msg.contains(_("ERROR")))
|
||||
else if (msg.contains(_t("ERROR")))
|
||||
color = "#ff3300";
|
||||
else if (msg.contains(_("WARN")))
|
||||
else if (msg.contains(_t("WARN")))
|
||||
color = "#ff00cc";
|
||||
else if (msg.contains(_("INFO")))
|
||||
else if (msg.contains(_t("INFO")))
|
||||
color = "#000099";
|
||||
else
|
||||
color = "#006600";
|
||||
|
Reference in New Issue
Block a user