guix: ui: Allow translation of dates.

* guix/ui.scm (display-generation): Allow translation of dates.
The format string will show dates as month day year, but some languages use a
different convention.
This commit is contained in:
Julien Lepiller 2018-06-14 21:17:08 +02:00
parent a4bae9af00
commit af09bed7dc
No known key found for this signature in database
GPG key ID: 43111F4520086A0C

View file

@ -1391,7 +1391,12 @@ (define (display-generation profile number)
(date->string
(time-utc->date
(generation-time profile number))
"~b ~d ~Y ~T")))
;; TRANSLATORS: This is a format-string for date->string.
;; Please choose a format that corresponds to the
;; usual way of presenting dates in your locale.
;; See https://www.gnu.org/software/guile/manual/html_node/SRFI_002d19-Date-to-string.html
;; for details.
(G_ "~b ~d ~Y ~T"))))
(current (generation-number profile)))
(if (= number current)
;; TRANSLATORS: The word "current" here is an adjective for