Handle #f package descriptions
One was added in e81cf4e79a6e297db0ae2a9c39eab495e7e204f0.
This commit is contained in:
parent
5cefa250d8
commit
52094f5f19
1 changed files with 29 additions and 24 deletions
|
|
@ -237,7 +237,8 @@ WHERE packages.id IN (
|
|||
(source-description
|
||||
(begin
|
||||
(setlocale LC_MESSAGES source-locale)
|
||||
(P_ (package-description package))))
|
||||
(and=> (package-description package)
|
||||
P_)))
|
||||
(synopsis-by-locale
|
||||
(filter-map
|
||||
(lambda (locale)
|
||||
|
|
@ -258,6 +259,7 @@ WHERE packages.id IN (
|
|||
(cons locale synopsis))))
|
||||
(list ,@locales)))
|
||||
(descriptions-by-locale
|
||||
(if (string? source-description)
|
||||
(filter-map
|
||||
(lambda (locale)
|
||||
(catch 'system-error
|
||||
|
|
@ -275,9 +277,12 @@ WHERE packages.id IN (
|
|||
(if (string=? description source-description)
|
||||
#f
|
||||
(cons locale description))))
|
||||
(list ,@locales))))
|
||||
(list ,@locales))
|
||||
;; Could be #f
|
||||
'())))
|
||||
(cons
|
||||
(cons (cons source-locale source-description)
|
||||
;; Pretend that #f descriptions are ""
|
||||
(cons (cons source-locale (or source-description ""))
|
||||
descriptions-by-locale)
|
||||
(cons (cons source-locale source-synopsis)
|
||||
synopsis-by-locale))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue