[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/12: installer: Changed N_ to M_ since N_ is used for another purpose
From: |
John Darrington |
Subject: |
06/12: installer: Changed N_ to M_ since N_ is used for another purpose in guix/ui.scm |
Date: |
Sun, 15 Jan 2017 15:45:39 +0000 (UTC) |
jmd pushed a commit to branch wip-installer
in repository guix.
commit a9e7ab4e6b4232d38bc1ba19d58c700f698845b0
Author: John Darrington <address@hidden>
Date: Sat Jan 14 23:15:15 2017 +0100
installer: Changed N_ to M_ since N_ is used for another purpose in
guix/ui.scm
* gnu/system/installer/configure.scm,
gnu/system/installer/dialog.scm,
gnu/system/installer/disks.scm,
gnu/system/installer/filesystems.scm,
gnu/system/installer/format.scm,
gnu/system/installer/guixsd-installer.scm,
gnu/system/installer/hostname.scm,
gnu/system/installer/install.scm,
gnu/system/installer/key-map.scm,
gnu/system/installer/mount-point.scm,
gnu/system/installer/network.scm,
gnu/system/installer/passphrase.scm,
gnu/system/installer/ping.scm,
gnu/system/installer/role.scm,
gnu/system/installer/time-zone.scm,
gnu/system/installer/utils.scm,
gnu/system/installer/wireless.scm: N_ --> M_.
---
gnu/system/installer/configure.scm | 8 ++++++--
gnu/system/installer/dialog.scm | 7 ++++++-
gnu/system/installer/disks.scm | 7 ++++++-
gnu/system/installer/filesystems.scm | 23 ++++++++++++++---------
gnu/system/installer/format.scm | 8 ++++++--
gnu/system/installer/guixsd-installer.scm | 22 +++++++++++++---------
gnu/system/installer/hostname.scm | 10 ++++++++--
gnu/system/installer/install.scm | 11 ++++++++---
gnu/system/installer/key-map.scm | 8 +++++++-
gnu/system/installer/mount-point.scm | 16 +++++++++++-----
gnu/system/installer/network.scm | 12 +++++++++---
gnu/system/installer/passphrase.scm | 9 +++++++--
gnu/system/installer/ping.scm | 10 +++++++---
gnu/system/installer/role.scm | 12 ++++++++----
gnu/system/installer/time-zone.scm | 8 +++++++-
gnu/system/installer/utils.scm | 6 ------
gnu/system/installer/wireless.scm | 13 +++++++++----
17 files changed, 132 insertions(+), 58 deletions(-)
diff --git a/gnu/system/installer/configure.scm
b/gnu/system/installer/configure.scm
index c0f10dd..75cd15e 100644
--- a/gnu/system/installer/configure.scm
+++ b/gnu/system/installer/configure.scm
@@ -37,6 +37,10 @@
#:export (make-configure-page))
+(define-syntax M_
+ (syntax-rules ()
+ ((M_ str)
+ str)))
(define (make-configure-page parent title)
(let ((page (make-page (page-surface parent)
@@ -47,8 +51,8 @@
page))
-(define my-buttons `((save ,(N_ "_Save") #t)
- (cancel ,(N_ "Canc_el") #t)))
+(define my-buttons `((save ,(M_ "_Save") #t)
+ (cancel ,(M_ "Canc_el") #t)))
;; Kludge! For testing.
diff --git a/gnu/system/installer/dialog.scm b/gnu/system/installer/dialog.scm
index e6976a1..edc5926 100644
--- a/gnu/system/installer/dialog.scm
+++ b/gnu/system/installer/dialog.scm
@@ -24,6 +24,11 @@
#:export (make-dialog))
+(define-syntax M_
+ (syntax-rules ()
+ ((M_ str)
+ str)))
+
;; This module creates a single dialog with a simple message and an OK
;; button.
@@ -38,7 +43,7 @@
page))
-(define my-buttons `((ok ,(N_ "_OK") #t)))
+(define my-buttons `((ok ,(M_ "_OK") #t)))
(define (dialog-page-key-handler page ch)
(let ((nav (page-datum page 'navigation)))
diff --git a/gnu/system/installer/disks.scm b/gnu/system/installer/disks.scm
index 1f3092b..481a9bb 100644
--- a/gnu/system/installer/disks.scm
+++ b/gnu/system/installer/disks.scm
@@ -27,7 +27,12 @@
#:use-module (ice-9 format)
#:export (make-disk-page))
-(define my-buttons `((continue ,(N_ "_Continue") #t)))
+(define-syntax M_
+ (syntax-rules ()
+ ((M_ str)
+ str)))
+
+(define my-buttons `((continue ,(M_ "_Continue") #t)))
(define (make-disk-page parent title)
(make-page (page-surface parent)
diff --git a/gnu/system/installer/filesystems.scm
b/gnu/system/installer/filesystems.scm
index 0f65d44..4c323e5 100644
--- a/gnu/system/installer/filesystems.scm
+++ b/gnu/system/installer/filesystems.scm
@@ -45,6 +45,11 @@
#:export (make-filesystem-page))
+(define-syntax M_
+ (syntax-rules ()
+ ((M_ str)
+ str)))
+
;; File system spec declaration.
(define-record-type <file-system-spec>
(make-file-system-spec' mount-point label type uuid)
@@ -69,7 +74,7 @@
"Returns #f if the task is complete. Otherwise a string explaining why not."
(or
(and (not (find-mount-device "/" mount-points))
- (N_ "You must specify a mount point for the root (/)."))
+ (M_ "You must specify a mount point for the root (/)."))
(let ((non-absolute-list
@@ -84,17 +89,17 @@
(and (not (null? non-absolute-list))
(ngettext
(format #f
- (N_ "The mount point ~s is a relative path. All mount
points must be absolute.")
+ (M_ "The mount point ~s is a relative path. All mount
points must be absolute.")
(car non-absolute-list))
(format #f
- (N_ "The mount points ~s are relative paths. All mount
points must be absolute.")
+ (M_ "The mount points ~s are relative paths. All mount
points must be absolute.")
non-absolute-list)
(length non-absolute-list))))
(and (< (size-of-partition (find-mount-device (%store-directory)
mount-points))
minimum-store-size)
(format #f
- (N_ "The filesystem for ~a requires at least ~aGB.")
+ (M_ "The filesystem for ~a requires at least ~aGB.")
(%store-directory) (/ minimum-store-size 1000)))
(let loop ((ll mount-points)
@@ -104,7 +109,7 @@
(((_ . (? file-system-spec? fss)) . rest)
(if (member fss ac)
(format #f
- (N_ "You have specified the mount point ~a more than
once.")
+ (M_ "You have specified the mount point ~a more than
once.")
(file-system-spec-mount-point fss))
(loop rest (cons fss ac))))))
@@ -120,9 +125,9 @@
(if (null? partitions-without-filesystems)
#f
(ngettext
- (format #f (N_ "The filesystem type for partition ~a is not valid.")
+ (format #f (M_ "The filesystem type for partition ~a is not valid.")
(car partitions-without-filesystems))
- (format #f (N_ "The filesystem type for partitions ~a are not
valid.")
+ (format #f (M_ "The filesystem type for partitions ~a are not
valid.")
partitions-without-filesystems)
(length partitions-without-filesystems))))))
@@ -134,8 +139,8 @@
filesystem-page-key-handler))
-(define my-buttons `((continue ,(N_ "_Continue") #t)
- (cancel ,(N_ "Canc_el") #t)))
+(define my-buttons `((continue ,(M_ "_Continue") #t)
+ (cancel ,(M_ "Canc_el") #t)))
diff --git a/gnu/system/installer/format.scm b/gnu/system/installer/format.scm
index 73ab172..39103c4 100644
--- a/gnu/system/installer/format.scm
+++ b/gnu/system/installer/format.scm
@@ -30,6 +30,10 @@
#:export (filesystems-are-current?)
#:export (make-format-page))
+(define-syntax M_
+ (syntax-rules ()
+ ((M_ str)
+ str)))
(define (device-fs-uuid dev)
"Retrieve the UUID of the filesystem on DEV, where DEV is the name of the
@@ -60,8 +64,8 @@ match those uuids read from the respective partitions"
page))
-(define my-buttons `((format ,(N_ "_Format") #t)
- (cancel ,(N_ "Canc_el") #t)))
+(define my-buttons `((format ,(M_ "_Format") #t)
+ (cancel ,(M_ "Canc_el") #t)))
(define (format-page-key-handler page ch)
diff --git a/gnu/system/installer/guixsd-installer.scm
b/gnu/system/installer/guixsd-installer.scm
index 8e8c70f..7c79d14 100644
--- a/gnu/system/installer/guixsd-installer.scm
+++ b/gnu/system/installer/guixsd-installer.scm
@@ -47,6 +47,10 @@
(srfi srfi-1)
(srfi srfi-9))
+(define-syntax M_
+ (syntax-rules ()
+ ((M_ str)
+ str)))
(define-record-type <task>
(make-task title dependencies complete init)
@@ -56,15 +60,15 @@
(complete task-complete?)
(init task-init))
-(define partition-menu-title (N_ "Partition the disk(s)"))
-(define filesystem-menu-title (N_ "Allocate disk partitions"))
-(define format-menu-title (N_ "Format the partitions"))
-(define network-menu-title (N_ "Set up the network"))
-(define timezone-menu-title (N_ "Set the time zone"))
-(define hostname-menu-title (N_ "Set the host name"))
-(define installation-menu-title (N_ "Install the system"))
-(define role-menu-title (N_ "Select a role for the system"))
-(define generate-menu-title (N_ "Generate the configuration"))
+(define partition-menu-title (M_ "Partition the disk(s)"))
+(define filesystem-menu-title (M_ "Allocate disk partitions"))
+(define format-menu-title (M_ "Format the partitions"))
+(define network-menu-title (M_ "Set up the network"))
+(define timezone-menu-title (M_ "Set the time zone"))
+(define hostname-menu-title (M_ "Set the host name"))
+(define installation-menu-title (M_ "Install the system"))
+(define role-menu-title (M_ "Select a role for the system"))
+(define generate-menu-title (M_ "Generate the configuration"))
(define (size-of-largest-disk)
(fold (lambda (disk prev) (max (disk-size disk) prev))
diff --git a/gnu/system/installer/hostname.scm
b/gnu/system/installer/hostname.scm
index daafa7b..71aeb1e 100644
--- a/gnu/system/installer/hostname.scm
+++ b/gnu/system/installer/hostname.scm
@@ -30,7 +30,13 @@
(define max-length ((const 63)))
-(define my-fields `((name ,(N_ "Host Name") ,max-length)))
+(define-syntax M_
+ (syntax-rules ()
+ ((M_ str)
+ str)))
+
+
+(define my-fields `((name ,(M_ "Host Name") ,max-length)))
(define (valid-hostname? name)
"Return #t iff NAME is a valid hostname as defined by RFC 1034"
@@ -109,7 +115,7 @@
(form-enter form ch)))
#f))
-(define my-buttons `((cancel ,(N_ "Cancel") #f)))
+(define my-buttons `((cancel ,(M_ "Cancel") #f)))
(define (host-name-init p)
(let* ((s (page-surface p))
diff --git a/gnu/system/installer/install.scm b/gnu/system/installer/install.scm
index 3c04869..c7fa646 100644
--- a/gnu/system/installer/install.scm
+++ b/gnu/system/installer/install.scm
@@ -32,6 +32,11 @@
#:export (make-install-page))
+(define-syntax M_
+ (syntax-rules ()
+ ((M_ str)
+ str)))
+
(define (make-install-page parent title)
(let ((page (make-page (page-surface parent)
@@ -42,9 +47,9 @@
page))
-(define my-buttons `((continue ,(N_ "_Continue") #t)
- (reboot ,(N_ "_Reboot") #t)
- (cancel ,(N_ "Canc_el") #t)))
+(define my-buttons `((continue ,(M_ "_Continue") #t)
+ (reboot ,(M_ "_Reboot") #t)
+ (cancel ,(M_ "Canc_el") #t)))
(define (install-page-key-handler page ch)
(let ((nav (page-datum page 'navigation))
diff --git a/gnu/system/installer/key-map.scm b/gnu/system/installer/key-map.scm
index c964f68..636d57f 100644
--- a/gnu/system/installer/key-map.scm
+++ b/gnu/system/installer/key-map.scm
@@ -26,6 +26,12 @@
#:export (make-file-browser))
+(define-syntax M_
+ (syntax-rules ()
+ ((M_ str)
+ str)))
+
+
(define* (make-file-browser parent directory #:optional (exit-point #f))
(let ((page (make-page (page-surface parent)
(gettext "File Browser")
@@ -39,7 +45,7 @@
page))
-(define my-buttons `((cancel ,(N_ "Canc_el") #t)))
+(define my-buttons `((cancel ,(M_ "Canc_el") #t)))
(define (file-browser-page-key-handler page ch)
(let ((nav (page-datum page 'navigation))
diff --git a/gnu/system/installer/mount-point.scm
b/gnu/system/installer/mount-point.scm
index b5b653e..afa3b60 100644
--- a/gnu/system/installer/mount-point.scm
+++ b/gnu/system/installer/mount-point.scm
@@ -29,9 +29,15 @@
#:export (mount-point-refresh)
#:export (mount-point-page-key-handler))
-(define my-fields `((mount-point ,(N_ "Mount Point") 40)
- (fs-type ,(N_ "File System Type") 10)
- (label ,(N_ "Label") 16)))
+
+(define-syntax M_
+ (syntax-rules ()
+ ((M_ str)
+ str)))
+
+(define my-fields `((mount-point ,(M_ "Mount Point") 40)
+ (fs-type ,(M_ "File System Type") 10)
+ (label ,(M_ "Label") 16)))
(define (mount-point-refresh page)
(when (not (page-initialised? page))
@@ -81,8 +87,8 @@
(form-enter form ch))
#f)
-(define my-buttons `((continue ,(N_ "Continue") #f)
- (cancel ,(N_ "Cancel") #f)))
+(define my-buttons `((continue ,(M_ "Continue") #f)
+ (cancel ,(M_ "Cancel") #f)))
(define (mount-point-page-init p)
(let* ((s (page-surface p))
diff --git a/gnu/system/installer/network.scm b/gnu/system/installer/network.scm
index 15cdb8b..655988c 100644
--- a/gnu/system/installer/network.scm
+++ b/gnu/system/installer/network.scm
@@ -33,6 +33,12 @@
#:export (make-network-page))
+(define-syntax M_
+ (syntax-rules ()
+ ((M_ str)
+ str)))
+
+
(define (make-network-page parent title)
(make-page (page-surface parent)
title
@@ -79,8 +85,8 @@
(substring x (1+ idx)))))))
"Device"))))))
-(define my-buttons `((continue ,(N_ "_Continue") #t)
- (test ,(N_ "_Test") #t)))
+(define my-buttons `((continue ,(M_ "_Continue") #t)
+ (test ,(M_ "_Test") #t)))
(define (network-page-key-handler page ch)
(let ((menu (page-datum page 'menu))
@@ -115,7 +121,7 @@
((and (select-key? ch)
(eq? 'wireless (assq-ref (menu-get-current-item menu) 'class)))
- (let ((next (make-wireless-page page (N_ "Wireless interface setup")
+ (let ((next (make-wireless-page page (M_ "Wireless interface setup")
(assq-ref (menu-get-current-item menu)
'name))))
(page-enter next)))
diff --git a/gnu/system/installer/passphrase.scm
b/gnu/system/installer/passphrase.scm
index cd62a12..732d737 100644
--- a/gnu/system/installer/passphrase.scm
+++ b/gnu/system/installer/passphrase.scm
@@ -30,7 +30,12 @@
(define max-length ((const 60)))
-(define my-fields `((passphrase ,(N_ "Passphrase") ,max-length)))
+(define-syntax M_
+ (syntax-rules ()
+ ((M_ str)
+ str)))
+
+(define my-fields `((passphrase ,(M_ "Passphrase") ,max-length)))
(define (make-passphrase-page parent title ifce network)
(let ((page
@@ -92,7 +97,7 @@
(form-enter form ch)))
#f))
-(define my-buttons `((cancel ,(N_ "Cancel") #f)))
+(define my-buttons `((cancel ,(M_ "Cancel") #f)))
(define (passphrase-init p)
(let* ((s (page-surface p))
diff --git a/gnu/system/installer/ping.scm b/gnu/system/installer/ping.scm
index 12301a5..3e04b01 100644
--- a/gnu/system/installer/ping.scm
+++ b/gnu/system/installer/ping.scm
@@ -31,6 +31,10 @@
#:export (ping-page-refresh)
#:export (ping-page-key-handler))
+(define-syntax M_
+ (syntax-rules ()
+ ((M_ str)
+ str)))
(define (substitute-is-reachable?)
"Return #t if at least one substitute URL responds to pings"
@@ -45,9 +49,9 @@
(uri-host (string->uri x))))))
#f %default-substitute-urls))))))
-(define my-buttons `((test ,(N_ "_Test") #t)
- (continue ,(N_ "_Continue") #t)
- (cancel ,(N_ "Canc_el") #t)))
+(define my-buttons `((test ,(M_ "_Test") #t)
+ (continue ,(M_ "_Continue") #t)
+ (cancel ,(M_ "Canc_el") #t)))
(define (ping-page-key-handler page ch)
(let ((nav (page-datum page 'navigation))
diff --git a/gnu/system/installer/role.scm b/gnu/system/installer/role.scm
index 6f99762..aa146e4 100644
--- a/gnu/system/installer/role.scm
+++ b/gnu/system/installer/role.scm
@@ -34,6 +34,10 @@
#:export (role?)
#:export (make-role-page))
+(define-syntax M_
+ (syntax-rules ()
+ ((M_ str)
+ str)))
(define-record-type <role>
(make-role description packages package-modules services service-modules)
@@ -53,7 +57,7 @@
role-page-key-handler))
-(define my-buttons `((cancel ,(N_ "Canc_el") #t)))
+(define my-buttons `((cancel ,(M_ "Canc_el") #t)))
(define (role-page-key-handler page ch)
(let ((menu (page-datum page 'menu))
@@ -108,19 +112,19 @@
(menu-refresh (page-datum page 'menu)))
-(define roles `(,(make-role (N_ "Headless server")
+(define roles `(,(make-role (M_ "Headless server")
`(tcpdump)
`(admin)
`((dhcp-client-service)
(lsh-service #:port-number 2222)
%base-services)
`(networking ssh))
- ,(make-role (N_ "Lightweight desktop or laptop")
+ ,(make-role (M_ "Lightweight desktop or laptop")
`(ratpoison i3-wm xmonad nss-certs)
`(wm ratpoison certs)
`(%desktop-services)
`(desktop))
- ,(make-role (N_ "Heavy duty workstation")
+ ,(make-role (M_ "Heavy duty workstation")
`(nss-certs gvfs)
`(certs gnome)
`((gnome-desktop-service)
diff --git a/gnu/system/installer/time-zone.scm
b/gnu/system/installer/time-zone.scm
index a6130c9..727dbf5 100644
--- a/gnu/system/installer/time-zone.scm
+++ b/gnu/system/installer/time-zone.scm
@@ -26,6 +26,12 @@
#:export (make-tz-browser))
+(define-syntax M_
+ (syntax-rules ()
+ ((M_ str)
+ str)))
+
+
(define* (make-tz-browser parent directory #:optional (exit-point #f))
(let ((page (make-page (page-surface parent)
(gettext "Time Zone")
@@ -39,7 +45,7 @@
page))
-(define my-buttons `((cancel ,(N_ "Canc_el") #t)))
+(define my-buttons `((cancel ,(M_ "Canc_el") #t)))
(define (time-zone-page-key-handler page ch)
(let ((nav (page-datum page 'navigation))
diff --git a/gnu/system/installer/utils.scm b/gnu/system/installer/utils.scm
index 2d417af..68cf08c 100644
--- a/gnu/system/installer/utils.scm
+++ b/gnu/system/installer/utils.scm
@@ -41,8 +41,6 @@
window-pipe
pipe-cmd
- N_
-
select-key?))
(use-modules (ice-9 popen)
@@ -54,10 +52,6 @@
(ncurses form)
(ncurses curses))
-(define-syntax N_
- (syntax-rules ()
- ((N_ str)
- str)))
(define (make-window-port win)
"Return a port which writes to the curses window WIN"
diff --git a/gnu/system/installer/wireless.scm
b/gnu/system/installer/wireless.scm
index cf3ba49..0c34c53 100644
--- a/gnu/system/installer/wireless.scm
+++ b/gnu/system/installer/wireless.scm
@@ -33,6 +33,11 @@
#:export (wireless-connect)
#:export (make-wireless-page))
+(define-syntax M_
+ (syntax-rules ()
+ ((M_ str)
+ str)))
+
(define (make-wireless-page parent title interface)
(let ((page (make-page (page-surface parent)
@@ -45,7 +50,7 @@
page))
-(define my-buttons `((cancel ,(N_ "Canc_el") #t)))
+(define my-buttons `((cancel ,(M_ "Canc_el") #t)))
(define (wireless-page-key-handler page ch)
(let ((nav (page-datum page 'navigation))
@@ -76,7 +81,7 @@
((select-key? ch)
(let ((next (make-passphrase-page
page
- (N_ "Passphrase entry")
+ (M_ "Passphrase entry")
(page-datum page 'ifce)
(assq-ref (menu-get-current-item menu) 'essid))))
(page-enter next))))
@@ -132,8 +137,8 @@
(lambda (d _)
(format #f "~30a ~a" (assq-ref d 'essid)
(if (assq-ref d 'encryption)
- (N_ "Encr.")
- (N_ "Clear")))))))
+ (M_ "Encr.")
+ (M_ "Clear")))))))
(addstr* text-window (format #f
(gettext
- branch wip-installer updated (3673cd8 -> ac6599d), John Darrington, 2017/01/15
- 08/12: installer: Correct bug detecting a wireless interface., John Darrington, 2017/01/15
- 01/12: installer: Add callback parameter for forms., John Darrington, 2017/01/15
- 04/12: installer: Add the notion of uuids to prospective filesystems., John Darrington, 2017/01/15
- 05/12: installer: Add a predicate to ensure the partitions have been formatted., John Darrington, 2017/01/15
- 09/12: installer: Exit the format page after all partitions are successfully formatted., John Darrington, 2017/01/15
- 11/12: installer: Replace one usage of car with match., John Darrington, 2017/01/15
- 10/12: installer: Do not perform tasks more than once., John Darrington, 2017/01/15
- 12/12: installer: Correct bug where the timezone page returned to the wrong page., John Darrington, 2017/01/15
- 02/12: installer: Remove mkfs capability from mount points page., John Darrington, 2017/01/15
- 06/12: installer: Changed N_ to M_ since N_ is used for another purpose in guix/ui.scm,
John Darrington <=
- 07/12: installer: Whitespace changes only, John Darrington, 2017/01/15
- 03/12: installer: Add a dedicated make to format filesystems., John Darrington, 2017/01/15