aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/web
diff options
context:
space:
mode:
authorDanjela Lura <danielaluraa@gmail.com>2020-06-24 14:15:16 +0200
committerChristopher Baines <mail@cbaines.net>2020-06-26 17:54:19 +0100
commitd442d408ee580e51faca26844deb5cabe3c971ac (patch)
tree873236e6cb719eea14bfc234896f0f61adac9a13 /guix-data-service/web
parent89aaf984ec5782666983bdfd6ab8d2997770bd2a (diff)
downloaddata-service-d442d408ee580e51faca26844deb5cabe3c971ac.tar
data-service-d442d408ee580e51faca26844deb5cabe3c971ac.tar.gz
Add locale values in the JSON response for the lint warnings page
Signed-off-by: Christopher Baines <mail@cbaines.net>
Diffstat (limited to 'guix-data-service/web')
-rw-r--r--guix-data-service/web/revision/controller.scm10
-rw-r--r--guix-data-service/web/revision/html.scm4
2 files changed, 10 insertions, 4 deletions
diff --git a/guix-data-service/web/revision/controller.scm b/guix-data-service/web/revision/controller.scm
index 08529be..2df5b99 100644
--- a/guix-data-service/web/revision/controller.scm
+++ b/guix-data-service/web/revision/controller.scm
@@ -1083,14 +1083,20 @@
. ,(list->vector
(map (match-lambda
((id lint-checker-name lint-checker-description
+ lint-checker-description-locale
lint-checker-network-dependent
package-name package-version
file line-number column-number
- message)
+ message message-locale)
`((package . ((name . ,package-name)
(version . ,package-version)))
,@(if (member "message" fields)
- `((message . ,message))
+ `((message . ,message)
+ (message-locale . ,message-locale))
+ '())
+ ,@(if (member "linter" fields)
+ `((lint-checker-description . ,lint-checker-description)
+ (lint-checker-description-locale . ,lint-checker-description-locale))
'())
,@(if (member "location" fields)
`((location . ((file . ,file)
diff --git a/guix-data-service/web/revision/html.scm b/guix-data-service/web/revision/html.scm
index cf34d5f..a22c38e 100644
--- a/guix-data-service/web/revision/html.scm
+++ b/guix-data-service/web/revision/html.scm
@@ -1945,10 +1945,10 @@ figure {
,@(let ((fields (assq-ref query-parameters 'field)))
(map
(match-lambda
- ((id lint-checker-name lint-checker-description
+ ((id lint-checker-name lint-checker-description lint-checker-description-locale
lint-checker-network-dependent
package-name package-version file line-number column-number
- message)
+ message message-locale)
`(tr
(td (a (@ (href ,(string-append
(string-join