Postpone the execution of the query that displays locale options
Signed-off-by: Christopher Baines <mail@cbaines.net>
This commit is contained in:
parent
7984179f5e
commit
599c621b88
|
@ -552,13 +552,12 @@
|
||||||
`("Revision " (samp ,commit-hash)))
|
`("Revision " (samp ,commit-hash)))
|
||||||
(header-link
|
(header-link
|
||||||
(string-append "/revision/" commit-hash)))
|
(string-append "/revision/" commit-hash)))
|
||||||
(define description-and-synopsis-locale-options
|
(define (description-and-synopsis-locale-options locale-data)
|
||||||
(map
|
(map
|
||||||
(match-lambda
|
(match-lambda
|
||||||
((locale)
|
((locale)
|
||||||
locale))
|
locale))
|
||||||
(package-description-and-synopsis-locale-options-guix-revision
|
locale-data))
|
||||||
conn (commit->revision-id conn commit-hash))))
|
|
||||||
|
|
||||||
(if (any-invalid-query-parameters? query-parameters)
|
(if (any-invalid-query-parameters? query-parameters)
|
||||||
(case (most-appropriate-mime-type
|
(case (most-appropriate-mime-type
|
||||||
|
@ -650,18 +649,23 @@
|
||||||
packages))))
|
packages))))
|
||||||
#:extra-headers http-headers-for-unchanging-content))
|
#:extra-headers http-headers-for-unchanging-content))
|
||||||
(else
|
(else
|
||||||
(render-html
|
(let ((locale-options
|
||||||
#:sxml (view-revision-packages commit-hash
|
(description-and-synopsis-locale-options
|
||||||
query-parameters
|
(package-description-and-synopsis-locale-options-guix-revision
|
||||||
packages
|
conn
|
||||||
git-repositories
|
(commit->revision-id conn commit-hash)))))
|
||||||
show-next-page?
|
(render-html
|
||||||
description-and-synopsis-locale-options
|
#:sxml (view-revision-packages commit-hash
|
||||||
any-translations?
|
query-parameters
|
||||||
#:path-base path-base
|
packages
|
||||||
#:header-text header-text
|
git-repositories
|
||||||
#:header-link header-link)
|
show-next-page?
|
||||||
#:extra-headers http-headers-for-unchanging-content))))))
|
locale-options
|
||||||
|
any-translations?
|
||||||
|
#:path-base path-base
|
||||||
|
#:header-text header-text
|
||||||
|
#:header-link header-link)
|
||||||
|
#:extra-headers http-headers-for-unchanging-content)))))))
|
||||||
|
|
||||||
(define* (render-revision-packages-translation-availability mime-types
|
(define* (render-revision-packages-translation-availability mime-types
|
||||||
conn
|
conn
|
||||||
|
|
Loading…
Reference in New Issue