diff options
author | Florian Pelz <pelzflorian@pelzflorian.de> | 2024-11-02 21:49:45 +0100 |
---|---|---|
committer | Florian Pelz <pelzflorian@pelzflorian.de> | 2024-11-20 16:02:06 +0100 |
commit | d2475833e4ca8238a8254b774a94bd8d973e8cb5 (patch) | |
tree | 3b4f423e57e6cff623cce58522f05b3b2eb1fb40 /gnu/installer/newt | |
parent | 84d5948ee02f6d9aff11603492001eef9df27f95 (diff) | |
download | guix-d2475833e4ca8238a8254b774a94bd8d973e8cb5.tar.gz guix-d2475833e4ca8238a8254b774a94bd8d973e8cb5.zip |
install: Change the territory when we have learned it.
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
Diffstat (limited to 'gnu/installer/newt')
-rw-r--r-- | gnu/installer/newt/locale.scm | 16 |
1 files changed, 10 insertions, 6 deletions
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 @@ #: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 @@ installation process and for the installed system.") 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"))) |