summaryrefslogtreecommitdiff
path: root/gnu/installer
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-04-17 10:34:02 +0200
committerLudovic Courtès <ludo@gnu.org>2019-04-17 11:53:54 +0200
commit2d5867a213c4d23882e463d599eb236032086250 (patch)
tree449dc829fa5af0c92d9b9a2006a26ce4dad9cb3d /gnu/installer
parent15dca289b8bd1418c5f5f3b545cb497497cad02e (diff)
installer: Change language as soon as it has been chosen.
Previously we'd call 'setlocale' only after the complete 'locale' step had finished. * gnu/installer/newt/locale.scm (run-language-page): Set the 'LANGUAGE' environment variable before returning.
Diffstat (limited to 'gnu/installer')
-rw-r--r--gnu/installer/newt/locale.scm12
1 files changed, 9 insertions, 3 deletions
diff --git a/gnu/installer/newt/locale.scm b/gnu/installer/newt/locale.scm
index b819d06691..01bcf76025 100644
--- a/gnu/installer/newt/locale.scm
+++ b/gnu/installer/newt/locale.scm
@@ -30,9 +30,9 @@
#:export (run-locale-page))
(define (run-language-page languages language->text)
- (let ((title (G_ "Locale language")))
+ (define result
(run-listbox-selection-page
- #:title title
+ #:title (G_ "Locale language")
#:info-text (G_ "Choose the language to use for the \
installation process and for the installed system.")
#:info-textbox-width 70
@@ -44,7 +44,13 @@ installation process and for the installed system.")
(lambda _
(raise
(condition
- (&installer-step-abort)))))))
+ (&installer-step-abort))))))
+
+ ;; Immediately install the chosen language so that the territory page that
+ ;; comes after (optionally) is displayed in the chosen language.
+ (setenv "LANGUAGE" result)
+
+ result)
(define (run-territory-page territories territory->text)
(let ((title (G_ "Locale location")))