diff options
author | Danjela Lura <danielaluraa@gmail.com> | 2020-06-24 14:52:45 +0200 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-06-26 17:54:19 +0100 |
commit | bd3aa98620330f3312f091244ac842750adec4de (patch) | |
tree | d3f133479b239b5b790af652d032f000fffa8127 /guix-data-service/web | |
parent | d442d408ee580e51faca26844deb5cabe3c971ac (diff) | |
download | data-service-bd3aa98620330f3312f091244ac842750adec4de.tar data-service-bd3aa98620330f3312f091244ac842750adec4de.tar.gz |
Add indications for no translations available in 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.scm | 5 | ||||
-rw-r--r-- | guix-data-service/web/revision/html.scm | 22 |
2 files changed, 23 insertions, 4 deletions
diff --git a/guix-data-service/web/revision/controller.scm b/guix-data-service/web/revision/controller.scm index 2df5b99..5b6d1bf 100644 --- a/guix-data-service/web/revision/controller.scm +++ b/guix-data-service/web/revision/controller.scm @@ -1071,7 +1071,9 @@ #:locale locale #:package-query package-query #:linters linters - #:message-query message-query))) + #:message-query message-query)) + (any-translated-lint-warnings? + (any-translated-lint-warnings? lint-warnings locale))) (case (most-appropriate-mime-type '(application/json text/html) mime-types) @@ -1113,6 +1115,7 @@ git-repositories lint-checker-options lint-warnings-locale-options + any-translated-lint-warnings? #:path-base path-base #:header-text header-text #:header-link header-link) diff --git a/guix-data-service/web/revision/html.scm b/guix-data-service/web/revision/html.scm index a22c38e..c49624d 100644 --- a/guix-data-service/web/revision/html.scm +++ b/guix-data-service/web/revision/html.scm @@ -1848,6 +1848,7 @@ figure { git-repositories lint-checker-options lint-warnings-locale-options + any-translated-lint-warnings? #:key path-base header-text header-link) (define field-options @@ -1886,7 +1887,10 @@ figure { #:options lint-warnings-locale-options #:allow-selecting-multiple-options #f #:help-text - "Language") + (if any-translated-lint-warnings? + "Language" + '((span (@ (class "text-danger")) + "No translations available in this page")))) ,(form-horizontal-control "Package query" query-parameters #:help-text @@ -1961,10 +1965,22 @@ figure { `((td (span (@ (style "font-family: monospace; display: block;")) ,lint-checker-name) (p (@ (style "font-size: small; margin: 6px 0 0px;")) - ,lint-checker-description))) + ,lint-checker-description) + ,(if (string=? lint-checker-description-locale + (assq-ref query-parameters 'locale)) + "" + '((span (@ (class "text-danger") + (style "font-size: small; display: block;")) + "No translation available for lint checker description."))))) '()) ,@(if (member "message" fields) - `((td ,message)) + `((td ,message + ,(if (string=? message-locale + (assq-ref query-parameters 'locale)) + "" + '((span (@ (class "text-danger") + (style "font-size: small; display: block;")) + "\nNo translation available for lint warning message."))))) '()) ,@(if (member "location" fields) `((td |