[PATCH 0/3] install: Enable pt_BR translation.

  • Done
  • quality assurance status badge
Details
3 participants
  • Krascovict Petrov
  • Ludovic Courtès
  • Florian Pelz
Owner
unassigned
Submitted by
Florian Pelz
Severity
normal
F
F
Florian Pelz wrote on 3 Nov 16:14 +0100
(address . guix-patches@gnu.org)(name . Florian Pelz)(address . pelzflorian@pelzflorian.de)
cover.1730645617.git.pelzflorian@pelzflorian.de
Hello. The goal of these patches is to make the pt_BR translation,
that had been expanded much on Weblate recently,
usable in the Guix System latest installer.

Florian Pelz (3):
install: Open info manuals that have region codes.
install: Change the territory when we have learned it.
gnu: info-reader: Inherit from texinfo-7.

gnu/installer/newt/locale.scm | 17 ++++++++++-------
gnu/packages/texinfo.scm | 2 +-
gnu/system/install.scm | 29 ++++++++++++++++++-----------
3 files changed, 29 insertions(+), 19 deletions(-)


base-commit: 20c7b8dd04e421a139a02438cf1ddfdfe544a446
--
2.46.0
F
F
Florian Pelz wrote on 3 Nov 16:25 +0100
[PATCH 1/3] install: Open info manuals that have region codes.
(address . 74190@debbugs.gnu.org)(name . Florian Pelz)(address . pelzflorian@pelzflorian.de)
e8248c0cf7bd253d553464142e6e35990c2ef14e.1730645617.git.pelzflorian@pelzflorian.de
Because pt_PT and pt_BR have many differences, such as how
the word “file” gets translated, Guix’ pt_BR info manual is
called (guix.pt_BR) instead of (guix.pt).

* gnu/system/install.scm (log-to-info): Try region coded manual
file names.
(%installation-node-names): Add node names for pt_BR and zh_CN.

Change-Id: I89beebd323ee69ca83c22321c9d9e664b32cf6f3
---
NOTE: This patch also causes the Chinese manual to be opened for zh_CN,
which is somewhat broken during installation, because Chinese characters
cannot be displayed on an ordinary TTY. I have made only trivial
attempts to run kmscon from documentation-shepherd-service, which failed.
But including this patch still seems proper to me despite trouble with
zh_CN.

pt_BR is also troubled by the texinfo info-reader crashing, which is
addressed in patch 3/3.

gnu/system/install.scm | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)

Toggle diff (82 lines)
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index 78a3cdaaec..4de903c59b 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -4,7 +4,7 @@
;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de>
+;;; Copyright © 2020, 2024 Florian Pelz <pelzflorian@pelzflorian.de>
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2022 Josselin Poiret <dev@jpoiret.xyz>
;;; Copyright © 2023 Herman Rimm <herman@rimm.ee>
@@ -31,11 +31,9 @@ (define-module (gnu system install)
#:use-module (gnu bootloader u-boot)
#:use-module (guix gexp)
#:use-module (guix store)
- #:use-module (guix monads)
#:use-module (guix modules)
#:use-module ((guix packages) #:select (package-version supported-package?))
#:use-module (guix platform)
- #:use-module ((guix store) #:select (%store-prefix))
#:use-module (guix utils)
#:use-module (gnu installer)
#:use-module (gnu system locale)
@@ -47,7 +45,6 @@ (define-module (gnu system install)
#:use-module (gnu packages admin)
#:use-module (gnu packages bash)
#:use-module (gnu packages bootloaders)
- #:use-module (gnu packages certs)
#:use-module (gnu packages compression)
#:use-module (gnu packages cryptsetup)
#:use-module (gnu packages disk)
@@ -60,7 +57,6 @@ (define-module (gnu system install)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages xorg)
#:use-module (ice-9 match)
- #:use-module (srfi srfi-26)
#:export (installation-os
a20-olinuxino-lime-installation-os
a20-olinuxino-lime2-emmc-installation-os
@@ -100,7 +96,9 @@ (define %installation-node-names
("en" . "System Installation")
("es" . "Instalación del sistema")
("fr" . "Installation du système")
- ("ru" . "????????? ???????")))
+ ("pt_BR" . "Instalação do sistema")
+ ("ru" . "????????? ???????")
+ ("zh_CN" . "????")))
(define (log-to-info tty user)
"Return a script that spawns the Info reader on the right section of the
@@ -111,13 +109,22 @@ (define (log-to-info tty user)
(locale (cadr (command-line)))
(language (string-take locale
(string-index locale #\_)))
+ (with-region (string-take locale
+ (string-index
+ locale
+ (char-set #\. #\/ #\@))))
(infodir "/run/current-system/profile/share/info")
- (per-lang (string-append infodir "/guix." language
- ".info.gz"))
- (file (if (file-exists? per-lang)
- per-lang
- (string-append infodir "/guix.info")))
+ (per-lang (lambda (code)
+ (string-append infodir "/guix." code
+ ".info.gz")))
+ (file ((@ (srfi srfi-1) find) file-exists?
+ (list (per-lang with-region)
+ (per-lang language)
+ (string-append infodir
+ "/guix.info.gz"))))
(node (or (assoc-ref '#$%installation-node-names
+ with-region)
+ (assoc-ref '#$%installation-node-names
language)
"System Installation")))
(redirect-port tty (current-output-port))
--
2.46.0
F
F
Florian Pelz wrote on 3 Nov 16:25 +0100
[PATCH 2/3] install: Change the territory when we have learned it.
(address . 74190@debbugs.gnu.org)(name . Florian Pelz)(address . pelzflorian@pelzflorian.de)
1e50d2858a80c891f3b7fa377e5b876c475f9e92.1730645617.git.pelzflorian@pelzflorian.de
Typically, the LANGUAGE has already been set in the run-language-page
step. But for languages like pt, we must know the territory.

gnu/installer/newt/locale.scm (run-territory-page): Switch to
the territory before returning it.

Change-Id: Ie6308c359e0bdb2d37fac0c844cfd879e96e231a
---
gnu/installer/newt/locale.scm | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)

Toggle diff (52 lines)
diff --git a/gnu/installer/newt/locale.scm b/gnu/installer/newt/locale.scm
index 01171e253f..1743e0d582 100644
--- a/gnu/installer/newt/locale.scm
+++ b/gnu/installer/newt/locale.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2024 Florian Pelz <pelzflorian@pelzflorian.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -22,11 +23,7 @@ (define-module (gnu installer newt locale)
#:use-module (gnu installer steps)
#:use-module (gnu installer newt page)
#:use-module (guix i18n)
- #:use-module (newt)
#:use-module (srfi srfi-1)
- #:use-module (srfi srfi-26)
- #:use-module (srfi srfi-34)
- #:use-module (srfi srfi-35)
#:use-module (ice-9 match)
#:export (run-locale-page))
@@ -52,16 +49,22 @@ (define (run-language-page languages language->text)
result)
(define (run-territory-page territories territory->text)
- (let ((title (G_ "Locale location")))
+ (define result
(run-listbox-selection-page
- #:title title
+ #:title (G_ "Locale location")
#:info-text (G_ "Choose a territory for this language.")
#:listbox-items territories
#:listbox-item->text territory->text
#:button-text (G_ "Back")
#:button-callback-procedure
(lambda _
- (abort-to-prompt 'installer-step 'abort)))))
+ (abort-to-prompt 'installer-step 'abort))))
+
+ ;; Some languages, such as pt, cannot be installed early in the
+ ;; run-language-page step. Install them now, when we know the territory.
+ (setenv "LANGUAGE" (string-append (getenv "LANGUAGE") "_" result))
+
+ result)
(define (run-codeset-page codesets)
(let ((title (G_ "Locale codeset")))
--
2.46.0
F
F
Florian Pelz wrote on 3 Nov 16:25 +0100
[PATCH 3/3] gnu: info-reader: Inherit from texinfo-7.
(address . 74190@debbugs.gnu.org)(name . Florian Pelz)(address . pelzflorian@pelzflorian.de)
cfdc2a4d550d1ec1793971b17b5762d7215394fc.1730645617.git.pelzflorian@pelzflorian.de
Otherwise `LC_ALL=pt_BR.utf8 info` crashes.

* gnu/packages/texinfo.scm (info-reader): Inherit from texinfo-7.

Change-Id: I9eb5873fbc115e0c45f96a16aa05dbca76b92c57
---
I have not carefully thought about the consequences of this change,
but it makes info work for the installer in pt_BR.

gnu/packages/texinfo.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm
index 81afdaf7a7..e198581b52 100644
--- a/gnu/packages/texinfo.scm
+++ b/gnu/packages/texinfo.scm
@@ -194,7 +194,7 @@ (define-public texinfo-4
(define-public info-reader
;; The idea of this package is to have the standalone Info reader without
;; the dependency on Perl that 'makeinfo' drags.
- (package/inherit texinfo
+ (package/inherit texinfo-7
(name "info-reader")
(arguments
`(,@(substitute-keyword-arguments (package-arguments texinfo)
--
2.46.0
K
K
Krascovict Petrov wrote on 3 Nov 21:37 +0100
[PATCH 0/3] install: Enable pt_BR translation.
(name . 74190@debbugs.gnu.org)(address . 74190@debbugs.gnu.org)
26101730666097@mail.yandex.ru
Attachment: file
P
P
pelzflorian (Florian Pelz) wrote on 4 Nov 08:52 +0100
(name . Krascovict Petrov)(address . krascovict@yandex.ru)(name . 74190@debbugs.gnu.org)(address . 74190@debbugs.gnu.org)
87cyjbo2pi.fsf@pelzflorian.de
Hello Krascovict and thank you for translating.

Note that I do not speak Portuguese.

Krascovict Petrov <krascovict@yandex.ru> writes:
Toggle quote (3 lines)
> In this case I am in doubt about translations of functions (inside the
> parentheses) whether they can be translated or not?

Generally no, but you can look at the string in Weblate in other
languages like Spanish or French. See if they have translated it.
For example, if a variable name is defined with (define), in a few
cases, it is possible to translate it, but it must be translated
everywhere the same way.

Alternatively you would have to test in Guix if it works.

Regards,
Florian
K
K
Krascovict Petrov wrote on 4 Nov 23:08 +0100
(name . pelzflorian (Florian Pelz))(address . pelzflorian@pelzflorian.de)(name . 74190@debbugs.gnu.org)(address . 74190@debbugs.gnu.org)
4462491730758010@mail.yandex.ru
Attachment: file
P
P
pelzflorian (Florian Pelz) wrote on 5 Nov 09:59 +0100
(name . Krascovict Petrov)(address . krascovict@yandex.ru)(name . 74190@debbugs.gnu.org)(address . 74190@debbugs.gnu.org)
87v7x2vywp.fsf@pelzflorian.de
Krascovict Petrov <krascovict@yandex.ru> writes:
Toggle quote (3 lines)
> I understand Florian Pelz, at first I will translate the texts, when I reach 100% translation I will test it on a virtual machine and do tests, thank
> you for the congratulations.

Yes, but I do recommend looking at Spanish or French for difficult,
ambiguous translations, particularly in some services’ ambiguous texts.
100% is a difficult goal for some of them, and correctness is more
important than having a translation. For example, you and other
translators frequently translated a graph from graph theory like
gráfico, or the /gnu/store store like loja (shop), which I then changed
to the word armazém from Guix’ Portuguese glossary.

Regards,
Florian
L
L
Ludovic Courtès wrote on 17 Nov 18:06 +0100
Re: [bug#74190] [PATCH 1/3] install: Open info manuals that have region codes.
(name . Florian Pelz)(address . pelzflorian@pelzflorian.de)(address . 74190@debbugs.gnu.org)
87cyitkcxx.fsf@gnu.org
Hi,

Florian Pelz <pelzflorian@pelzflorian.de> skribis:

Toggle quote (10 lines)
> Because pt_PT and pt_BR have many differences, such as how
> the word “file” gets translated, Guix’ pt_BR info manual is
> called (guix.pt_BR) instead of (guix.pt).
>
> * gnu/system/install.scm (log-to-info): Try region coded manual
> file names.
> (%installation-node-names): Add node names for pt_BR and zh_CN.
>
> Change-Id: I89beebd323ee69ca83c22321c9d9e664b32cf6f3

LGTM!
L
L
Ludovic Courtès wrote on 17 Nov 18:08 +0100
Re: [bug#74190] [PATCH 2/3] install: Change the territory when we have learned it.
(name . Florian Pelz)(address . pelzflorian@pelzflorian.de)
878qthkct0.fsf@gnu.org
Florian Pelz <pelzflorian@pelzflorian.de> skribis:

Toggle quote (4 lines)
> Typically, the LANGUAGE has already been set in the run-language-page
> step. But for languages like pt, we must know the territory.
>
> gnu/installer/newt/locale.scm (run-territory-page): Switch to
^
Missing bullet (star).

Toggle quote (2 lines)
> the territory before returning it.

Instead of “Switch to…”, I’d write “Call ‘setenv’ for the ‘LANGUAGE’
variable.”

Toggle quote (19 lines)
> (define (run-territory-page territories territory->text)
> - (let ((title (G_ "Locale location")))
> + (define result
> (run-listbox-selection-page
> - #:title title
> + #:title (G_ "Locale location")
> #:info-text (G_ "Choose a territory for this language.")
> #:listbox-items territories
> #:listbox-item->text territory->text
> #:button-text (G_ "Back")
> #:button-callback-procedure
> (lambda _
> - (abort-to-prompt 'installer-step 'abort)))))
> + (abort-to-prompt 'installer-step 'abort))))
> +
> + ;; Some languages, such as pt, cannot be installed early in the
> + ;; run-language-page step. Install them now, when we know the territory.
> + (setenv "LANGUAGE" (string-append (getenv "LANGUAGE") "_" result))

Does that have an effect though: isn’t the Info reader already running
at this point?

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 17 Nov 18:10 +0100
Re: [bug#74190] [PATCH 3/3] gnu: info-reader: Inherit from texinfo-7.
(name . Florian Pelz)(address . pelzflorian@pelzflorian.de)(address . 74190@debbugs.gnu.org)
874j45kcqv.fsf@gnu.org
Florian Pelz <pelzflorian@pelzflorian.de> skribis:

Toggle quote (6 lines)
> Otherwise `LC_ALL=pt_BR.utf8 info` crashes.
>
> * gnu/packages/texinfo.scm (info-reader): Inherit from texinfo-7.
>
> Change-Id: I9eb5873fbc115e0c45f96a16aa05dbca76b92c57

[...]

Toggle quote (6 lines)
> (define-public info-reader
> ;; The idea of this package is to have the standalone Info reader without
> ;; the dependency on Perl that 'makeinfo' drags.
> - (package/inherit texinfo
> + (package/inherit texinfo-7

Please add a comment explaining why this particular version of Texinfo
is needed.

Any idea why the Info reader crashes specifically for this locale? Does
it work with, say, de_DE.utf8?

Ludo’.
F
F
Florian Pelz wrote on 18 Nov 00:47 +0100
[PATCH v2 0/3] install: Enable pt_BR locale.
(address . 74190@debbugs.gnu.org)(name . Florian Pelz)(address . pelzflorian@pelzflorian.de)
cover.1731881786.git.pelzflorian@pelzflorian.de
Changes in patch 2/3 and 3/3 to add missing commentary found by Ludo.
Rebased onto current master.

Florian Pelz (3):
install: Open info manuals that have region codes.
install: Change the territory when we have learned it.
gnu: info-reader: Inherit from texinfo-7.

gnu/installer/newt/locale.scm | 16 ++++++++++------
gnu/packages/texinfo.scm | 4 +++-
gnu/system/install.scm | 29 ++++++++++++++++++-----------
3 files changed, 31 insertions(+), 18 deletions(-)


base-commit: d108a7aac2c51f21c55cb8ea8801629a97f5242a
--
2.46.0
F
F
Florian Pelz wrote on 18 Nov 00:48 +0100
[PATCH v2 1/3] install: Open info manuals that have region codes.
(address . 74190@debbugs.gnu.org)(name . Florian Pelz)(address . pelzflorian@pelzflorian.de)
7f9cc4f5378a22f2fb2891403fbc4714bb5b8f34.1731881786.git.pelzflorian@pelzflorian.de
Because pt_PT and pt_BR have many differences, such as how
the word “file” gets translated, Guix’ pt_BR info manual is
called (guix.pt_BR) instead of (guix.pt).

* gnu/system/install.scm (log-to-info): Try region coded manual
file names.
(%installation-node-names): Add node names for pt_BR and zh_CN.

Change-Id: I89beebd323ee69ca83c22321c9d9e664b32cf6f3
---
gnu/system/install.scm | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)

Toggle diff (82 lines)
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index 78a3cdaaec..4de903c59b 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -4,7 +4,7 @@
;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de>
+;;; Copyright © 2020, 2024 Florian Pelz <pelzflorian@pelzflorian.de>
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2022 Josselin Poiret <dev@jpoiret.xyz>
;;; Copyright © 2023 Herman Rimm <herman@rimm.ee>
@@ -31,11 +31,9 @@ (define-module (gnu system install)
#:use-module (gnu bootloader u-boot)
#:use-module (guix gexp)
#:use-module (guix store)
- #:use-module (guix monads)
#:use-module (guix modules)
#:use-module ((guix packages) #:select (package-version supported-package?))
#:use-module (guix platform)
- #:use-module ((guix store) #:select (%store-prefix))
#:use-module (guix utils)
#:use-module (gnu installer)
#:use-module (gnu system locale)
@@ -47,7 +45,6 @@ (define-module (gnu system install)
#:use-module (gnu packages admin)
#:use-module (gnu packages bash)
#:use-module (gnu packages bootloaders)
- #:use-module (gnu packages certs)
#:use-module (gnu packages compression)
#:use-module (gnu packages cryptsetup)
#:use-module (gnu packages disk)
@@ -60,7 +57,6 @@ (define-module (gnu system install)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages xorg)
#:use-module (ice-9 match)
- #:use-module (srfi srfi-26)
#:export (installation-os
a20-olinuxino-lime-installation-os
a20-olinuxino-lime2-emmc-installation-os
@@ -100,7 +96,9 @@ (define %installation-node-names
("en" . "System Installation")
("es" . "Instalación del sistema")
("fr" . "Installation du système")
- ("ru" . "????????? ???????")))
+ ("pt_BR" . "Instalação do sistema")
+ ("ru" . "????????? ???????")
+ ("zh_CN" . "????")))
(define (log-to-info tty user)
"Return a script that spawns the Info reader on the right section of the
@@ -111,13 +109,22 @@ (define (log-to-info tty user)
(locale (cadr (command-line)))
(language (string-take locale
(string-index locale #\_)))
+ (with-region (string-take locale
+ (string-index
+ locale
+ (char-set #\. #\/ #\@))))
(infodir "/run/current-system/profile/share/info")
- (per-lang (string-append infodir "/guix." language
- ".info.gz"))
- (file (if (file-exists? per-lang)
- per-lang
- (string-append infodir "/guix.info")))
+ (per-lang (lambda (code)
+ (string-append infodir "/guix." code
+ ".info.gz")))
+ (file ((@ (srfi srfi-1) find) file-exists?
+ (list (per-lang with-region)
+ (per-lang language)
+ (string-append infodir
+ "/guix.info.gz"))))
(node (or (assoc-ref '#$%installation-node-names
+ with-region)
+ (assoc-ref '#$%installation-node-names
language)
"System Installation")))
(redirect-port tty (current-output-port))
--
2.46.0
F
F
Florian Pelz wrote on 18 Nov 00:48 +0100
[PATCH v2 2/3] install: Change the territory when we have learned it.
(address . 74190@debbugs.gnu.org)(name . Florian Pelz)(address . pelzflorian@pelzflorian.de)
03b8e561289d30b4af84ff1392eb27a51609dba3.1731881786.git.pelzflorian@pelzflorian.de
Typically, the LANGUAGE has already been set in the run-language-page
step. But for languages like pt, we must know the territory.

* gnu/installer/newt/locale.scm (run-territory-page): Call ‘setenv’ for
the ‘LANGUAGE’ variable.

Change-Id: Ie6308c359e0bdb2d37fac0c844cfd879e96e231a
---
Note: I’ve tested this in QEMU and with it, a zh_CN, pt_BR locale gets
applied visibly. Also, it repeats exactly what was done in
‘run-language-page’. Context: when the installer enters the
encompassing ‘run-locale-page’ procedure, it runs the installer
sub-steps ‘run-language-page’ and ‘run-territory-page’ in
immediate succession with no way to go back just one sub-step.
Esperanto does not go through ‘run-territory-page’ and is not broken
by this change.

gnu/installer/newt/locale.scm | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)

Toggle diff (50 lines)
diff --git a/gnu/installer/newt/locale.scm b/gnu/installer/newt/locale.scm
index 0be9db449e..df168baca9 100644
--- a/gnu/installer/newt/locale.scm
+++ b/gnu/installer/newt/locale.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2024 Florian Pelz <pelzflorian@pelzflorian.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -24,9 +25,6 @@ (define-module (gnu installer newt locale)
#:use-module (gnu installer newt page)
#:use-module (guix i18n)
#:use-module (srfi srfi-1)
- #:use-module (srfi srfi-26)
- #:use-module (srfi srfi-34)
- #:use-module (srfi srfi-35)
#:use-module (ice-9 match)
#:export (run-locale-page))
@@ -52,16 +50,22 @@ (define (run-language-page languages language->text)
result)
(define (run-territory-page territories territory->text)
- (let ((title (G_ "Locale location")))
+ (define result
(run-listbox-selection-page
- #:title title
+ #:title (G_ "Locale location")
#:info-text (G_ "Choose a territory for this language.")
#:listbox-items territories
#:listbox-item->text territory->text
#:button-text (G_ "Back")
#:button-callback-procedure
(lambda _
- (abort-to-prompt 'installer-step 'abort)))))
+ (abort-to-prompt 'installer-step 'abort))))
+
+ ;; Some languages, such as pt, cannot be installed early in the
+ ;; run-language-page step. Install them now, when we know the territory.
+ (setenv "LANGUAGE" (string-append (getenv "LANGUAGE") "_" result))
+
+ result)
(define (run-codeset-page codesets)
(let ((title (G_ "Locale codeset")))
--
2.46.0
F
F
Florian Pelz wrote on 18 Nov 00:49 +0100
[PATCH v2 3/3] gnu: info-reader: Inherit from texinfo-7.
(address . 74190@debbugs.gnu.org)(name . Florian Pelz)(address . pelzflorian@pelzflorian.de)
91d3941d6e1e895eb6770f6bc477d5363fd9047f.1731881786.git.pelzflorian@pelzflorian.de
Otherwise `LC_ALL=pt_BR.utf8 info` crashes.

* gnu/packages/texinfo.scm (info-reader): Inherit from texinfo-7.

Change-Id: I9eb5873fbc115e0c45f96a16aa05dbca76b92c57
---
A Web search points at the cause of the Texinfo crash being a typo
in Texinfo’s own po file translations. If so, Texinfo 6 could be
patched alternatively.
ent-texinfo-fails-with-pt_br-locale-4175703232/>

gnu/packages/texinfo.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm
index 81afdaf7a7..cd474bb566 100644
--- a/gnu/packages/texinfo.scm
+++ b/gnu/packages/texinfo.scm
@@ -194,7 +194,9 @@ (define-public texinfo-4
(define-public info-reader
;; The idea of this package is to have the standalone Info reader without
;; the dependency on Perl that 'makeinfo' drags.
- (package/inherit texinfo
+ ;; Texinfo version must be at least 7.0, which fixed crashes in a pt_BR
+ ;; locale; see <https://git.savannah.gnu.org/cgit/texinfo.git/plain/NEWS>.
+ (package/inherit texinfo-7
(name "info-reader")
(arguments
`(,@(substitute-keyword-arguments (package-arguments texinfo)
--
2.46.0
P
P
pelzflorian (Florian Pelz) wrote on 18 Nov 11:26 +0100
Re: [PATCH v2 2/3] install: Change the territory when we have learned it.
(address . 74190@debbugs.gnu.org)
87r078on1o.fsf@pelzflorian.de
Florian Pelz <pelzflorian@pelzflorian.de> writes:
Toggle quote (7 lines)
> Note: I’ve tested this in QEMU and with it, a zh_CN, pt_BR locale gets
> applied visibly. Also, it repeats exactly what was done in
> ‘run-language-page’. Context: when the installer enters the
> encompassing ‘run-locale-page’ procedure, it runs the installer
> sub-steps ‘run-language-page’ and ‘run-territory-page’ in
> immediate succession with no way to go back just one sub-step.

Oh well, I’ve found this should not be true for ?????? (Serbian) when
pressing the back button from the Latin/Cyrillic codeset selection
sub-step. In theory, it would set an invalid LANGUAGE like sr_RS_RS and
thus print messages in English. But there is no Serb translation and
the back button does not even work (in current master and 1.4.0).

We could search for some other way to pass the country code to the
run-territory-page other than (getenv "LANGUAGE"), such as set! it in
some variable or strip the territory from (getenv "LANGUAGE").

Is this worth it? Currently it does not make a difference anyway.

Regards,
Florian
L
L
Ludovic Courtès wrote on 20 Nov 13:07 +0100
Re: [bug#74190] [PATCH v2 2/3] install: Change the territory when we have learned it.
(name . pelzflorian (Florian Pelz))(address . pelzflorian@pelzflorian.de)(address . 74190@debbugs.gnu.org)
87a5duxg4r.fsf@gnu.org
"pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> skribis:

Toggle quote (20 lines)
> Florian Pelz <pelzflorian@pelzflorian.de> writes:
>> Note: I’ve tested this in QEMU and with it, a zh_CN, pt_BR locale gets
>> applied visibly. Also, it repeats exactly what was done in
>> ‘run-language-page’. Context: when the installer enters the
>> encompassing ‘run-locale-page’ procedure, it runs the installer
>> sub-steps ‘run-language-page’ and ‘run-territory-page’ in
>> immediate succession with no way to go back just one sub-step.
>
> Oh well, I’ve found this should not be true for ?????? (Serbian) when
> pressing the back button from the Latin/Cyrillic codeset selection
> sub-step. In theory, it would set an invalid LANGUAGE like sr_RS_RS and
> thus print messages in English. But there is no Serb translation and
> the back button does not even work (in current master and 1.4.0).
>
> We could search for some other way to pass the country code to the
> run-territory-page other than (getenv "LANGUAGE"), such as set! it in
> some variable or strip the territory from (getenv "LANGUAGE").
>
> Is this worth it? Currently it does not make a difference anyway.

Yeah, let’s not bother too much if it’s purely theoretical at this
point.

Ludo’.
L
L
Ludovic Courtès wrote on 20 Nov 13:08 +0100
Re: [bug#74190] [PATCH v2 0/3] install: Enable pt_BR locale.
(name . Florian Pelz)(address . pelzflorian@pelzflorian.de)(address . 74190@debbugs.gnu.org)
875xoixg3o.fsf@gnu.org
Florian Pelz <pelzflorian@pelzflorian.de> skribis:

Toggle quote (8 lines)
> Changes in patch 2/3 and 3/3 to add missing commentary found by Ludo.
> Rebased onto current master.
>
> Florian Pelz (3):
> install: Open info manuals that have region codes.
> install: Change the territory when we have learned it.
> gnu: info-reader: Inherit from texinfo-7.

LGTM, thanks!
P
P
pelzflorian (Florian Pelz) wrote on 20 Nov 18:27 +0100
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 74190-done@debbugs.gnu.org)
871pz5n7cq.fsf@pelzflorian.de
Pushed as 84d5948ee02f6d9aff11603492001eef9df27f95 and following.

Thank you Ludo for the opinions and noticing what was missing.

Soon the download latest images at
will speak Brazilian Portuguese.

Regards,
Florian
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 74190@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 74190
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch