* [bug#74190] [PATCH 0/3] install: Enable pt_BR translation.
@ 2024-11-03 15:14 Florian Pelz
2024-11-03 15:25 ` [bug#74190] [PATCH 1/3] install: Open info manuals that have region codes Florian Pelz
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Florian Pelz @ 2024-11-03 15:14 UTC (permalink / raw)
To: 74190; +Cc: Florian Pelz
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#74190] [PATCH 1/3] install: Open info manuals that have region codes.
2024-11-03 15:14 [bug#74190] [PATCH 0/3] install: Enable pt_BR translation Florian Pelz
@ 2024-11-03 15:25 ` Florian Pelz
2024-11-03 15:25 ` [bug#74190] [PATCH 2/3] install: Change the territory when we have learned it Florian Pelz
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Florian Pelz @ 2024-11-03 15:25 UTC (permalink / raw)
To: 74190; +Cc: Florian Pelz
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(-)
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#74190] [PATCH 2/3] install: Change the territory when we have learned it.
2024-11-03 15:14 [bug#74190] [PATCH 0/3] install: Enable pt_BR translation Florian Pelz
2024-11-03 15:25 ` [bug#74190] [PATCH 1/3] install: Open info manuals that have region codes Florian Pelz
@ 2024-11-03 15:25 ` Florian Pelz
2024-11-03 15:25 ` [bug#74190] [PATCH 3/3] gnu: info-reader: Inherit from texinfo-7 Florian Pelz
2024-11-03 20:37 ` [bug#74190] [PATCH 0/3] install: Enable pt_BR translation Krascovict Petrov
3 siblings, 0 replies; 8+ messages in thread
From: Florian Pelz @ 2024-11-03 15:25 UTC (permalink / raw)
To: 74190; +Cc: Florian Pelz, Josselin Poiret, Ludovic Courtès,
Mathieu Othacehe
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(-)
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#74190] [PATCH 3/3] gnu: info-reader: Inherit from texinfo-7.
2024-11-03 15:14 [bug#74190] [PATCH 0/3] install: Enable pt_BR translation Florian Pelz
2024-11-03 15:25 ` [bug#74190] [PATCH 1/3] install: Open info manuals that have region codes Florian Pelz
2024-11-03 15:25 ` [bug#74190] [PATCH 2/3] install: Change the territory when we have learned it Florian Pelz
@ 2024-11-03 15:25 ` Florian Pelz
2024-11-03 20:37 ` [bug#74190] [PATCH 0/3] install: Enable pt_BR translation Krascovict Petrov
3 siblings, 0 replies; 8+ messages in thread
From: Florian Pelz @ 2024-11-03 15:25 UTC (permalink / raw)
To: 74190; +Cc: Florian Pelz
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(-)
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#74190] [PATCH 0/3] install: Enable pt_BR translation.
2024-11-03 15:14 [bug#74190] [PATCH 0/3] install: Enable pt_BR translation Florian Pelz
` (2 preceding siblings ...)
2024-11-03 15:25 ` [bug#74190] [PATCH 3/3] gnu: info-reader: Inherit from texinfo-7 Florian Pelz
@ 2024-11-03 20:37 ` Krascovict Petrov
2024-11-04 7:52 ` pelzflorian (Florian Pelz)
3 siblings, 1 reply; 8+ messages in thread
From: Krascovict Petrov @ 2024-11-03 20:37 UTC (permalink / raw)
To: 74190@debbugs.gnu.org
[-- Attachment #1: Type: text/html, Size: 296 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#74190] [PATCH 0/3] install: Enable pt_BR translation.
2024-11-03 20:37 ` [bug#74190] [PATCH 0/3] install: Enable pt_BR translation Krascovict Petrov
@ 2024-11-04 7:52 ` pelzflorian (Florian Pelz)
2024-11-04 22:08 ` Krascovict Petrov
0 siblings, 1 reply; 8+ messages in thread
From: pelzflorian (Florian Pelz) @ 2024-11-04 7:52 UTC (permalink / raw)
To: Krascovict Petrov; +Cc: 74190@debbugs.gnu.org
Hello Krascovict and thank you for translating.
Note that I do not speak Portuguese.
Krascovict Petrov <krascovict@yandex.ru> writes:
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#74190] [PATCH 0/3] install: Enable pt_BR translation.
2024-11-04 7:52 ` pelzflorian (Florian Pelz)
@ 2024-11-04 22:08 ` Krascovict Petrov
2024-11-05 8:59 ` pelzflorian (Florian Pelz)
0 siblings, 1 reply; 8+ messages in thread
From: Krascovict Petrov @ 2024-11-04 22:08 UTC (permalink / raw)
To: pelzflorian (Florian Pelz); +Cc: 74190@debbugs.gnu.org
[-- Attachment #1: Type: text/html, Size: 1371 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#74190] [PATCH 0/3] install: Enable pt_BR translation.
2024-11-04 22:08 ` Krascovict Petrov
@ 2024-11-05 8:59 ` pelzflorian (Florian Pelz)
0 siblings, 0 replies; 8+ messages in thread
From: pelzflorian (Florian Pelz) @ 2024-11-05 8:59 UTC (permalink / raw)
To: Krascovict Petrov; +Cc: 74190@debbugs.gnu.org
Krascovict Petrov <krascovict@yandex.ru> writes:
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-11-05 9:00 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-03 15:14 [bug#74190] [PATCH 0/3] install: Enable pt_BR translation Florian Pelz
2024-11-03 15:25 ` [bug#74190] [PATCH 1/3] install: Open info manuals that have region codes Florian Pelz
2024-11-03 15:25 ` [bug#74190] [PATCH 2/3] install: Change the territory when we have learned it Florian Pelz
2024-11-03 15:25 ` [bug#74190] [PATCH 3/3] gnu: info-reader: Inherit from texinfo-7 Florian Pelz
2024-11-03 20:37 ` [bug#74190] [PATCH 0/3] install: Enable pt_BR translation Krascovict Petrov
2024-11-04 7:52 ` pelzflorian (Florian Pelz)
2024-11-04 22:08 ` Krascovict Petrov
2024-11-05 8:59 ` pelzflorian (Florian Pelz)
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).