Mercurial > hg > octave-kai > gnulib-hg
changeset 7280:52bafe778735
Make sure the string is always translated
author | Sergey Poznyakoff <gray@gnu.org.ua> |
---|---|
date | Sat, 09 Sep 2006 05:38:06 +0000 |
parents | 6eb331fc5ba4 |
children | 62b6cc922723 |
files | lib/argp-help.c |
diffstat | 1 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/argp-help.c +++ b/lib/argp-help.c @@ -1476,6 +1476,7 @@ const char *text; const char *inp_text; size_t inp_text_len = 0; + const char *trans_text; void *input = 0; int anything = 0; const struct argp_child *child = argp->children; @@ -1494,10 +1495,11 @@ } } else - inp_text = dgettext (argp->argp_domain, post ? 0 : argp->doc); + inp_text = post ? 0 : argp->doc; + trans_text = dgettext (argp->argp_domain, inp_text); } else - inp_text = 0; + trans_text = inp_text = 0; if (argp->help_filter) /* We have to filter the doc strings. */ @@ -1507,10 +1509,10 @@ (*argp->help_filter) (post ? ARGP_KEY_HELP_POST_DOC : ARGP_KEY_HELP_PRE_DOC, - inp_text, input); + trans_text, input); } else - text = (const char *) inp_text; + text = (const char *) trans_text; if (text) { @@ -1525,7 +1527,7 @@ anything = 1; } - if (text && text != inp_text) + if (text && text != trans_text) free ((char *) text); /* Free TEXT returned from the help filter. */ if (inp_text && inp_text_len)