From patchwork Sun Apr 14 07:18:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: gemmaro X-Patchwork-Id: 62964 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 3EE6627BBE9; Sun, 14 Apr 2024 08:21:34 +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=ham 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 C27F827BBEA for ; Sun, 14 Apr 2024 08:21:32 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rvuAd-0004Dv-KU; Sun, 14 Apr 2024 03:21:00 -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-0004CB-L0 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 1rvuAZ-0007FX-9P 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 1rvuAh-0003um-I9; Sun, 14 Apr 2024 03:21:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63483] [PATCH v2 2/4] build: Update the POT creation task with the po4a command. 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:03 +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.171307922114607 (code B ref 63483); Sun, 14 Apr 2024 07:21:03 +0000 Received: (at 63483) by debbugs.gnu.org; 14 Apr 2024 07:20:21 +0000 Received: from localhost ([127.0.0.1]:34176 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rvu9x-0003n2-1R for submit@debbugs.gnu.org; Sun, 14 Apr 2024 03:20:20 -0400 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]:61786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rvu9f-0003j4-Hb for 63483@debbugs.gnu.org; Sun, 14 Apr 2024 03:20:03 -0400 Received: by mail-pg1-x533.google.com with SMTP id 41be03b00d2f7-5f415fd71f8so1777168a12.3 for <63483@debbugs.gnu.org>; Sun, 14 Apr 2024 00:19:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713079183; x=1713683983; 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=SBcSmfwkGbuOcJPXkSCYDDqAXHpiRLthjwUUYhpEO8Q=; b=FY360oOyX+BHiEtmuONLnXYXlX2sGRm5V0k04zSEqpf8ntRUUlPpluWLD3MZnqYjME MJAOl0/fHfW6rTlR2EezjVum/Ca499kdv2xswx0DZsMgH/pn7twW+Dlc+yIAH83FPlXl CUiS5PDsK199ERu2vUGsMmNQEy3RNRZkhZ5loxUX7L+xvGk4mvvVlRrzm4mq7PIG6yWe u04XVWBtcwtAQuiaG+ZMcRUYl5XgcVeLWTHtUvdWhOyMO1moNlDneoad5HJgOaXG+6h6 /8+DfwAZg2/kHw0fQtrD8DV7TbXgAdGIKxsrLqGvUPJFjkFDbq2fMkFoeF89BOmR4Hjy nA9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713079183; x=1713683983; 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=SBcSmfwkGbuOcJPXkSCYDDqAXHpiRLthjwUUYhpEO8Q=; b=AJFCwBOD011/HhZXiXPkRXRfIa9qTD7IZm98RDlYxNniF1fx9kRoXpTPEIc24YUJzh wFWf4mmjV4+r+kLdDV9pbW+ZbGJvik0Ii/Q0W7aoShNCke7Cb8gEbb573JhF62E8/2up ouHiWaTZEVTD7iofZeRMU4+mrzkGo6ko43Zq8VdU0OsZlK48HLrER1gLloukS1X/SCuD YqvIxEaJPgHZUogmbJRnABktqIrUFRKT0ZLV7nfGTp942NEd8d5oNWpixvG4TbewKF/H 40gg9NxOaK9+V1S4xtfeBXMHit7oU8znMpAH0Nx5EtYRxyQCz025UEds+Bdq+wUREtLL mmNw== X-Gm-Message-State: AOJu0YwKDtuBQGoyImT1BNN5x6UuLw+QuPwmjH0gAi66SAzAsLqVzhmW PSO67W3z1jnpq+ScTAybYOKWK9ptEcXA0G3nZuR9N05U+ilTb1jjUJOokw== X-Google-Smtp-Source: AGHT+IHPsHgECx9EOnlbipL2/mK6y4ASw0O3ju53i+lDrPmQy20JVCQZBq0fgliqzVDO66aud3XtUQ== X-Received: by 2002:a17:902:6f16:b0:1e5:3c5:55a5 with SMTP id w22-20020a1709026f1600b001e503c555a5mr5441563plk.8.1713079182780; Sun, 14 Apr 2024 00:19:42 -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.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Apr 2024 00:19:42 -0700 (PDT) From: gemmaro Date: Sun, 14 Apr 2024 16:18:51 +0900 Message-ID: <1fc791a888ce4bc45b6dabf0b7274b31fc0198c8.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): Add the po4a program and remove the po4a-updatepo program. The PO4A defined here can be used in Makefiles (e.g. po/doc/local.mk below). The po4a command integrates the functionality of po4a-updatepo and is currently recommended for use [1]. The po4a-updatepo command has been replaced by the po4a command and are not used from anywhere. * po/doc/local.mk (%D%/%.pot): Use a po4a command instead of the po4a-updatepo for the POT generation. This eliminates the warning of po4a-updatepo; "po4a-updatepo is deprecated. The unified po4a(1) program is more convenient and less error prone." Here, the file paths are passed using variables. This is because the po4a command needs to be executed for each language and each file. Dummy values are passed for those that are not needed to update the POT file. * po/doc/po4a.cfg: Add a po4a config file for the POT generation. The po4a command requires a configulation file. [1] https://po4a.org/man/man7/po4a.7.php.en#lbAS Change-Id: Ica39a0d1f77b6a64d37c592ac2e693319443d3c5 --- configure.ac | 2 +- po/doc/local.mk | 10 ++++++++-- po/doc/po4a.cfg | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 po/doc/po4a.cfg diff --git a/configure.ac b/configure.ac index ecbd596a34..68542f0348 100644 --- a/configure.ac +++ b/configure.ac @@ -262,8 +262,8 @@ dnl Manual pages. AM_MISSING_PROG([HELP2MAN], [help2man]) dnl Documentation translation. +AM_MISSING_PROG([PO4A], [po4a]) AM_MISSING_PROG([PO4A_TRANSLATE], [po4a-translate]) -AM_MISSING_PROG([PO4A_UPDATEPO], [po4a-updatepo]) case "$storedir" in /gnu/store) diff --git a/po/doc/local.mk b/po/doc/local.mk index dd6ba30133..8a78fb23f8 100644 --- a/po/doc/local.mk +++ b/po/doc/local.mk @@ -1,6 +1,7 @@ # GNU Guix --- Functional package management for GNU # Copyright © 2018 Julien Lepiller # Copyright © 2021 Maxim Cournoyer +# Copyright © 2024 gemmaro # # This file is part of GNU Guix. # @@ -44,8 +45,13 @@ POT_OPTIONS = \ --msgid-bugs-address "bug-guix@gnu.org" %D%/%.pot: $(srcdir)/doc/%.texi - $(AM_V_PO4A)$(PO4A_UPDATEPO) -M UTF-8 -f texinfo -m "$<" \ - -p "$@" $(POT_OPTIONS) && \ + $(AM_V_PO4A)$(PO4A) --no-translations -M UTF-8 \ + --package-version "$(VERSION)" \ + --variable master="$<" \ + --variable pot="$@" \ + --variable po=/dev/null \ + --variable localized=/dev/null \ + $(POT_OPTIONS) %D%/po4a.cfg touch $@ %D%/guix-manual.pot: %D%/guix.pot %D%/contributing.pot diff --git a/po/doc/po4a.cfg b/po/doc/po4a.cfg new file mode 100644 index 0000000000..7d2ef71773 --- /dev/null +++ b/po/doc/po4a.cfg @@ -0,0 +1,32 @@ +# GNU Guix --- Functional package management for GNU +# Copyright © 2024 gemmaro +# +# This file is part of GNU Guix. +# +# GNU Guix is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. +# +# GNU Guix is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Guix. If not, see . + +# "--keep 0": produce an output even if the translation is not complete +[options] \ + --package-name "guix manual" \ + --copyright-holder "the authors of Guix (msgids)" \ + --msgid-bugs-address "bug-guix@gnu.org" \ + --master-charset UTF-8 \ + --localized-charset UTF-8 \ + --keep 0 + +[po4a_langs] de es fr pt_BR ru zh_CN ko sk + +[po4a_paths] $(pot) $lang:$(po) + +[type:texinfo] $(master) $lang:$(localized)