[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to get argp to print standard fields in the target language?
From: |
Bruno Haible |
Subject: |
Re: How to get argp to print standard fields in the target language? |
Date: |
Mon, 15 May 2023 19:37:57 +0200 |
Anadon wrote:
> the specific
> untranslated parts I'm seeing are the '-?', '--usage', '-V' and footer
> associated with argp. How do I get argp strings translated?
>
> My literal text:
> ```
> anadon@philosoraptor:~/Documents/code/primes$ LC_ALL=uk_UA.utf8
> LANGUAGE=uk_UA.utf8 ./build/src/primes --help
Some of these strings (such as "Mandatory or optional arguments ..." or
"Report bugs to ...") come from argp-help.c and are arguments of a 'dgettext'
invocations. For these, you would include argp-help.c in the set of files
you specify to xgettext. Optionally, specify argp_domain
(cf. https://www.gnu.org/software/libc/manual/html_node/Argp-Parsers.html)
and use a separate .pot file for this (small) set of messages.
Some of the strings (such as "Give this help list") don't come from the
argp implementation; they must come from your code. To internationalize
them, use a gettext_noop-like macro as described in
https://www.gnu.org/software/gettext/manual/html_node/Special-cases.html
Bruno