From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by sourceware.org (Postfix) with ESMTPS id 758FD3858D33 for ; Sun, 21 May 2023 04:25:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 758FD3858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-30a1fdde3d6so903231f8f.0 for ; Sat, 20 May 2023 21:25:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684643137; x=1687235137; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=jYvaKgJ5A7YbP/lje+NIF9yeLiMF0xzXodHxccs0Sug=; b=Ubpmy4BfuBnQluCousBlP8XBTKc8aj0+0qqOve9/MUDIkIQhalHIIuWyUEEKrlS/Sq Tbb9C24ulpCnoZ5BQeAvh8JMOjRohdZt/39c7cKdkqpRSCrK9hKAna1QbOkNS+lDs/et ie8zNeseolSN1yhdxz/mLA15O9OtiI9U0qdX1Um4TW1A325fEhPvusVTHWgrEk4+zdZB ERwIJf7fhJioJ1ecwP8t6Fvt5G15d2hzly9odX0ZGIlfK7nqRq0fKZ+W3yHYV78Ato8W 9dCSor9OQnTybIP/pw84IIJGZnLcXlRj5s2EjfYncFWlA5+13oPT4uxQUk1BZAWo6iZc fxiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684643137; x=1687235137; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jYvaKgJ5A7YbP/lje+NIF9yeLiMF0xzXodHxccs0Sug=; b=Vzam/nTzBKpEJ5FHoixqlP6mv6fYMkbaV9s+/MbB6D46EOXw5DRz33B4lnBugBTHm7 2+1ezmy4DmdM30zBjkUK7ZZWTOJxUhhQmSdCLUmCAVthcHPB9ric0DkNq3+17Sx1x/Lk 4UldSGVxB1o5Yxs34x+CkJjIUgkGTUb4pKUXY5faNwUeskEUCNZOVC++2Crqlt8xoUlK gnsBj8f1bxXmfTMPWkDfdl5/YTRdm9uIN20bn6UF46wct8NUbLrBqtcrUa3mtRx1s/Av 4efm7bdD+4BAdQxYxpE9U0lLQDcH5KZgyq4uvxBm/33J/Sspz447cSsR1EU2imrzvK3C 1eXw== X-Gm-Message-State: AC+VfDyM1F/hUGDiNO+wGywmrnmK8JWIOVQN/n53v1iH5s1+Fyp6h17O WksrQsiorDT8EySUVdEvQ2EZ6I/HMnXHP/eOGxMMD51/Huz0HA== X-Google-Smtp-Source: ACHHUZ5EN0Zits+vAXXXiVV2iV4FbXZO3bvm/k/8uORj8b7P52QlkjKiYUmk90JLsUKCCAlYojPIETQz+v3aUqHEBBM= X-Received: by 2002:a5d:62d0:0:b0:309:51c5:3bf6 with SMTP id o16-20020a5d62d0000000b0030951c53bf6mr5324532wrv.23.1684643136653; Sat, 20 May 2023 21:25:36 -0700 (PDT) MIME-Version: 1.0 References: <1710975.uacIGzncQW@nimes> In-Reply-To: <1710975.uacIGzncQW@nimes> From: Anadon Date: Sun, 21 May 2023 00:25:25 -0400 Message-ID: Subject: Re: How to get argp to print standard fields in the target language? To: Bruno Haible Cc: bug-gettext@gnu.org, libc-help@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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=E2=80=AFPM Bruno Haible wrot= e: > > 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=3Duk_UA.utf8 > > LANGUAGE=3Duk_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 'dgett= ext' > 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 > > >