Blame SOURCES/0002-cli-use-gettext-on-common-options.patch

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