From b3469e6ec2067533d2adc921b2004ebe693d1324 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 9 Sep 2022 01:32:29 +0300 Subject: [PATCH 39/39] Use textual log levels in --help output See osdn #45469 Signed-off-by: Marko Lindqvist --- client/client_main.c | 3 +-- server/civserver.c | 5 +++-- tools/civmanual.c | 17 ++++++++--------- tools/fcmp/mpcmdline.c | 7 +++---- tools/ruledit/ruledit.cpp | 4 ++-- 5 files changed, 17 insertions(+), 19 deletions(-) diff --git a/client/client_main.c b/client/client_main.c index 7cc7776499..1e8d04a662 100644 --- a/client/client_main.c +++ b/client/client_main.c @@ -419,8 +419,7 @@ int client_main(int argc, char *argv[], bool postpone_tileset) cmdhelp_add(help, "d", /* TRANS: "debug" is exactly what user must type, do not translate. */ _("debug LEVEL"), - _("Set debug log level (%d to %d)"), - LOG_FATAL, LOG_VERBOSE); + _("Set debug log level (one of f,e,w,n,v)")); #endif /* FREECIV_DEBUG */ #ifndef FREECIV_NDEBUG cmdhelp_add(help, "F", diff --git a/server/civserver.c b/server/civserver.c index a77eec0c6d..4cd80a8784 100644 --- a/server/civserver.c +++ b/server/civserver.c @@ -274,12 +274,13 @@ int main(int argc, char *argv[]) cmdhelp_add(help, "d", /* TRANS: "debug" is exactly what user must type, do not translate. */ _("debug LEVEL"), - _("Set debug log level (one of f,e,w,n,v,d, or d:file1,min,max:...)")); + _("Set debug log level (one of f,e,w,n,v,d, or " + "d:file1,min,max:...)")); #else /* FREECIV_DEBUG */ cmdhelp_add(help, "d", /* TRANS: "debug" is exactly what user must type, do not translate. */ _("debug LEVEL"), - _("Set debug log level (%d to %d)"), LOG_FATAL, LOG_VERBOSE); + _("Set debug log level (one of f,e,w,n,v)")); #endif /* FREECIV_DEBUG */ #ifndef FREECIV_NDEBUG cmdhelp_add(help, "F", diff --git a/tools/civmanual.c b/tools/civmanual.c index f7fe28c66b..3003766777 100644 --- a/tools/civmanual.c +++ b/tools/civmanual.c @@ -861,20 +861,19 @@ int main(int argc, char **argv) #ifdef FREECIV_DEBUG cmdhelp_add(help, "d", - /* TRANS: "debug" is exactly what user must type, do not translate. */ - _("debug NUM"), - _("Set debug log level (one of f,e,w,n,v,d, " - "or d:file1,min,max:...)")); + /* TRANS: "debug" is exactly what user must type, do not translate. */ + _("debug LEVEL"), + _("Set debug log level (one of f,e,w,n,v,d, or " + "d:file1,min,max:...)")); #else /* FREECIV_DEBUG */ cmdhelp_add(help, "d", - /* TRANS: "debug" is exactly what user must type, do not translate. */ - _("debug NUM"), - _("Set debug log level (%d to %d)"), - LOG_FATAL, LOG_VERBOSE); + /* TRANS: "debug" is exactly what user must type, do not translate. */ + _("debug LEVEL"), + _("Set debug log level (one of f,e,w,n,v)")); #endif /* FREECIV_DEBUG */ #ifndef FREECIV_NDEBUG cmdhelp_add(help, "F", - /* TRANS: "Fatal" is exactly what user must type, do not translate. */ + /* TRANS: "Fatal" is exactly what user must type, do not translate. */ _("Fatal [SIGNAL]"), _("Raise a signal on failed assertion")); #endif /* FREECIV_NDEBUG */ diff --git a/tools/fcmp/mpcmdline.c b/tools/fcmp/mpcmdline.c index 1519b97e79..cc053916ca 100644 --- a/tools/fcmp/mpcmdline.c +++ b/tools/fcmp/mpcmdline.c @@ -74,15 +74,14 @@ int fcmp_parse_cmdline(int argc, char *argv[]) #ifdef FREECIV_DEBUG cmdhelp_add(help, "d", /* TRANS: "debug" is exactly what user must type, do not translate. */ - _("debug NUM"), + _("debug LEVEL"), _("Set debug log level (one of f,e,w,n,v,d, or " "d:file1,min,max:...)")); #else /* FREECIV_DEBUG */ cmdhelp_add(help, "d", /* TRANS: "debug" is exactly what user must type, do not translate. */ - _("debug NUM"), - _("Set debug log level (%d to %d)"), - LOG_FATAL, LOG_VERBOSE); + _("debug LEVEL"), + _("Set debug log level (one of f,e,w,n,v)")); #endif /* FREECIV_DEBUG */ cmdhelp_add(help, "v", "version", _("Print the version number")); diff --git a/tools/ruledit/ruledit.cpp b/tools/ruledit/ruledit.cpp index 8c1a230155..28b6da1619 100644 --- a/tools/ruledit/ruledit.cpp +++ b/tools/ruledit/ruledit.cpp @@ -155,13 +155,13 @@ static int re_parse_cmdline(int argc, char *argv[]) R__("Print a summary of the options")); #ifdef FREECIV_DEBUG cmdhelp_add(help, "d", - /* TRANS: "debug" is exactly what user must type, do not translate. */ + // TRANS: "debug" is exactly what user must type, do not translate. R__("debug LEVEL"), R__("Set debug log level (one of f,e,w,n,v,d, or " "d:file1,min,max:...)")); #else /* FREECIV_DEBUG */ cmdhelp_add(help, "d", - /* TRANS: "debug" is exactly what user must type, do not translate. */ + // TRANS: "debug" is exactly what user must type, do not translate. R__("debug LEVEL"), R__("Set debug log level (one of f,e,w,n,v)")); #endif /* FREECIV_DEBUG */ -- 2.35.1