[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/18: installer: New file i18n.scm.
From: |
John Darrington |
Subject: |
03/18: installer: New file i18n.scm. |
Date: |
Thu, 2 Feb 2017 18:13:04 +0000 (UTC) |
jmd pushed a commit to branch wip-installer
in repository guix.
commit 5ed7922c5d18d2f34c4b02a4d8df10d284614565
Author: John Darrington <address@hidden>
Date: Mon Jan 30 08:02:28 2017 +0100
installer: New file i18n.scm.
* gnu/system/installer/i18n.scm: New file.
* 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/wireless.scm: Include it.
---
gnu/system/installer/configure.scm | 5 +----
gnu/system/installer/dialog.scm | 5 +----
gnu/system/installer/disks.scm | 5 +----
gnu/system/installer/filesystems.scm | 5 +----
gnu/system/installer/format.scm | 5 +----
gnu/system/installer/guixsd-installer.scm | 5 +----
gnu/system/installer/hostname.scm | 8 ++------
gnu/system/installer/i18n.scm | 4 ++++
gnu/system/installer/install.scm | 6 +-----
gnu/system/installer/key-map.scm | 6 +-----
gnu/system/installer/mount-point.scm | 6 +-----
gnu/system/installer/network.scm | 6 +-----
gnu/system/installer/passphrase.scm | 7 ++-----
gnu/system/installer/ping.scm | 5 +----
gnu/system/installer/role.scm | 5 +----
gnu/system/installer/time-zone.scm | 6 +-----
gnu/system/installer/wireless.scm | 6 +-----
17 files changed, 22 insertions(+), 73 deletions(-)
diff --git a/gnu/system/installer/configure.scm
b/gnu/system/installer/configure.scm
index 86eddd2..5f68412 100644
--- a/gnu/system/installer/configure.scm
+++ b/gnu/system/installer/configure.scm
@@ -37,10 +37,7 @@
#:export (make-configure-page))
-(define-syntax M_
- (syntax-rules ()
- ((M_ str)
- str)))
+(include "i18n.scm")
(define (make-configure-page parent title)
(let ((page (make-page (page-surface parent)
diff --git a/gnu/system/installer/dialog.scm b/gnu/system/installer/dialog.scm
index 1c0ad8b..47fbba1 100644
--- a/gnu/system/installer/dialog.scm
+++ b/gnu/system/installer/dialog.scm
@@ -24,10 +24,7 @@
#:export (make-dialog))
-(define-syntax M_
- (syntax-rules ()
- ((M_ str)
- str)))
+(include "i18n.scm")
;; This module creates a single dialog with a simple message and an OK
;; button.
diff --git a/gnu/system/installer/disks.scm b/gnu/system/installer/disks.scm
index cd4587f..f28ae18 100644
--- a/gnu/system/installer/disks.scm
+++ b/gnu/system/installer/disks.scm
@@ -27,10 +27,7 @@
#:use-module (ice-9 format)
#:export (make-disk-page))
-(define-syntax M_
- (syntax-rules ()
- ((M_ str)
- str)))
+(include "i18n.scm")
(define my-buttons `((continue ,(M_ "_Continue") #t)))
diff --git a/gnu/system/installer/filesystems.scm
b/gnu/system/installer/filesystems.scm
index bc20f28..2ec7d3e 100644
--- a/gnu/system/installer/filesystems.scm
+++ b/gnu/system/installer/filesystems.scm
@@ -47,10 +47,7 @@
#:export (make-filesystem-page))
-(define-syntax M_
- (syntax-rules ()
- ((M_ str)
- str)))
+(include "i18n.scm")
;; File system spec declaration.
(define-record-type <file-system-spec>
diff --git a/gnu/system/installer/format.scm b/gnu/system/installer/format.scm
index e852d4e..7805fc8 100644
--- a/gnu/system/installer/format.scm
+++ b/gnu/system/installer/format.scm
@@ -32,10 +32,7 @@
#:export (filesystems-are-current?)
#:export (make-format-page))
-(define-syntax M_
- (syntax-rules ()
- ((M_ str)
- str)))
+(include "i18n.scm")
(define (device-fs-uuid dev)
"Retrieve the UUID of the filesystem on DEV, where DEV is the name of the
diff --git a/gnu/system/installer/guixsd-installer.scm
b/gnu/system/installer/guixsd-installer.scm
index 57ee03f..0aa5582 100644
--- a/gnu/system/installer/guixsd-installer.scm
+++ b/gnu/system/installer/guixsd-installer.scm
@@ -47,10 +47,7 @@
(srfi srfi-1)
(srfi srfi-9))
-(define-syntax M_
- (syntax-rules ()
- ((M_ str)
- str)))
+(include "i18n.scm")
(define-record-type <task>
(make-task title dependencies complete init)
diff --git a/gnu/system/installer/hostname.scm
b/gnu/system/installer/hostname.scm
index 0d03452..a319d5f 100644
--- a/gnu/system/installer/hostname.scm
+++ b/gnu/system/installer/hostname.scm
@@ -28,13 +28,9 @@
#:export (valid-hostname?)
#:export (make-host-name-page))
-(define max-length ((const 63)))
-
-(define-syntax M_
- (syntax-rules ()
- ((M_ str)
- str)))
+(include "i18n.scm")
+(define max-length ((const 63)))
(define my-fields `((name ,(M_ "Host Name") ,max-length)))
diff --git a/gnu/system/installer/i18n.scm b/gnu/system/installer/i18n.scm
new file mode 100644
index 0000000..fb6f22d
--- /dev/null
+++ b/gnu/system/installer/i18n.scm
@@ -0,0 +1,4 @@
+(define-syntax M_
+ (syntax-rules ()
+ ((M_ str)
+ str)))
diff --git a/gnu/system/installer/install.scm b/gnu/system/installer/install.scm
index 1811701..0d966ea 100644
--- a/gnu/system/installer/install.scm
+++ b/gnu/system/installer/install.scm
@@ -33,11 +33,7 @@
#:export (make-install-page))
-(define-syntax M_
- (syntax-rules ()
- ((M_ str)
- str)))
-
+(include "i18n.scm")
(define (make-install-page parent title)
(let ((page (make-page (page-surface parent)
diff --git a/gnu/system/installer/key-map.scm b/gnu/system/installer/key-map.scm
index 59ef778..4ad975f 100644
--- a/gnu/system/installer/key-map.scm
+++ b/gnu/system/installer/key-map.scm
@@ -26,11 +26,7 @@
#:export (make-file-browser))
-(define-syntax M_
- (syntax-rules ()
- ((M_ str)
- str)))
-
+(include "i18n.scm")
(define* (make-file-browser parent directory)
(let ((page (make-page (page-surface parent)
diff --git a/gnu/system/installer/mount-point.scm
b/gnu/system/installer/mount-point.scm
index b4b83aa..f288f01 100644
--- a/gnu/system/installer/mount-point.scm
+++ b/gnu/system/installer/mount-point.scm
@@ -29,11 +29,7 @@
#:export (mount-point-refresh)
#:export (mount-point-page-key-handler))
-
-(define-syntax M_
- (syntax-rules ()
- ((M_ str)
- str)))
+(include "i18n.scm")
(define (my-fields) `((mount-point ,(M_ "Mount Point") 40)
(fs-type ,(M_ "File System Type")
diff --git a/gnu/system/installer/network.scm b/gnu/system/installer/network.scm
index 0ee9fc6..2ddaaed 100644
--- a/gnu/system/installer/network.scm
+++ b/gnu/system/installer/network.scm
@@ -33,11 +33,7 @@
#:export (make-network-page))
-(define-syntax M_
- (syntax-rules ()
- ((M_ str)
- str)))
-
+(include "i18n.scm")
(define (make-network-page parent title)
(make-page (page-surface parent)
diff --git a/gnu/system/installer/passphrase.scm
b/gnu/system/installer/passphrase.scm
index b5b5170..e81b649 100644
--- a/gnu/system/installer/passphrase.scm
+++ b/gnu/system/installer/passphrase.scm
@@ -28,12 +28,9 @@
#:export (make-passphrase-page))
-(define max-length ((const 60)))
+(include "i18n.scm")
-(define-syntax M_
- (syntax-rules ()
- ((M_ str)
- str)))
+(define max-length ((const 60)))
(define my-fields `((passphrase ,(M_ "Passphrase") ,max-length)))
diff --git a/gnu/system/installer/ping.scm b/gnu/system/installer/ping.scm
index 7fd82a5..0620517 100644
--- a/gnu/system/installer/ping.scm
+++ b/gnu/system/installer/ping.scm
@@ -31,10 +31,7 @@
#:export (ping-page-refresh)
#:export (ping-page-key-handler))
-(define-syntax M_
- (syntax-rules ()
- ((M_ str)
- str)))
+(include "i18n.scm")
(define (substitute-is-reachable?)
"Return #t if at least one substitute URL responds to pings"
diff --git a/gnu/system/installer/role.scm b/gnu/system/installer/role.scm
index 2b74de4..7684b10 100644
--- a/gnu/system/installer/role.scm
+++ b/gnu/system/installer/role.scm
@@ -34,10 +34,7 @@
#:export (role?)
#:export (make-role-page))
-(define-syntax M_
- (syntax-rules ()
- ((M_ str)
- str)))
+(include "i18n.scm")
(define-record-type <role>
(make-role description packages package-modules services service-modules)
diff --git a/gnu/system/installer/time-zone.scm
b/gnu/system/installer/time-zone.scm
index 95e655b..5c27bed 100644
--- a/gnu/system/installer/time-zone.scm
+++ b/gnu/system/installer/time-zone.scm
@@ -26,11 +26,7 @@
#:export (make-tz-browser))
-(define-syntax M_
- (syntax-rules ()
- ((M_ str)
- str)))
-
+(include "i18n.scm")
(define (make-tz-browser parent directory)
(let ((page (make-page (page-surface parent)
diff --git a/gnu/system/installer/wireless.scm
b/gnu/system/installer/wireless.scm
index 23f4653..e195d1d 100644
--- a/gnu/system/installer/wireless.scm
+++ b/gnu/system/installer/wireless.scm
@@ -33,11 +33,7 @@
#:export (wireless-connect)
#:export (make-wireless-page))
-(define-syntax M_
- (syntax-rules ()
- ((M_ str)
- str)))
-
+(include "i18n.scm")
(define (make-wireless-page parent title interface)
(let ((page (make-page (page-surface parent)
- 05/18: installer: Main page: Redisplay translatable strings upon refresh., (continued)
- 05/18: installer: Main page: Redisplay translatable strings upon refresh., John Darrington, 2017/02/02
- 09/18: installer: Correct placement of gettext call., John Darrington, 2017/02/02
- 08/18: installer: Replace 'file-browser' with 'key-map'., John Darrington, 2017/02/02
- 06/18: installer: Use _ instead of M_ for host-name-refresh., John Darrington, 2017/02/02
- 14/18: gurses: Cache the windows of buttons., John Darrington, 2017/02/02
- 16/18: installer: New procedure key-value-slurp., John Darrington, 2017/02/02
- 18/18: installer: Fix bug when changing languages., John Darrington, 2017/02/02
- 07/18: installer: New page to select language., John Darrington, 2017/02/02
- 10/18: installer: Fix i18n in dialogs., John Darrington, 2017/02/02
- 17/18: installer: Provide verbose description of locale., John Darrington, 2017/02/02
- 03/18: installer: New file i18n.scm.,
John Darrington <=
- 11/18: installer: New convenience procedures., John Darrington, 2017/02/02
- 13/18: gurses: Avoid one use of car/cdr., John Darrington, 2017/02/02
- 15/18: gurses: Use match instead of car., John Darrington, 2017/02/02
- 12/18: installer: Improve i18n in ping page., John Darrington, 2017/02/02