guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: installer: locale: Set English as the default language.


From: guix-commits
Subject: 02/02: installer: locale: Set English as the default language.
Date: Wed, 5 Dec 2018 05:31:23 -0500 (EST)

mothacehe pushed a commit to branch wip-newt-installer
in repository guix.

commit c8324de2f5fa07729e33a7e16aabc88072ea99fe
Author: Mathieu Othacehe <address@hidden>
Date:   Wed Dec 5 19:29:54 2018 +0900

    installer: locale: Set English as the default language.
    
    * gnu/installer/newt/locale.scm (sort-languages): New procedure ...
    (run-locale-page)[locale-steps]: ... used here to make english the default
    language.
---
 gnu/installer/newt/locale.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/gnu/installer/newt/locale.scm b/gnu/installer/newt/locale.scm
index 0389416..4de78f3 100644
--- a/gnu/installer/newt/locale.scm
+++ b/gnu/installer/newt/locale.scm
@@ -146,6 +146,14 @@ glibc locale string and return it."
       ((locale)
        (locale->locale-string locale))))
 
+  (define (sort-languages languages)
+    "Extract some languages from LANGUAGES list and place them ahead."
+    (let* ((first-languages '("en"))
+           (other-languages (lset-difference equal?
+                                             languages
+                                             first-languages)))
+      `(,@first-languages ,@other-languages)))
+
   (define locale-steps
     (list
      (installer-step
@@ -153,7 +161,8 @@ glibc locale string and return it."
       (compute
        (lambda _
          (run-language-page
-          (delete-duplicates (map locale-language supported-locales))
+          (sort-languages
+           (delete-duplicates (map locale-language supported-locales)))
           (cut language-code->language-name iso639-languages <>)))))
      (installer-step
       (id 'territory)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]