GNU bug report logs -
#60448
[PATCH 0/6] gnu: po4a: Update to 0.68
Previous Next
Reported by: gemmaro <gemmaro.dev <at> gmail.com>
Date: Sat, 31 Dec 2022 10:45:03 UTC
Severity: normal
Tags: patch
Done: Julien Lepiller <julien <at> lepiller.eu>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 60448 in the body.
You can then email your comments to 60448 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#60448
; Package
guix-patches
.
(Sat, 31 Dec 2022 10:45:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
gemmaro <gemmaro.dev <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sat, 31 Dec 2022 10:45:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello Guix,
This patch updates po4a to 0.68. It also includes additional dependencies
required with the update.
I have tried running "make as-derivation" with the following suggestion. Then
I observed warnings that po4a should be used instead of po4a-translate. I
don't think there were any other errors related to po4a.
https://lists.gnu.org/archive/html/guix-patches/2021-07/msg00030.html
Another side effect that comes to mind is that if the po4a parser has changed,
it is possible that some of the entries in the translations will be fuzzy.
I wrote this patch for my personal Markdown translation needs. And it appears
to be working well for this format.
Regards,
gemmaro
gemmaro (6):
gnu: Add perl-text-charwidth
gnu: Add perl-xs-parse-keyword
gnu: Add perl-text-wrapi18n
gnu: Add perl-syntax-keyword-try
gnu: po4a: Update to 0.68
Update copyright
gnu/packages/gettext.scm | 49 +++++++++++---------
gnu/packages/perl.scm | 96 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 125 insertions(+), 20 deletions(-)
base-commit: 8e883dc8210d4a7c3f09961994685ed54942fd73
--
2.38.1
Information forwarded
to
guix-patches <at> gnu.org
:
bug#60448
; Package
guix-patches
.
(Sat, 31 Dec 2022 16:04:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 60448 <at> debbugs.gnu.org (full text, mbox):
---
gnu/packages/perl.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index f80d84eaa5..e6ba0ff736 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -10471,6 +10471,27 @@ (define-public perl-text-balanced
text sequences from strings.")
(license (package-license perl))))
+(define-public perl-text-charwidth
+ (package
+ (name "perl-text-charwidth")
+ (version "0.04")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://cpan/authors/id/K/KU/KUBOTA/Text-CharWidth-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1y040wiqx78pnr0wxbjhpzjxm2a9qiqq479gzn4qwcyrzpsdbpmb"))))
+ (build-system perl-build-system)
+ (home-page "https://metacpan.org/dist/Text-CharWidth")
+ (synopsis "Get number of occupied columns of a string on terminal")
+ (description
+ "With this module, you can calculate terminal character
+widths that vary by locale. This module supplies features similar as
+wcwidth(3) and wcswidth(3) in C language.")
+ (license (package-license perl))))
+
(define-public perl-text-csv
(package
(name "perl-text-csv")
--
2.38.1
Information forwarded
to
guix-patches <at> gnu.org
:
bug#60448
; Package
guix-patches
.
(Sat, 31 Dec 2022 16:04:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 60448 <at> debbugs.gnu.org (full text, mbox):
perl-xs-parse-keyword v0.06 is required by perl-syntax-keyword-try.
Note that the latest version of this package is 0.27.
---
gnu/packages/perl.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index e6ba0ff736..09f5d9e69d 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -11580,6 +11580,28 @@ (define-public perl-xs-object-magic
neither visible nor modifiable from Perl space).")
(license (package-license perl))))
+(define-public perl-xs-parse-keyword
+ (package
+ (name "perl-xs-parse-keyword")
+ (version "0.06")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://cpan/authors/id/P/PE/PEVANS/XS-Parse-Keyword-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0nnr8akkxb2h2y3d5r51pr84vvxkq89ynmi9azkbnn79jmbcbgvq"))))
+ (build-system perl-build-system)
+ (native-inputs (list perl-module-build perl-test-simple))
+ (home-page "https://metacpan.org/dist/XS-Parse-Keyword")
+ (synopsis "XS functions to assist in parsing keyword syntax")
+ (description
+ "This module provides some XS functions to assist in writing
+syntax modules that provide new perl-visible syntax, primarily for authors of
+keyword plugins using the @code{PL_keyword_plugin} hook mechanism.")
+ (license (package-license perl))))
+
(define-public perl-yaml
(package
(name "perl-yaml")
--
2.38.1
Information forwarded
to
guix-patches <at> gnu.org
:
bug#60448
; Package
guix-patches
.
(Sat, 31 Dec 2022 16:04:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 60448 <at> debbugs.gnu.org (full text, mbox):
---
gnu/packages/perl.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 09f5d9e69d..1c21f30133 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -12255,6 +12255,34 @@ (define-public perl-text-soundex
the National Archives and Records Administration (NARA).")
(license license:perl-license)))
+(define-public perl-text-wrapi18n
+ (package
+ (name "perl-text-wrapi18n")
+ (version "0.06")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://cpan/authors/id/K/KU/KUBOTA/Text-WrapI18N-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "12548qc99ms12yp5j26076p0zazjfv1b618h5k8r5iy2y0brmljb"))))
+ (build-system perl-build-system)
+ (inputs (list perl-text-charwidth))
+ (home-page "https://metacpan.org/pod/Text::WrapI18N")
+ (synopsis "Line wrapping for multibyte, fullwidth, and combining
+characters and so on")
+ (description
+ "This module intends to be a better Text::Wrap module. This
+module is needed to support multibyte character encodings such as UTF-8,
+EUC-JP, EUC-KR, GB2312, and Big5. This module also supports characters with
+irregular widths, such as combining characters (which occupy zero columns on
+terminal, like diacritical marks in UTF-8) and fullwidth characters (which
+occupy two columns on terminal, like most of east Asian characters). Also,
+minimal handling of languages which doesn't use whitespaces between
+words (like Chinese and Japanese) is supported.")
+ (license (package-license perl))))
+
(define-public perl-regexp-pattern
(package
(name "perl-regexp-pattern")
--
2.38.1
Information forwarded
to
guix-patches <at> gnu.org
:
bug#60448
; Package
guix-patches
.
(Sat, 31 Dec 2022 16:04:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 60448 <at> debbugs.gnu.org (full text, mbox):
This is required by po4a since v0.67.
https://github.com/mquinson/po4a/blob/0ab1670e50f0a72781e3d1de6ab9da0c2d71c646/NEWS#L125
---
gnu/packages/perl.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 1c21f30133..437c02c195 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -9996,6 +9996,30 @@ (define-public perl-switch
statements: @code{switch} and @code{case}.")
(license (package-license perl))))
+(define-public perl-syntax-keyword-try
+ (package
+ (name "perl-syntax-keyword-try")
+ (version "0.27")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://cpan/authors/id/P/PE/PEVANS/Syntax-Keyword-Try-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "08yyfhavmddix35kb7dvvj646symw2vd8l058bajzwiz7q1invi4"))))
+ (build-system perl-build-system)
+ (native-inputs (list perl-module-build))
+ (inputs (list perl-xs-parse-keyword))
+ (home-page "https://metacpan.org/pod/Syntax::Keyword::Try")
+ (synopsis "Try/catch/finally syntax for perl")
+ (description
+ "This module provides a syntax plugin that implements
+exception-handling semantics in a form familiar to users of other
+languages, being built on a block labeled with the @code{try} keyword,
+followed by at least one of a @code{catch} or @code{finally} block.")
+ (license (package-license perl))))
+
(define-public perl-sys-cpu
(package
(name "perl-sys-cpu")
--
2.38.1
Information forwarded
to
guix-patches <at> gnu.org
:
bug#60448
; Package
guix-patches
.
(Sat, 31 Dec 2022 16:04:03 GMT)
Full text and
rfc822 format available.
Message #20 received at 60448 <at> debbugs.gnu.org (full text, mbox):
The phase do-not-override-PERL5LIB is removed since it was fixed in po4a v0.63.
https://github.com/mquinson/po4a/blob/0ab1670e50f0a72781e3d1de6ab9da0c2d71c646/NEWS#L366
bash-minimal is added to inputs since the wrap-program function is used.
See also https://issues.guix.gnu.org/49327#80
The only regrettable thing is that only the SGML test failed, but I could not
find the cause... Nevertheless, some previously failed tests are now passing.
---
gnu/packages/gettext.scm | 48 +++++++++++++++++++++++-----------------
1 file changed, 28 insertions(+), 20 deletions(-)
diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm
index 5df30c4be3..04fc20e7bf 100644
--- a/gnu/packages/gettext.scm
+++ b/gnu/packages/gettext.scm
@@ -36,6 +36,7 @@ (define-module (gnu packages gettext)
#:use-module (guix build-system gnu)
#:use-module (guix build-system perl)
#:use-module (guix build-system python)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages check)
#:use-module (gnu packages docbook)
#:use-module (gnu packages emacs)
@@ -239,14 +240,14 @@ (define-public mdpo
(define-public po4a
(package
(name "po4a")
- (version "0.63")
+ (version "0.68")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/mquinson/po4a/releases/download/v"
version "/po4a-" version ".tar.gz"))
(sha256
(base32
- "1kmlfpdl1i1wrcdn0k1frh44fq10sfwswi3azvibli2lakpf66z2"))))
+ "045i8izp2dqmkdzvnxyy5sy27ffrwl85dk8n6cmg1804ikk28qdg"))))
(build-system perl-build-system)
(arguments
`(#:phases
@@ -257,9 +258,21 @@ (define-public po4a
;; required by this package at runtime.
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin/"))
- (Pod::Parser (assoc-ref inputs "perl-pod-parser"))
(path (string-append out "/lib/perl5/site_perl:"
- Pod::Parser "/lib/perl5/site_perl")))
+ (string-join
+ (map (lambda (name)
+ (string-append (assoc-ref inputs name)
+ "/lib/perl5/site_perl"))
+ (list "perl-gettext"
+ "perl-pod-parser"
+ "perl-sgmls"
+ "perl-syntax-keyword-try"
+ "perl-xs-parse-keyword"
+ "perl-term-readkey"
+ "perl-text-wrapi18n"
+ "perl-unicode-linebreak"
+ "perl-yaml-tiny"))
+ ":"))))
(for-each (lambda (file)
(wrap-program file
`("PERL5LIB" ":" prefix (,path))))
@@ -272,23 +285,10 @@ (define-public po4a
(string-append (assoc-ref inputs "docbook-xml")
"/xml/dtd/docbook/")))
#t))
- (add-before 'build 'do-not-override-PERL5LIB
- (lambda _
- ;; Don't hard-code PERL5LIB to include just the build directory
- ;; so that the build script finds modules from inputs.
- (substitute* "Po4aBuilder.pm"
- (("PERL5LIB=lib") ""))
- (setenv "PERL5LIB" (string-append (getenv "PERL5LIB") ":lib"))))
(add-before 'check 'disable-failing-tests
(lambda _
- ;; FIXME: these tests require SGMLS.pm.
- (delete-file "t/01-classes.t")
-
- (delete-file "t/add.t")
- (delete-file "t/core-porefs.t")
- (delete-file "t/fmt-asciidoc.t")
+ ;; FIXME: fails despite of importing SGMLS
(delete-file "t/fmt-sgml.t")
-
#t)))))
(native-inputs
`(("gettext" ,gettext-minimal)
@@ -300,10 +300,18 @@ (define-public po4a
;; For tests.
("docbook-xml" ,docbook-xml-4.1.2)
("perl-test-pod" ,perl-test-pod)
- ("perl-yaml-tiny" ,perl-yaml-tiny)
("texlive" ,texlive-tiny)))
(inputs
- (list perl-pod-parser))
+ (list bash-minimal
+ perl-gettext
+ perl-pod-parser
+ perl-sgmls
+ perl-syntax-keyword-try
+ perl-xs-parse-keyword
+ perl-term-readkey
+ perl-text-wrapi18n
+ perl-unicode-linebreak
+ perl-yaml-tiny))
(home-page "https://po4a.org/")
(synopsis "Scripts to ease maintenance of translations")
(description
--
2.38.1
Information forwarded
to
guix-patches <at> gnu.org
:
bug#60448
; Package
guix-patches
.
(Sat, 31 Dec 2022 16:04:03 GMT)
Full text and
rfc822 format available.
Message #23 received at 60448 <at> debbugs.gnu.org (full text, mbox):
---
gnu/packages/gettext.scm | 1 +
gnu/packages/perl.scm | 1 +
2 files changed, 2 insertions(+)
diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm
index 04fc20e7bf..c66e1f58d1 100644
--- a/gnu/packages/gettext.scm
+++ b/gnu/packages/gettext.scm
@@ -11,6 +11,7 @@
;;; Copyright © 2019 Miguel <rosen644835 <at> gmail.com>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke <at> gnu.org>
;;; Copyright © 2020 EuAndreh <eu <at> euandre.org>
+;;; Copyright © 2022 gemmaro <gemmaro.dev <at> gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 437c02c195..9edde39d49 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -33,6 +33,7 @@
;;; Copyright © 2021 Raghav Gururajan <rg <at> raghavgururajan.name>
;;; Copyright © 2021 Maxime Devos <maximedevos <at> telenet.be>
;;; Copyright © 2022 Evgeny Pisemsky <evgeny <at> pisemsky.com>
+;;; Copyright © 2022 gemmaro <gemmaro.dev <at> gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
--
2.38.1
Reply sent
to
Julien Lepiller <julien <at> lepiller.eu>
:
You have taken responsibility.
(Tue, 03 Jan 2023 20:28:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
gemmaro <gemmaro.dev <at> gmail.com>
:
bug acknowledged by developer.
(Tue, 03 Jan 2023 20:28:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 60448-done <at> debbugs.gnu.org (full text, mbox):
Pushed to master as 62ee1c4b47c6e1e62314223d62a5d54162a23fa8 -
a1f9eba892784069e34338e01237a74b8a3bd8a2, thank you!
I made some changes, but the series was really good overall! The main
change is that I integrated your copyright to the first patch that
modified the file.
I've left updating the process to later. We'll want to do it though,
the new interface looks really cool for our use-case, especially
because it supports using a single pot for multiple files (think
guix.texi and contributing.texi that currently raise a warning).
I'm happy to help if you want to try, otherwise I'll probably do it
sometime :)
Le Sat, 31 Dec 2022 14:56:13 +0900,
gemmaro <gemmaro.dev <at> gmail.com> a écrit :
> Hello Guix,
>
> This patch updates po4a to 0.68. It also includes additional
> dependencies required with the update.
>
> I have tried running "make as-derivation" with the following
> suggestion. Then I observed warnings that po4a should be used
> instead of po4a-translate. I don't think there were any other errors
> related to po4a.
> https://lists.gnu.org/archive/html/guix-patches/2021-07/msg00030.html
>
> Another side effect that comes to mind is that if the po4a parser has
> changed, it is possible that some of the entries in the translations
> will be fuzzy.
>
> I wrote this patch for my personal Markdown translation needs. And
> it appears to be working well for this format.
>
> Regards,
> gemmaro
>
> gemmaro (6):
> gnu: Add perl-text-charwidth
> gnu: Add perl-xs-parse-keyword
> gnu: Add perl-text-wrapi18n
> gnu: Add perl-syntax-keyword-try
> gnu: po4a: Update to 0.68
> Update copyright
>
> gnu/packages/gettext.scm | 49 +++++++++++---------
> gnu/packages/perl.scm | 96
> ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 125
> insertions(+), 20 deletions(-)
>
>
> base-commit: 8e883dc8210d4a7c3f09961994685ed54942fd73
Information forwarded
to
guix-patches <at> gnu.org
:
bug#60448
; Package
guix-patches
.
(Sun, 08 Jan 2023 07:06:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 60448 <at> debbugs.gnu.org (full text, mbox):
(Sorry, I had the wrong address and will resend.)
Hello,
Julien Lepiller <julien <at> lepiller.eu> writes:
> Pushed to master as 62ee1c4b47c6e1e62314223d62a5d54162a23fa8 -
> a1f9eba892784069e34338e01237a74b8a3bd8a2, thank you!
>
> I made some changes, but the series was really good overall! The main
> change is that I integrated your copyright to the first patch that
> modified the file.
>
> I've left updating the process to later. We'll want to do it though,
> the new interface looks really cool for our use-case, especially
> because it supports using a single pot for multiple files (think
> guix.texi and contributing.texi that currently raise a warning).
>
> I'm happy to help if you want to try, otherwise I'll probably do it
> sometime :)
Thank you very much! Actually, I am new to both Guix and Guile Scheme,
but if I can be of any help, I would be happy to try to contribute.
Two points of concern at this time are as follows:
* My current understanding of Guix's internationalization process is
that translations are updated on Weblate and that translated documents
are generated with po4a. It seems that the current file structure and
options should not be changed significantly after the change.
* A configuration file must be given to the integrated po4a command. In
the long run, there might be a room to consider how this configuration
file should be managed, i.e., whether it should be automatically
generated by Guile or updated manually. (At this point, the file
structure is simple enough that the latter might be enough.)
Anyway, I will try to think about how to update the process.
Sincerely,
gemmaro
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 05 Feb 2023 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 228 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.