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 | |
| parent | 84d5948ee02f6d9aff11603492001eef9df27f95 (diff) | |
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')
| -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 0be9db449e9..df168baca9a 100644 --- a/gnu/installer/newt/locale.scm +++ b/gnu/installer/newt/locale.scm | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com> | 2 | ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com> |
| 3 | ;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org> | 3 | ;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org> |
| 4 | ;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org> | 4 | ;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org> |
| 5 | ;;; Copyright © 2024 Florian Pelz <pelzflorian@pelzflorian.de> | ||
| 5 | ;;; | 6 | ;;; |
| 6 | ;;; This file is part of GNU Guix. | 7 | ;;; This file is part of GNU Guix. |
| 7 | ;;; | 8 | ;;; |
| @@ -24,9 +25,6 @@ | |||
| 24 | #:use-module (gnu installer newt page) | 25 | #:use-module (gnu installer newt page) |
| 25 | #:use-module (guix i18n) | 26 | #:use-module (guix i18n) |
| 26 | #:use-module (srfi srfi-1) | 27 | #:use-module (srfi srfi-1) |
| 27 | #:use-module (srfi srfi-26) | ||
| 28 | #:use-module (srfi srfi-34) | ||
| 29 | #:use-module (srfi srfi-35) | ||
| 30 | #:use-module (ice-9 match) | 28 | #:use-module (ice-9 match) |
| 31 | #:export (run-locale-page)) | 29 | #:export (run-locale-page)) |
| 32 | 30 | ||
| @@ -52,16 +50,22 @@ installation process and for the installed system.") | |||
| 52 | result) | 50 | result) |
| 53 | 51 | ||
| 54 | (define (run-territory-page territories territory->text) | 52 | (define (run-territory-page territories territory->text) |
| 55 | (let ((title (G_ "Locale location"))) | 53 | (define result |
| 56 | (run-listbox-selection-page | 54 | (run-listbox-selection-page |
| 57 | #:title title | 55 | #:title (G_ "Locale location") |
| 58 | #:info-text (G_ "Choose a territory for this language.") | 56 | #:info-text (G_ "Choose a territory for this language.") |
| 59 | #:listbox-items territories | 57 | #:listbox-items territories |
| 60 | #:listbox-item->text territory->text | 58 | #:listbox-item->text territory->text |
| 61 | #:button-text (G_ "Back") | 59 | #:button-text (G_ "Back") |
| 62 | #:button-callback-procedure | 60 | #:button-callback-procedure |
| 63 | (lambda _ | 61 | (lambda _ |
| 64 | (abort-to-prompt 'installer-step 'abort))))) | 62 | (abort-to-prompt 'installer-step 'abort)))) |
| 63 | |||
| 64 | ;; Some languages, such as pt, cannot be installed early in the | ||
| 65 | ;; run-language-page step. Install them now, when we know the territory. | ||
| 66 | (setenv "LANGUAGE" (string-append (getenv "LANGUAGE") "_" result)) | ||
| 67 | |||
| 68 | result) | ||
| 65 | 69 | ||
| 66 | (define (run-codeset-page codesets) | 70 | (define (run-codeset-page codesets) |
| 67 | (let ((title (G_ "Locale codeset"))) | 71 | (let ((title (G_ "Locale codeset"))) |
