aboutsummaryrefslogtreecommitdiff
path: root/gnu/installer
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-04-17 11:07:21 +0200
committerLudovic Courtès <ludo@gnu.org>2019-04-17 11:53:54 +0200
commit7837a57241775fed221c9e03700af73263e222ed (patch)
treef446b83fe77d6d424e1af87d3617beb43f907e88 /gnu/installer
parent2d5867a213c4d23882e463d599eb236032086250 (diff)
downloadpatches-7837a57241775fed221c9e03700af73263e222ed.tar
patches-7837a57241775fed221c9e03700af73263e222ed.tar.gz
installer: Display language and territory names natively.
* gnu/installer.scm (installer-program): Add calls to 'bindtextdomain'. * gnu/installer/newt/locale.scm (run-locale-page) <language, territory>: Add calls to 'gettext'.
Diffstat (limited to 'gnu/installer')
-rw-r--r--gnu/installer/newt/locale.scm18
1 files changed, 13 insertions, 5 deletions
diff --git a/gnu/installer/newt/locale.scm b/gnu/installer/newt/locale.scm
index 01bcf76025..7108e2960b 100644
--- a/gnu/installer/newt/locale.scm
+++ b/gnu/installer/newt/locale.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -161,7 +162,13 @@ glibc locale string and return it."
(run-language-page
(sort-languages
(delete-duplicates (map locale-language supported-locales)))
- (cut language-code->language-name iso639-languages <>)))))
+ (lambda (language)
+ (let ((english (language-code->language-name iso639-languages
+ language)))
+ (setenv "LANGUAGE" language)
+ (let ((native (gettext english "iso_639-3")))
+ (unsetenv "LANGUAGE")
+ native)))))))
(installer-step
(id 'territory)
(compute
@@ -175,10 +182,11 @@ glibc locale string and return it."
;; supported by the previously selected language.
(run-territory-page
(delete-duplicates (map locale-territory locales))
- (lambda (territory-code)
- (if territory-code
- (territory-code->territory-name iso3166-territories
- territory-code)
+ (lambda (territory)
+ (if territory
+ (let ((english (territory-code->territory-name
+ iso3166-territories territory)))
+ (gettext english "iso_3166-1"))
(G_ "No location"))))))))
(installer-step
(id 'codeset)