From 292befd78e8c2a5db7d9a5787d7011608d40a016 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 9 Sep 2022 01:41:39 +0300 Subject: [PATCH 21/21] 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/mpcmdline.c | 7 +++---- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/client/client_main.c b/client/client_main.c index 8ecc0b10f7..283933aad4 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,n,v)")); #endif /* FREECIV_DEBUG */ #ifndef FREECIV_NDEBUG cmdhelp_add(help, "F", diff --git a/server/civserver.c b/server/civserver.c index a9a39fc35e..83d1af28e8 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,n,v,d, or d:file1,min,max:...)")); + _("Set debug log level (one of f,e,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,n,v)")); #endif /* FREECIV_DEBUG */ #ifndef FREECIV_NDEBUG cmdhelp_add(help, "F", diff --git a/tools/civmanual.c b/tools/civmanual.c index 4d0175f328..7a19e0d3b1 100644 --- a/tools/civmanual.c +++ b/tools/civmanual.c @@ -772,20 +772,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,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,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,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/mpcmdline.c b/tools/mpcmdline.c index 740d42acb1..8b315dab04 100644 --- a/tools/mpcmdline.c +++ b/tools/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,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,n,v)")); #endif /* FREECIV_DEBUG */ cmdhelp_add(help, "v", "version", _("Print the version number")); -- 2.35.1