diff options
author | Christopher Baines <mail@cbaines.net> | 2020-09-26 11:45:57 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-09-26 11:45:57 +0100 |
commit | 53341c70fcb8888b040230e28bbe5deb1b1773ce (patch) | |
tree | dcb38c6985150ef137f64136e1b18afcdd346d22 /guix-data-service/web/revision | |
parent | af2e12a9ef529789017caaba8c866b13f9c34067 (diff) | |
download | data-service-53341c70fcb8888b040230e28bbe5deb1b1773ce.tar data-service-53341c70fcb8888b040230e28bbe5deb1b1773ce.tar.gz |
Change the locale codeset representation
From the normalized one, to the one actually contained within glibc. Recent
versions of glibc also contain symlinks linking the normalized codeset to the
locales with the .UTF-8 ending, but older ones do not.
Maybe handling codeset normalisation for queries would be good, but the locale
values ending in .UTF-8 are more compatible and allow the code to be
simplified. For querying, maybe there should be a locales table which handles
different representations.
Diffstat (limited to 'guix-data-service/web/revision')
-rw-r--r-- | guix-data-service/web/revision/controller.scm | 6 | ||||
-rw-r--r-- | guix-data-service/web/revision/html.scm | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/guix-data-service/web/revision/controller.scm b/guix-data-service/web/revision/controller.scm index 8338a00..ec93c04 100644 --- a/guix-data-service/web/revision/controller.scm +++ b/guix-data-service/web/revision/controller.scm @@ -125,7 +125,7 @@ (guard-against-mutually-exclusive-query-parameters (parse-query-parameters request - `((locale ,identity #:default "en_US.utf8") + `((locale ,identity #:default "en_US.UTF-8") (after_name ,identity) (field ,identity #:multi-value #:default ("version" "synopsis")) @@ -170,7 +170,7 @@ (let ((parsed-query-parameters (parse-query-parameters request - `((locale ,identity #:default "en_US.utf8"))))) + `((locale ,identity #:default "en_US.UTF-8"))))) (render-revision-package-version mime-types conn commit-hash @@ -308,7 +308,7 @@ (let ((parsed-query-parameters (parse-query-parameters request - `((locale ,identity #:default "en_US.utf8") + `((locale ,identity #:default "en_US.UTF-8") (package_query ,identity) (linter ,identity #:multi-value) (message_query ,identity) diff --git a/guix-data-service/web/revision/html.scm b/guix-data-service/web/revision/html.scm index 543fba8..5917d50 100644 --- a/guix-data-service/web/revision/html.scm +++ b/guix-data-service/web/revision/html.scm @@ -725,13 +725,13 @@ path-base header-link header-text) (define total-package-synopsis - (assoc-ref package-synopsis-counts "en_US.utf8")) + (assoc-ref package-synopsis-counts "en_US.UTF-8")) (define total-package-descriptions - (assoc-ref package-description-counts "en_US.utf8")) + (assoc-ref package-description-counts "en_US.UTF-8")) - (assoc-remove! package-synopsis-counts "en_US.utf8") - (assoc-remove! package-description-counts "en_US.utf8") + (assoc-remove! package-synopsis-counts "en_US.UTF-8") + (assoc-remove! package-description-counts "en_US.UTF-8") (define synopsis-percentages (map |