From 99e2ce44117c8d0093c103c0ce49e2b0810588aa Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 9 Sep 2022 01:34:22 +0300 Subject: [PATCH 33/33] 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 +++---- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/client/client_main.c b/client/client_main.c index 4c4991fe74..c2c2cb1942 100644 --- a/client/client_main.c +++ b/client/client_main.c @@ -418,8 +418,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 3c8c18e861..1f9dd78619 100644 --- a/server/civserver.c +++ b/server/civserver.c @@ -368,12 +368,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 afbc72993c..f27a76fad8 100644 --- a/tools/civmanual.c +++ b/tools/civmanual.c @@ -860,20 +860,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")); -- 2.35.1