ui: 'show-what-to-build' highlights "would be downloaded" headings.

* guix/ui.scm (show-what-to-build): Highlight "X MB would be downloaded".
This commit is contained in:
Ludovic Courtès 2022-03-09 10:47:52 +01:00
parent 9e0f0123a0
commit 625fa3cfe8
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -1041,21 +1041,28 @@ summary, and level 0 shows nothing."
(map colorized-store-item build))) (map colorized-store-item build)))
(cond ((>= verbosity 2) (cond ((>= verbosity 2)
(if display-download-size? (if display-download-size?
(format (current-error-port) (begin
;; TRANSLATORS: "MB" is for "megabyte"; it should be (format (current-error-port)
;; translated to the corresponding abbreviation. (highlight
(G_ "~:[~,1h MB would be downloaded:~%~{ ~a~%~}~;~]") ;; TRANSLATORS: "MB" is for "megabyte"; it
(null? download) ;; should be translated to the corresponding
download-size ;; abbreviation.
(map (compose colorized-store-item substitutable-path) (G_ "~:[~,1h MB would be downloaded:~%~;~]"))
download)) (null? download)
(format (current-error-port) download-size)
(N_ "~:[The following file would be downloaded:~%~{ ~a~%~}~;~]" (format (current-error-port) "~{ ~a~%~}"
"~:[The following files would be downloaded:~%~{ ~a~%~}~;~]" (map (compose colorized-store-item substitutable-path)
(length download)) download)))
(null? download) (begin
(map (compose colorized-store-item substitutable-path) (format (current-error-port)
download))) (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) (format (current-error-port)
(N_ "~:[The following graft would be made:~%~{ ~a~%~}~;~]" (N_ "~:[The following graft would be made:~%~{ ~a~%~}~;~]"
"~:[The following grafts would be made:~%~{ ~a~%~}~;~]" "~:[The following grafts would be made:~%~{ ~a~%~}~;~]"
@ -1094,21 +1101,28 @@ summary, and level 0 shows nothing."
(map colorized-store-item build))) (map colorized-store-item build)))
(cond ((>= verbosity 2) (cond ((>= verbosity 2)
(if display-download-size? (if display-download-size?
(format (current-error-port) (begin
;; TRANSLATORS: "MB" is for "megabyte"; it should be (format (current-error-port)
;; translated to the corresponding abbreviation. (highlight
(G_ "~:[~,1h MB will be downloaded:~%~{ ~a~%~}~;~]") ;; TRANSLATORS: "MB" is for "megabyte"; it
(null? download) ;; should be translated to the corresponding
download-size ;; abbreviation.
(map (compose colorized-store-item substitutable-path) (G_ "~:[~,1h MB will be downloaded:~%~;~]"))
download)) (null? download)
(format (current-error-port) download-size)
(N_ "~:[The following file will be downloaded:~%~{ ~a~%~}~;~]" (format (current-error-port) "~{ ~a~%~}"
"~:[The following files will be downloaded:~%~{ ~a~%~}~;~]" (map (compose colorized-store-item substitutable-path)
(length download)) download)))
(null? download) (begin
(map (compose colorized-store-item substitutable-path) (format (current-error-port)
download))) (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) (format (current-error-port)
(N_ "~:[The following graft will be made:~%~{ ~a~%~}~;~]" (N_ "~:[The following graft will be made:~%~{ ~a~%~}~;~]"
"~:[The following grafts will be made:~%~{ ~a~%~}~;~]" "~:[The following grafts will be made:~%~{ ~a~%~}~;~]"