diff options
author | Werner Koch <wk@gnupg.org> | 2022-12-16 17:20:17 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2022-12-16 17:20:45 +0100 |
commit | 885a287a57cf060b4c5b441822c09d23b8dee2bd (patch) | |
tree | a591c7ade103a2398c22ee4307eda80fd6f40902 | |
parent | 72e0fb3fc858301de7b200e1c08da6904ab44bc0 (diff) | |
download | libgpg-error-885a287a57cf060b4c5b441822c09d23b8dee2bd.tar.gz |
core: Fix translations of --help
* src/argparse.c (show_help): Do not translate the empty string.
--
PO files use the empty string for meta information. However, to mark
the end of the heder group we also use an empty string and that one
gets translated - boom. Example of this error:
[...]
-u, --local-user USER-ID [...]
Project-Id-Version: gnupg-2.3.0
Report-Msgid-Bugs-To: translations@gnupg.org
PO-Revision-Date: 2022-10-07 09:52+0200
Last-Translator: Werner Koch <wk@gnupg.org>
Language-Team: German <de@li.org>
Language: de
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Plural-Forms: nplurals=2; plural=n != 1;
:
(Auf der "man"-Seite ist eine volls[...]
-rw-r--r-- | src/argparse.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/argparse.c b/src/argparse.c index ef0c161..8651e00 100644 --- a/src/argparse.c +++ b/src/argparse.c @@ -2937,7 +2937,7 @@ cmp_ordtbl (const void *a_v, const void *b_v) * this option * - a description which starts with a '@' and is followed by * any other characters is printed as is; this may be used for examples - * and such. This is a legacy methiod, moder codes uses the flags + * and such. This is a legacy method, modern code uses the flags * ARGPARSE_OPT_VERBATIM or ARGPARSE_OPT_HEADER. * - A description which starts with a '|' outputs the string between this * bar and the next one as arguments of the long option. @@ -3000,7 +3000,12 @@ show_help (opttable_t *opts, unsigned int nopts, unsigned int flags) writestrings (0, "Options:", "\n", NULL); for (i=0; i < nopts; i++ ) { - s = map_fixed_string (_( opts[ordtbl[i]].description )); + /* Do not translate the empty string becuase it is used as + * the identification of the PO file. */ + if (opts[ordtbl[i]].description && *opts[ordtbl[i]].description) + s = map_fixed_string (_( opts[ordtbl[i]].description )); + else + s = ""; if ( s && *s== '@' && !s[1] ) /* Hide this line. */ continue; if ( s && (opts[ordtbl[i]].flags & ARGPARSE_OPT_HEADER)) |