41 lines
1.7 KiB
Diff
41 lines
1.7 KiB
Diff
|
From 3a3d9380eafcf4c53d3733b39dbb45b67dc3a566 Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina@redhat.com>
|
||
|
Date: Tue, 29 Jun 2021 14:04:24 +0200
|
||
|
Subject: [PATCH] cli: use gettext on common options
|
||
|
|
||
|
Also make --debug description the same as in cli_tool_print_common_opts.
|
||
|
|
||
|
These options are printed when a wrong argument is given on the command line. E.g.
|
||
|
authselect select --invalid-arg
|
||
|
---
|
||
|
src/cli/cli_tool.c | 10 +++++++---
|
||
|
1 file changed, 7 insertions(+), 3 deletions(-)
|
||
|
|
||
|
diff --git a/src/cli/cli_tool.c b/src/cli/cli_tool.c
|
||
|
index 3cc6b735eb45bc45afd21907a690b732f6844f3b..64807af3cb0c3aeb70ff652962dca62a3b99c431 100644
|
||
|
--- a/src/cli/cli_tool.c
|
||
|
+++ b/src/cli/cli_tool.c
|
||
|
@@ -87,12 +87,16 @@ static void cli_tool_print_common_opts(int min_len)
|
||
|
static struct poptOption *cli_tool_common_opts_table(void)
|
||
|
{
|
||
|
static struct poptOption options[] = {
|
||
|
- {"debug", '\0', POPT_ARG_NONE | POPT_ARGFLAG_STRIP, NULL, 'd', "Print more verbose debugging information", NULL },
|
||
|
- {"trace", '\0', POPT_ARG_NONE | POPT_ARGFLAG_STRIP, NULL, 't', "Print trace messages", NULL },
|
||
|
- {"warn", '\0', POPT_ARG_NONE | POPT_ARGFLAG_STRIP, NULL, 'w', "Print warning messages", NULL },
|
||
|
+ {"debug", '\0', POPT_ARG_NONE | POPT_ARGFLAG_STRIP, NULL, 'd', NULL, NULL },
|
||
|
+ {"trace", '\0', POPT_ARG_NONE | POPT_ARGFLAG_STRIP, NULL, 't', NULL, NULL },
|
||
|
+ {"warn", '\0', POPT_ARG_NONE | POPT_ARGFLAG_STRIP, NULL, 'w', NULL, NULL },
|
||
|
POPT_TABLEEND
|
||
|
};
|
||
|
|
||
|
+ options[0].descrip = _("Print error messages");
|
||
|
+ options[1].descrip = _("Print trace messages");
|
||
|
+ options[2].descrip = _("Print warning messages");
|
||
|
+
|
||
|
return options;
|
||
|
}
|
||
|
|
||
|
--
|
||
|
2.20.1
|
||
|
|