From patchwork Sun Apr 14 07:18:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: gemmaro X-Patchwork-Id: 62965 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9E83927BBE9; Sun, 14 Apr 2024 08:21:35 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6C46727BBE2 for ; Sun, 14 Apr 2024 08:21:31 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rvuAd-0004DG-EI; Sun, 14 Apr 2024 03:20:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rvuAa-0004CC-L3 for guix-patches@gnu.org; Sun, 14 Apr 2024 03:20:56 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rvuAY-0007FS-Or for guix-patches@gnu.org; Sun, 14 Apr 2024 03:20:56 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rvuAj-0003vJ-I1; Sun, 14 Apr 2024 03:21:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63483] [PATCH v2 3/4] build: Use the po4a command for the translation generation. Resent-From: gemmaro Original-Sender: "Debbugs-submit" Resent-CC: pelzflorian@pelzflorian.de, julien@lepiller.eu, guix-patches@gnu.org Resent-Date: Sun, 14 Apr 2024 07:21:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63483 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: moreinfo patch To: 63483@debbugs.gnu.org Cc: gemmaro , Florian Pelz , Julien Lepiller X-Debbugs-Original-Xcc: Florian Pelz , Julien Lepiller Received: via spool by 63483-submit@debbugs.gnu.org id=B63483.171307922514657 (code B ref 63483); Sun, 14 Apr 2024 07:21:05 +0000 Received: (at 63483) by debbugs.gnu.org; 14 Apr 2024 07:20:25 +0000 Received: from localhost ([127.0.0.1]:34178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rvuA0-0003nY-Gm for submit@debbugs.gnu.org; Sun, 14 Apr 2024 03:20:24 -0400 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]:61629) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rvu9h-0003j8-EF for 63483@debbugs.gnu.org; Sun, 14 Apr 2024 03:20:03 -0400 Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-53fa455cd94so1819455a12.2 for <63483@debbugs.gnu.org>; Sun, 14 Apr 2024 00:19:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713079185; x=1713683985; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EzEwjl5DtDs5dK2gddRO7Hc/6OcfrHGdWlJAsPfYOd8=; b=C9q0E9u18cwX88553+m2+Db8GCXs8rTmOo8i7GcaUqUCRCWgej527MbXlE5O/gfmXl j9pt3DNSomzwFm1l6erbOecLj9f5lAbEBf7f+zgP/pBA3DNpWi7VcRYa9WBM8oMPPAFn DwooCnUwWeLrsPLBTue0hBqU0291ESHzzFjw58Rh/wHLnwoEmZFAs9BQH0U4Unl9dzbT sebcUd8YsWW2k7Oaw6jFDQu3T1Ll79ToezSdSuzyYwDam4cd8QWJCTvoYvt9aOectZEm Mmv0xNfSQWoltuhptm8R1VJBKGUdxz9/nAs3qkGxj3wzzHWKYRK8b604Klqq9it9cLbv IodQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713079185; x=1713683985; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EzEwjl5DtDs5dK2gddRO7Hc/6OcfrHGdWlJAsPfYOd8=; b=MY70GeGvA7dYa58h3Zo/CWHvwxH5XxzVufwc31J5fDmXr2iXtggug1KrHZclWTIVfr 59XXHdTT4Jj5o4+HSQNQ+g4D/fHxj097ICJYrOtMoKtBy4bIno4BFZQZW9qH0iGYz8W2 zbpbIrRgWGkwRdO9ux6BsJDhi2lufeDRng/setctAU6ADwA7bSGQUbcxgtE/gEhxgdBX uc+3ewgMaqD48V3iI69gFZde+oILdbTR301CcNVNjkP01W0V2oOtoRyOBcim5IPoZgM5 vm/dXEEBiJw7eeMaSfnxYP1IL41PChu8eWFjC6iMBqXAhsF5F+k94tPUEk9y80g3tqfs UcCA== X-Gm-Message-State: AOJu0Yx3JiSWE2MJtrTtUgH9T5MTz8Yut+Uw54hkulVtl0LZzQXPBcot ELiJVnJwVDu2gTIdBpfVksmGpL9Kqg5GkUwDTpwav7AcnfNqwzeN24ZOEg== X-Google-Smtp-Source: AGHT+IEAJq2HOUerGmxI3HJOLM/BXxlF3e9TbjhKTqPaY/DzVwkaZ9KzXkw40EqIMK1c6Y/4at5F/Q== X-Received: by 2002:a17:902:b906:b0:1e3:e256:44e0 with SMTP id bf6-20020a170902b90600b001e3e25644e0mr5396099plb.31.1713079184631; Sun, 14 Apr 2024 00:19:44 -0700 (PDT) Received: from mac.gemmaro.name ([240f:74:d1f0:1:1883:f3d1:907f:a2e3]) by smtp.gmail.com with ESMTPSA id j14-20020a170902da8e00b001e2bbc0a66fsm5557125plx.234.2024.04.14.00.19.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Apr 2024 00:19:44 -0700 (PDT) From: gemmaro Date: Sun, 14 Apr 2024 16:18:52 +0900 Message-ID: <1c856bb1f6ec8a648775a919f360d3ec878b6575.1713073114.git.gemmaro.dev@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * configure.ac (Documentation translation): Remove the po4a-translate command. This command has been replaced by the po4a command and are not used from anywhere. * doc/local.mk ($(srcdir)/%D%/guix.%.texi, $(srcdir)/%D%/guix-cookbook.%.texi) ($(srcdir)/%D%/contributing.%.texi): Use the po4a command instead of the po4a-translate for the translation generation. This eliminates the warning of po4a-translate; "po4a-translate is deprecated. The unified po4a(1) program is more convenient and less error prone." (PO4A_PARAMS): Remove the Texinfo format option. This option is specified in the configuration file (po/doc/po4a.cfg). (dummy_pot): Add a variable for the temporary POT file location. Change-Id: I542b934c3c03b8701e9f86823191224f8b0ccf81 --- configure.ac | 1 - doc/local.mk | 30 +++++++++++++++++++++++------- po/doc/local.mk | 5 ----- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/configure.ac b/configure.ac index 68542f0348..ad148f33b6 100644 --- a/configure.ac +++ b/configure.ac @@ -263,7 +263,6 @@ AM_MISSING_PROG([HELP2MAN], [help2man]) dnl Documentation translation. AM_MISSING_PROG([PO4A], [po4a]) -AM_MISSING_PROG([PO4A_TRANSLATE], [po4a-translate]) case "$storedir" in /gnu/store) diff --git a/doc/local.mk b/doc/local.mk index 8df003b891..a6234b2e3e 100644 --- a/doc/local.mk +++ b/doc/local.mk @@ -5,6 +5,7 @@ # Copyright © 2016 Taylan Ulrich Bayırlı/Kammer # Copyright © 2016, 2018 Mathieu Lirzin # Copyright © 2018, 2021 Julien Lepiller +# Copyright © 2024 gemmaro # # This file is part of GNU Guix. # @@ -87,10 +88,6 @@ BUILT_SOURCES += $(OS_CONFIG_EXAMPLES_TEXI) $(TRANSLATED_INFO) EXTRA_DIST += $(OS_CONFIG_EXAMPLES_TEXI) $(TRANSLATED_INFO) MAINTAINERCLEANFILES = $(OS_CONFIG_EXAMPLES_TEXI) $(TRANSLATED_INFO) -PO4A_PARAMS := -M UTF-8 -L UTF-8 #master and localized encoding -PO4A_PARAMS += -k 0 # produce an output even if the translation is not complete -PO4A_PARAMS += -f texinfo # texinfo format - # When a change to guix.texi occurs, it is not translated immediately. # Because @pxref and @xref commands are references to sections by name, they # should be translated. If a modification adds a reference to a section, this @@ -102,20 +99,39 @@ $(top_srcdir)/pre-inst-env $(GUILE) --no-auto-compile \ $@.tmp $< endef +# If /dev/null is used for this POT file path, a warning will be issued +# because the path extension is not 'pot'. +dummy_pot = $(shell mktemp --suffix=.pot) + $(srcdir)/%D%/guix.%.texi: po/doc/guix-manual.%.po $(srcdir)/%D%/contributing.%.texi guix/build/po.go - -$(AM_V_PO4A)$(PO4A_TRANSLATE) $(PO4A_PARAMS) -m "%D%/guix.texi" -p "$<" -l "$@.tmp" + -$(AM_V_PO4A)$(PO4A) --no-update \ + --variable localized="$@.tmp" \ + --variable master="%D%/guix.texi" \ + --variable po="$<" \ + --variable pot=$(dummy_pot) \ + po/doc/po4a.cfg -sed -i "s|guix\.info|$$(basename "$@" | sed 's|texi$$|info|')|" "$@.tmp" -$(AM_V_POXREF)LC_ALL=en_US.UTF-8 $(xref_command) -mv "$@.tmp" "$@" $(srcdir)/%D%/guix-cookbook.%.texi: po/doc/guix-cookbook.%.po guix/build/po.go - -$(AM_V_PO4A)$(PO4A_TRANSLATE) $(PO4A_PARAMS) -m "%D%/guix-cookbook.texi" -p "$<" -l "$@.tmp" + -$(AM_V_PO4A)$(PO4A) --no-update \ + --variable localized="$@.tmp" \ + --variable master="%D%/guix-cookbook.texi" \ + --variable po="$<" \ + --variable pot=$(dummy_pot) \ + po/doc/po4a.cfg -sed -i "s|guix-cookbook\.info|$$(basename "$@" | sed 's|texi$$|info|')|" "$@.tmp" -$(AM_V_POXREF)LC_ALL=en_US.UTF-8 $(xref_command) -mv "$@.tmp" "$@" $(srcdir)/%D%/contributing.%.texi: po/doc/guix-manual.%.po guix/build/po.go - -$(AM_V_PO4A)$(PO4A_TRANSLATE) $(PO4A_PARAMS) -m "%D%/contributing.texi" -p "$<" -l "$@.tmp" + -$(AM_V_PO4A)$(PO4A) --no-update \ + --variable localized="$@.tmp" \ + --variable master="%D%/contributing.texi" \ + --variable po="$<" \ + --variable pot=$(dummy_pot) \ + po/doc/po4a.cfg -$(AM_V_POXREF)LC_ALL=en_US.UTF-8 $(xref_command) -mv "$@.tmp" "$@" diff --git a/po/doc/local.mk b/po/doc/local.mk index 8a78fb23f8..a1f1875623 100644 --- a/po/doc/local.mk +++ b/po/doc/local.mk @@ -39,11 +39,6 @@ EXTRA_DIST = \ $(DOC_PO_FILES) \ $(DOC_COOKBOOK_PO_FILES) -POT_OPTIONS = \ - --package-name "guix manual" --package-version "$(VERSION)" \ - --copyright-holder "the authors of Guix (msgids)" \ - --msgid-bugs-address "bug-guix@gnu.org" - %D%/%.pot: $(srcdir)/doc/%.texi $(AM_V_PO4A)$(PO4A) --no-translations -M UTF-8 \ --package-version "$(VERSION)" \