public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: Anadon <joshua.r.marshall.1991@gmail.com>
To: Bruno Haible <bruno@clisp.org>
Cc: bug-gettext@gnu.org, libc-help@sourceware.org
Subject: Re: How to get argp to print standard fields in the target language?
Date: Sun, 21 May 2023 00:25:25 -0400	[thread overview]
Message-ID: <CAFkJGReQGRL_hvfio+wtAgbeJSVPcWUZtKfjKKrPUqS3GP9Ejw@mail.gmail.com> (raw)
In-Reply-To: <1710975.uacIGzncQW@nimes>

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	other threads:[~2023-05-21  4:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAFkJGRetOSo6VqLRoMOUKKASk5WxQwQeTqtNp16R5sBrmqCYFA@mail.gmail.com>
     [not found] ` <1710975.uacIGzncQW@nimes>
2023-05-21  4:25   ` Anadon [this message]
2023-05-21 13:01     ` Bruno Haible

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFkJGReQGRL_hvfio+wtAgbeJSVPcWUZtKfjKKrPUqS3GP9Ejw@mail.gmail.com \
    --to=joshua.r.marshall.1991@gmail.com \
    --cc=bruno@clisp.org \
    --cc=bug-gettext@gnu.org \
    --cc=libc-help@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).