From: "Ludovic Courtès" <ludo@gnu.org>
To: 54307@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>
Subject: [bug#54307] [PATCH 2/2] ui: 'show-what-to-build' highlights "would be downloaded" headings.
Date: Wed, 9 Mar 2022 11:12:34 +0100 [thread overview]
Message-ID: <20220309101234.24236-2-ludo@gnu.org> (raw)
In-Reply-To: <20220309101234.24236-1-ludo@gnu.org>
* guix/ui.scm (show-what-to-build): Highlight "X MB would be downloaded".
---
guix/ui.scm | 74 +++++++++++++++++++++++++++++++----------------------
1 file changed, 44 insertions(+), 30 deletions(-)
diff --git a/guix/ui.scm b/guix/ui.scm
index 8e4e3e2dfc..6c194eb3c9 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -1041,21 +1041,28 @@ (define display-download-size?
(map colorized-store-item build)))
(cond ((>= verbosity 2)
(if display-download-size?
- (format (current-error-port)
- ;; TRANSLATORS: "MB" is for "megabyte"; it should be
- ;; translated to the corresponding abbreviation.
- (G_ "~:[~,1h MB would be downloaded:~%~{ ~a~%~}~;~]")
- (null? download)
- download-size
- (map (compose colorized-store-item substitutable-path)
- download))
- (format (current-error-port)
- (N_ "~:[The following file would be downloaded:~%~{ ~a~%~}~;~]"
- "~:[The following files would be downloaded:~%~{ ~a~%~}~;~]"
- (length download))
- (null? download)
- (map (compose colorized-store-item substitutable-path)
- download)))
+ (begin
+ (format (current-error-port)
+ (highlight
+ ;; TRANSLATORS: "MB" is for "megabyte"; it
+ ;; should be translated to the corresponding
+ ;; abbreviation.
+ (G_ "~:[~,1h MB would be downloaded:~%~;~]"))
+ (null? download)
+ download-size)
+ (format (current-error-port) "~{ ~a~%~}"
+ (map (compose colorized-store-item substitutable-path)
+ download)))
+ (begin
+ (format (current-error-port)
+ (highlight
+ (N_ "~:[The following file would be downloaded:~%~;~]"
+ "~:[The following files would be downloaded:~%~;~]"
+ (length download)))
+ (null? download))
+ (format (current-error-port) "~{ ~a~%~}"
+ (map (compose colorized-store-item substitutable-path)
+ download))))
(format (current-error-port)
(N_ "~:[The following graft would be made:~%~{ ~a~%~}~;~]"
"~:[The following grafts would be made:~%~{ ~a~%~}~;~]"
@@ -1094,21 +1101,28 @@ (define display-download-size?
(map colorized-store-item build)))
(cond ((>= verbosity 2)
(if display-download-size?
- (format (current-error-port)
- ;; TRANSLATORS: "MB" is for "megabyte"; it should be
- ;; translated to the corresponding abbreviation.
- (G_ "~:[~,1h MB will be downloaded:~%~{ ~a~%~}~;~]")
- (null? download)
- download-size
- (map (compose colorized-store-item substitutable-path)
- download))
- (format (current-error-port)
- (N_ "~:[The following file will be downloaded:~%~{ ~a~%~}~;~]"
- "~:[The following files will be downloaded:~%~{ ~a~%~}~;~]"
- (length download))
- (null? download)
- (map (compose colorized-store-item substitutable-path)
- download)))
+ (begin
+ (format (current-error-port)
+ (highlight
+ ;; TRANSLATORS: "MB" is for "megabyte"; it
+ ;; should be translated to the corresponding
+ ;; abbreviation.
+ (G_ "~:[~,1h MB will be downloaded:~%~;~]"))
+ (null? download)
+ download-size)
+ (format (current-error-port) "~{ ~a~%~}"
+ (map (compose colorized-store-item substitutable-path)
+ download)))
+ (begin
+ (format (current-error-port)
+ (highlight
+ (N_ "~:[The following file will be downloaded:~%~;~]"
+ "~:[The following files will be downloaded:~%~;~]"
+ (length download)))
+ (null? download))
+ (format (current-error-port) "~{ ~a~%~}"
+ (map (compose colorized-store-item substitutable-path)
+ download))))
(format (current-error-port)
(N_ "~:[The following graft will be made:~%~{ ~a~%~}~;~]"
"~:[The following grafts will be made:~%~{ ~a~%~}~;~]"
--
2.34.0
next prev parent reply other threads:[~2022-03-09 10:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-09 9:57 [bug#54307] [PATCH 0/2] Highlight headings showing what to build/download Ludovic Courtès
2022-03-09 10:12 ` [bug#54307] [PATCH 1/2] ui: 'show-what-to-build' highlights "The following [...] will be built" Ludovic Courtès
2022-03-09 10:12 ` Ludovic Courtès [this message]
2022-03-09 10:52 ` Liliana Marie Prikler
2022-03-10 10:19 ` [bug#54307] [PATCH 0/2] Highlight headings showing what to build/download Ludovic Courtès
2022-03-10 10:46 ` Liliana Marie Prikler
2022-03-13 22:00 ` Ludovic Courtès
2022-03-18 15:10 ` bug#54307: " Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220309101234.24236-2-ludo@gnu.org \
--to=ludo@gnu.org \
--cc=54307@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.