Move log level translations to core

This commit is contained in:
zzz
2019-12-17 18:59:55 +00:00
parent 4eca698584
commit d73fc85c34
28 changed files with 660 additions and 3 deletions

View File

@ -102,7 +102,11 @@ class LogRecordFormatter {
****/
/** */
private static final String BUNDLE_NAME = "net.i2p.router.web.messages";
private static final String BUNDLE_NAME = "net.i2p.util.messages";
static {
// just for tagging
String[] levels = { _x("CRIT"), _x("ERROR"), _x("WARN"), _x("INFO"), _x("DEBUG") };
}
/** translate @since 0.7.14 */
private static String getPriority(LogRecord rec, I2PAppContext ctx) {
@ -134,4 +138,14 @@ class LogRecordFormatter {
buf.append(' ');
return buf.toString();
}
/**
* Mark a string for extraction by xgettext and translation.
* Use this only in static initializers.
* It does not translate!
* @return s
*/
private static String _x(String s) {
return s;
}
}