guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

05/06: self: Use po4a instead of po4a-translate.


From: guix-commits
Subject: 05/06: self: Use po4a instead of po4a-translate.
Date: Sun, 2 Jun 2024 21:08:25 -0400 (EDT)

pelzflorian pushed a commit to branch master
in repository guix.

commit 368e58afcb3b363098e52907c1ea9a385566f7d4
Author: gemmaro <gemmaro.dev@gmail.com>
AuthorDate: Sun Apr 14 16:18:53 2024 +0900

    self: Use po4a instead of po4a-translate.
    
    * guix/self.scm (translate-tmp-texi): Use po4a instead of po4a-translate.
    This eliminates the po4a-translate warning; "po4a-translate is deprecated.
    The unified po4a(1) program is more convenient and less error prone."
    
    Change-Id: Id85c7478b1b237f31010994fcd2d38765993c1ad
    Signed-off-by: Florian Pelz <pelzflorian@pelzflorian.de>
---
 guix/self.scm | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/guix/self.scm b/guix/self.scm
index 8c85684090..a94791d67b 100644
--- a/guix/self.scm
+++ b/guix/self.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2017-2023 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
 ;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2024 gemmaro <gemmaro.dev@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -317,9 +318,15 @@ DOMAIN, a gettext domain."
           (define (translate-tmp-texi po source output)
             "Translate Texinfo file SOURCE using messages from PO, and write
 the result to OUTPUT."
-            (invoke #+(file-append po4a-minimal "/bin/po4a-translate")
-              "-M" "UTF-8" "-L" "UTF-8" "-k" "0" "-f" "texinfo"
-              "-m" source "-p" po "-l" output))
+            (invoke #+(file-append po4a-minimal "/bin/po4a")
+              "--no-update"
+              "--variable" (string-append "localized=" output)
+              "--variable" (string-append "master=" source)
+              "--variable" (string-append "po=" po)
+              "--variable" (string-append "pot=" (string-append (tmpnam) 
".pot"))
+              (string-append "--srcdir=" #$source)
+              "--destdir=."
+              #+(file-append documentation-po "/po4a.cfg")))
 
           (define (canonicalize-whitespace str)
             ;; Change whitespace (newlines, etc.) in STR to #\space.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]