guix-commits
[Top][All Lists]
Advanced

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

04/06: installer: Translate keyboard layout names.


From: guix-commits
Subject: 04/06: installer: Translate keyboard layout names.
Date: Wed, 17 Apr 2019 09:32:54 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit feaa83a377966b6cec982f0bbaba1ea15c28d52e
Author: Ludovic Court├Ęs <address@hidden>
Date:   Wed Apr 17 15:11:21 2019 +0200

    installer: Translate keyboard layout names.
    
    * gnu/installer.scm (installer-program)[installer-builder]: Call
    'bindtextdomain' for "xkeyboard-config".
    * gnu/installer/newt/keymap.scm (run-keymap-page): Add calls to
    'gettext'.
---
 gnu/installer.scm             |  4 ++++
 gnu/installer/newt/keymap.scm | 10 ++++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/gnu/installer.scm b/gnu/installer.scm
index 5baead8..881c40e 100644
--- a/gnu/installer.scm
+++ b/gnu/installer.scm
@@ -353,6 +353,10 @@ selected keymap."
             (bindtextdomain "iso_3166-1"          ;territories
                             #+(file-append iso-codes "/share/locale"))
 
+            ;; Likewise for XKB keyboard layout names.
+            (bindtextdomain "xkeyboard-config"
+                            #+(file-append xkeyboard-config "/share/locale"))
+
             (let* ((current-installer newt-installer)
                    (steps (#$steps current-installer)))
               ((installer-init current-installer))
diff --git a/gnu/installer/newt/keymap.scm b/gnu/installer/newt/keymap.scm
index 948b547..623bfe0 100644
--- a/gnu/installer/newt/keymap.scm
+++ b/gnu/installer/newt/keymap.scm
@@ -97,7 +97,8 @@ names of the selected keyboard layout and variant."
          (run-layout-page
           (sort-layouts layouts)
           (lambda (layout)
-            (x11-keymap-layout-description layout))))))
+            (gettext (x11-keymap-layout-description layout)
+                     "xkeyboard-config"))))))
      ;; Propose the user to select a variant among those supported by the
      ;; previously selected layout.
      (installer-step
@@ -111,15 +112,16 @@ names of the selected keyboard layout and variant."
                 (run-variant-page
                  (sort-variants variants)
                  (lambda (variant)
-                   (x11-keymap-variant-description
-                    variant))))))))))
+                   (gettext (x11-keymap-variant-description variant)
+                            "xkeyboard-config"))))))))))
 
   (define (format-result result)
     (let ((layout (x11-keymap-layout-name
                    (result-step result 'layout)))
           (variant (and=> (result-step result 'variant)
                           (lambda (variant)
-                            (x11-keymap-variant-name variant)))))
+                            (gettext (x11-keymap-variant-name variant)
+                                     "xkeyboard-config")))))
       (list layout (or variant ""))))
   (format-result
    (run-installer-steps #:steps keymap-steps)))



reply via email to

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