[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/18: installer: Main page: Redisplay translatable strings upon refresh
From: |
John Darrington |
Subject: |
05/18: installer: Main page: Redisplay translatable strings upon refresh. |
Date: |
Thu, 2 Feb 2017 18:13:04 +0000 (UTC) |
jmd pushed a commit to branch wip-installer
in repository guix.
commit 5408c2f26f00b26df23b5f3f5c2475b1e83de6ad
Author: John Darrington <address@hidden>
Date: Mon Jan 30 11:57:24 2017 +0100
installer: Main page: Redisplay translatable strings upon refresh.
* gnu/system/installer/guixsd-installer.scm (main-page-refresh): Add
display of translatable strings. (main-page-init): Remove display of
translatable strings.
---
gnu/system/installer/guixsd-installer.scm | 50 ++++++++++++++++++-----------
1 file changed, 32 insertions(+), 18 deletions(-)
diff --git a/gnu/system/installer/guixsd-installer.scm
b/gnu/system/installer/guixsd-installer.scm
index 0aa5582..3674944 100644
--- a/gnu/system/installer/guixsd-installer.scm
+++ b/gnu/system/installer/guixsd-installer.scm
@@ -229,18 +229,38 @@ tail of the list."
(main-menu (make-menu main-options
#:disp-proc (lambda (datum row)
- (format #f "~a"
- (task-title (cdr
datum)))))))
+ (gettext (task-title (cdr
datum)))))))
- (addstr* text-window (format #f
- (gettext
- "To start the complete installation process, choose ~s. Alternatively,
you may run each step individually for a slower, more controlled experience.")
installation-menu-title))
(page-set-wwin! page frame)
(page-set-datum! page 'menu main-menu)
+ (page-set-datum! page 'text-window text-window)
+ (page-set-datum! page 'background background)
(menu-post main-menu win)
- (push-cursor (page-cursor-visibility page))
+ (push-cursor (page-cursor-visibility page))))
+
+
+(define (main-page-refresh page)
+ (when (not (page-initialised? page))
+ (main-page-init page)
+ (page-set-initialised! page #t))
+
+ (let ((text-window (page-datum page 'text-window))
+ (menu (page-datum page 'menu))
+ (background (page-datum page 'background)))
+
+ (clear background)
+
+ (addstr*
+ text-window
+ (format
+ #f
+ (gettext
+ "To start the complete installation process, choose ~s. Alternatively,
you may run each step individually for a slower, more controlled experience.")
+ (gettext installation-menu-title)))
+
+
;; Do the key action labels
(let ((ypos (1- (getmaxy background)))
(str0 (gettext "Get a Shell <F1>"))
@@ -252,19 +272,13 @@ tail of the list."
(truncate (/ (- (getmaxx background)
(string-length str1)) 2)))
(addstr background str2 #:y ypos #:x
- (- (getmaxx background) (string-length str2))))))
-
-
-(define (main-page-refresh page)
- (when (not (page-initialised? page))
- (main-page-init page)
- (page-set-initialised! page #t))
+ (- (getmaxx background) (string-length str2))))
- (touchwin (outer (page-wwin page)))
- (refresh* (outer (page-wwin page)))
- (refresh* (inner (page-wwin page)))
- (menu-redraw (page-datum page 'menu))
- (menu-refresh (page-datum page 'menu)))
+ (touchwin (outer (page-wwin page)))
+ (refresh* (outer (page-wwin page)))
+ (refresh* (inner (page-wwin page)))
+ (menu-redraw menu)
+ (menu-refresh menu)))
(define-public (guixsd-installer)
- branch wip-installer updated (9ff399e -> 688f4f7), John Darrington, 2017/02/02
- 04/18: installer: Add optional arguments to addstr*., John Darrington, 2017/02/02
- 02/18: installer: New gettext keyword M_., John Darrington, 2017/02/02
- 01/18: installer: Avoid wpa_supplicant's output causing screen damage., John Darrington, 2017/02/02
- 05/18: installer: Main page: Redisplay translatable strings upon refresh.,
John Darrington <=
- 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, 2017/02/02