bug-gettext
[Top][All Lists]
Advanced

[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: Anadon
Subject: Re: How to get argp to print standard fields in the target language?
Date: Sun, 21 May 2023 00:25:25 -0400

Since all usage of argp has the same translation strings, they could
be a part of files distributed as a package with the OS.  This would
be easy for developers and space efficient.  From my current
understanding, this does not work with gettext as implemented because
simultaneous domains as described in
https://www.gnu.org/software/gettext/manual/gettext.html#Triggering do
not seem to be supported.  Should this be supported?  I'm looking at
this and I can brute force it as described and leave the same
ungoogleable problem for others.  What I imagine as the end result is
to "just" have argp have its strings translated as a part of the OS
distribution, so they'll translate on their own.

On Mon, May 15, 2023 at 1:37 PM Bruno Haible <bruno@clisp.org> wrote:
>
> 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
>
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]