Message ID | cover.1713073114.git.gemmaro.dev@gmail.com |
---|---|
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B0C3D27BBE9; Sun, 14 Apr 2024 08:21:30 +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 6FCB827BBE2 for <patchwork@mira.cbaines.net>; Sun, 14 Apr 2024 08:21:29 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1rvuAh-0004Ev-FH; Sun, 14 Apr 2024 03:21:03 -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 <Debian-debbugs@debbugs.gnu.org>) id 1rvuAc-0004DL-FA for guix-patches@gnu.org; Sun, 14 Apr 2024 03:20:59 -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 <Debian-debbugs@debbugs.gnu.org>) id 1rvuAc-0007G4-5e; Sun, 14 Apr 2024 03:20:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rvuAl-0003vj-9D; Sun, 14 Apr 2024 03:21:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63483] [PATCH v2 0/4] build: Update po4a process. References: <cover.1683969802.git.gemmaro.dev@gmail.com> In-Reply-To: <cover.1683969802.git.gemmaro.dev@gmail.com> Resent-From: gemmaro <gemmaro.dev@gmail.com> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Sun, 14 Apr 2024 07:21:07 +0000 Resent-Message-ID: <handler.63483.B63483.171307922714705@debbugs.gnu.org> 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 <gemmaro.dev@gmail.com>, Christopher Baines <guix@cbaines.net>, Josselin Poiret <dev@jpoiret.xyz>, Ludovic =?utf-8?q?Court=C3=A8s?= <ludo@gnu.org>, Mathieu Othacehe <othacehe@gnu.org>, Ricardo Wurmus <rekado@elephly.net>, Simon Tournier <zimon.toutoune@gmail.com>, Tobias Geerinckx-Rice <me@tobias.gr> X-Debbugs-Original-Xcc: Christopher Baines <guix@cbaines.net>, Josselin Poiret <dev@jpoiret.xyz>, Ludovic =?utf-8?q?Court=C3=A8s?= <ludo@gnu.org>, Mathieu Othacehe <othacehe@gnu.org>, Ricardo Wurmus <rekado@elephly.net>, Simon Tournier <zimon.toutoune@gmail.com>, Tobias Geerinckx-Rice <me@tobias.gr> Received: via spool by 63483-submit@debbugs.gnu.org id=B63483.171307922714705 (code B ref 63483); Sun, 14 Apr 2024 07:21:07 +0000 Received: (at 63483) by debbugs.gnu.org; 14 Apr 2024 07:20:27 +0000 Received: from localhost ([127.0.0.1]:34180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1rvuA4-0003oL-9J for submit@debbugs.gnu.org; Sun, 14 Apr 2024 03:20:27 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]:59702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <gemmaro.dev@gmail.com>) id 1rvu9g-0003j7-Kd for 63483@debbugs.gnu.org; Sun, 14 Apr 2024 03:20:04 -0400 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1e65a1370b7so688375ad.3 for <63483@debbugs.gnu.org>; Sun, 14 Apr 2024 00:19:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713079184; x=1713683984; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=996edB7RYe7j3cciNqGDR6z3kBuz4TRFtlTArBkUk4o=; b=TnwdmAC8VwOpNqg3VXtQcmiMpxjN4erHT4ctt6xm1qclQ2edSO8hwVdBEH1FZVqBts GEnzh1wfQHXOGKRywZKz4viIvoHPn3lesN49CKqkzeU8EVKPn1gISJIYpX+MaxJpwvd4 qmcPXKZt6rBhmDuKGXT7JtnN+D9Amgkf1b4LQ6Zj93mE5EQtPDC74EdohxsBX6rVekYS D3X6KpJGhB9VS22uaGX/yXdw7gDYSNRVBOVwCk8y8puAhZu4d1k7pzWZLIqyOIgoTUpM vxe9FWiE+Mpr8Xklw9bNKire10y5oYdaLohPj/aMb9s9S/pFVkgEcnw+9R88k41PMp3z ArMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713079184; x=1713683984; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=996edB7RYe7j3cciNqGDR6z3kBuz4TRFtlTArBkUk4o=; b=py/ePJVQem4Zj8WURb0dHtNNC/yDkczsgM/ZT+1z2eAiqLaoG6NYrW8ukWZiMk6Ji2 6MFumVZPzf6aSZ8kha3ariupF+QjQgmDw4qdfFtaSy/wHvwou48VJuYA8wu3dF3c8Agy Lub/STnp6F1aXXlM5bnItTSqcxaLhcXIdpdVtbzuoufgXTdL8FTr6N9/0gDZ7f468X62 iHCco61QMvu3sckZIexBcKhPaSbBIIyA0x2VS6JaI+0AWY2VSCEHqt7U4Rc9hROsyNzb 17vLxz/k4p82TRYsQ4Q4p7wI4FtSK5EL93n/Hyy+i2luOPvsSsh2RuYY/8g+Hpeuqwrj BQsg== X-Gm-Message-State: AOJu0YzkWqJZPXQYF+C4hxzJfkUcywFA59yp7uL3DT8wdpRJtdbKCyUP qUXbOjzo6TDrAffFLKRibopcC8SUnYkHGi/DmoF7vuyJHpq8jgOGTiPAVg== X-Google-Smtp-Source: AGHT+IE8pNWj7HHcDOgbUqgtvEdtdsEvMm8nGPpe6KQfHE5o62n30dweHtTn56avmFm2wgaYCNWbxA== X-Received: by 2002:a17:902:c40a:b0:1e4:24cc:e025 with SMTP id k10-20020a170902c40a00b001e424cce025mr10066801plk.59.1713079179089; Sun, 14 Apr 2024 00:19:39 -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.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Apr 2024 00:19:38 -0700 (PDT) From: gemmaro <gemmaro.dev@gmail.com> Date: Sun, 14 Apr 2024 16:18:49 +0900 Message-ID: <cover.1713073114.git.gemmaro.dev@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=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 |
Series |
build: Update po4a process.
|
|
Message
gemmaro
April 14, 2024, 7:18 a.m. UTC
Hello, Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > tags 63483 + moreinfo > quit > > Hi gemmaro, > > Thanks for doing this! > > I have surveyed the series, and I'll need to dive into the details to > see if everything adds up, but it looks good! > > We include a GNU ChangeLog in our git commit messages, as mentioned in > info '(guix) Submitting Patches'. There's a cross-reference to 'info > (standards)Change Logs', which is made available upon installing the > 'standards' Guix package (and 'info-reader'). This changelog should be > a high level description of the changes, which is handy when reviewing. > > I hope this helps! I hope to see a v2 soon :-) > > -- > Thanks, > Maxim Thank you for your response. I read the chapter on Change Logs and rewrote it to tried to make it more descriptive and more purposeful. To recap, the goal of this change is to eliminate the po4a warning ("po4a-{updatepo,translate} is deprecated. The unified po4a(1) program is more convenient and less error prone."). I checked it works by running "make" and "make as-derivation". The location of the PO files is not changed, so Weblate can continue to be used as is. Several things have changed since revision 1. Firstly, I have broken down the process and tried to write better commit messages and comments to make the changes easier to grasp. Secondly, I used po4a in batches in revision 1, but this may not be suitable for the use case for Guix, so I left as is. If it is the case to run po4a in batches, the change might be similar to the revision 1. However, there are the following concerns. Because of these and the aim here to clear po4a warnings, I don't use po4a in bulk. 1) It may take more time to process the translations. Combining them in one configuration file increases the number of target files to be handled. 2) The Makefiles (doc/local.mk and po/doc/local.mk) become more complex, since a single run of po4a will update multiple files. 3) PO files will need to be addressed. Currently two are covered - manuals and cookbooks - but the merging of gettext entries will cause conflicts if there are different translations (msgstr) for the same source text (msgid). I also think that the configuration of Weblate will then need to be changed[3] simultaneously. 4) There would be some new almost empty PO files generated. I noticed that the similar change[1] has been proposed. It is possible that action will be taken on the po4a side, but in the meantime we may encounter problems that were not addressed in po4a-{updatepo,translate} [2]. [1] [PATCH] gnu: Replace deprecated po4a-* calls with po4a, https://issues.guix.gnu.org/70042 [2] Why are the individual scripts deprecated?, https://po4a.org/man/man7/po4a.7.php.en [3] Translation projects / Allow translation propagation, https://docs.weblate.org/en/latest/admin/projects.html#allow-translation-propagation Regards, gemmaro. gemmaro (4): build: Align the Automake status lines of the po4a and the PO xref. build: Update the POT creation task with the po4a command. build: Use the po4a command for the translation generation. self: Use po4a instead of po4a-translate. Makefile.am | 5 +++-- configure.ac | 3 +-- doc/local.mk | 30 +++++++++++++++++++++++------- guix/self.scm | 12 +++++++++--- po/doc/local.mk | 15 ++++++++------- po/doc/po4a.cfg | 32 ++++++++++++++++++++++++++++++++ 6 files changed, 76 insertions(+), 21 deletions(-) create mode 100644 po/doc/po4a.cfg base-commit: 51de844a0ff6ea224367a384092896bce6848b9f
Comments
Thank you, gemmaro, for driving this necessary change. It is a good idea to switch to the actual PO4A script that still gets updates by PO4A maintainers. You will have to coordinate with Julien Lepiller (added to Cc) who controls the Guix-translations repository. [1] Guix-translations is the repository that Weblate has access to (because we do not want Weblate to push directly to Guix.git directly). It will need your po4a.cfg and the same kind of Makefile updates. In your original v1 patch, you had updated contributing.texi. contributing.texi is already out of date, but I believe we better update it at a later time when we can refer people adding new languages to prior commits where new languages have been added. Regards, Florian [1] https://framagit.org/tyreunom/guix-translations
Hello Florian Pelz and Julien Lepiller, "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> writes: > Thank you, gemmaro, for driving this necessary change. It is a good > idea to switch to the actual PO4A script that still gets updates by > PO4A maintainers. > > You will have to coordinate with Julien Lepiller (added to Cc) who > controls the Guix-translations repository. [1] Thank you very much for telling me about the repository. I also got an idea of the translation flow in Guix using Weblate; Weblate refers to and updates the PO files in the Guix-translations repository, and that the PO files in the Guix.git cloned in it are updated by the Makefile. > Guix-translations is the repository that Weblate has access to (because > we do not want Weblate to push directly to Guix.git directly). It will > need your po4a.cfg and the same kind of Makefile updates. The changes in revision 2 don't alter the location of PO files and the scripts under the scripts directory. I couldn't find additional changes to the po4a.cfg and the Makefiles. What do you think, Julien Lepiller? If there are any changes that should be made, I would appreciate it if you could correct me. The po4a.cfg added by this change allows quite flexible specification of file paths by passing variables (with po4a's "--variable key=value" option.) It would be therefore possible to make the Guix-translations repository also use the integrated po4a program anytime. The Texinfo parser used by po4a (and po4a-* scripts) is the same before and after the change, so there should be no side-effect on the PO files. > In your original v1 patch, you had updated contributing.texi. > contributing.texi is already out of date, but I believe we better update > it at a later time when we can refer people adding new languages to > prior commits where new languages have been added. > > Regards, > Florian > > [1] https://framagit.org/tyreunom/guix-translations When I was writing this, I noticed that I have transferred some configuration to po4a.cfg and now there is one more place to specify the languages (in the po4a_langs section.) The documentation will need to be updated in the future in this respect. Regards, gemmaro.
Pushed as commits 77c79bf5daff2e8041453b7a7112656d6409264b to 368e58afcb3b363098e52907c1ea9a385566f7d4 along with the monthly translations. Big thanks to you, gemmaro, for taking the time, and sorry it took so long. The documentation I will update soon. I have written to Julien once more, but you are right that the guix.git repo and guix-translations.repo can be changed separately. > Hello Julien, not urgent at all, but could you update your > guix-translations repository along the lines of commit > > commit 2d4af5247057505956e841d396ec78af9f769837 > Author: gemmaro <gemmaro.dev@gmail.com> > Date: Sun Apr 14 16:18:51 2024 +0900 > > build: Update the POT creation task with the po4a command. > > , that is, add gemmaro’s po4a.cfg and, in the Makefile, replacing > po4a-updatepo with po4a, so Guix will benefit when po4a gets new changes > missing from its less-maintained po4a-updatepo? > > Thank you for maintaining guix-translations.git. > > Regards, > Florian Regards, Florian