mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
ui: Change 'P_' to return the empty string when passed the empty string.
Reported by Mathieu Lirzin <mathieu.lirzin@etu.u-bordeaux.fr> at <https://lists.gnu.org/archive/html/guix-devel/2015-09/msg00111.html>. * guix/ui.scm (P_): Check whether MSGID is empty, and return it if it is.
This commit is contained in:
parent
37ab3abad3
commit
a5c0d8bc55
1 changed files with 9 additions and 1 deletions
10
guix/ui.scm
10
guix/ui.scm
|
@ -99,7 +99,15 @@ (define %package-text-domain
|
|||
|
||||
(define _ (cut gettext <> %gettext-domain))
|
||||
(define N_ (cut ngettext <> <> <> %gettext-domain))
|
||||
(define P_ (cut gettext <> %package-text-domain))
|
||||
|
||||
(define (P_ msgid)
|
||||
"Return the translation of the package description or synopsis MSGID."
|
||||
;; Descriptions/synopses might occasionally be empty strings, even if that
|
||||
;; is something we try to avoid. Since (gettext "") can return a non-empty
|
||||
;; string, explicitly check for that case.
|
||||
(if (string-null? msgid)
|
||||
msgid
|
||||
(gettext msgid %package-text-domain)))
|
||||
|
||||
(define-syntax-rule (define-diagnostic name prefix)
|
||||
"Create a diagnostic macro (i.e., NAME), which will prepend PREFIX to all
|
||||
|
|
Loading…
Reference in a new issue