aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix-data-service/model/package.scm10
-rw-r--r--guix-data-service/web/revision/controller.scm3
2 files changed, 8 insertions, 5 deletions
diff --git a/guix-data-service/model/package.scm b/guix-data-service/model/package.scm
index 43871ec..0c3e358 100644
--- a/guix-data-service/model/package.scm
+++ b/guix-data-service/model/package.scm
@@ -138,7 +138,9 @@ WHERE data.name IN (SELECT name FROM package_names);"))
(define* (search-packages-in-revision conn commit-hash
search-query
- #:key limit-results)
+ #:key
+ limit-results
+ locale)
(define query
(string-append
"
@@ -171,7 +173,7 @@ INNER JOIN (
INNER JOIN package_synopsis
ON package_synopsis.id = ANY (package_synopsis_sets.synopsis_ids)
ORDER BY package_synopsis_sets.id,
- CASE WHEN package_synopsis.locale = $2 THEN 2
+ CASE WHEN package_synopsis.locale = $3 THEN 2
WHEN package_synopsis.locale = 'en_US.utf8' THEN 1
ELSE 0
END DESC
@@ -184,7 +186,7 @@ INNER JOIN (
INNER JOIN package_descriptions
ON package_descriptions.id = ANY (package_description_sets.description_ids)
ORDER BY package_description_sets.id,
- CASE WHEN package_descriptions.locale = $2 THEN 2
+ CASE WHEN package_descriptions.locale = $3 THEN 2
WHEN package_descriptions.locale = 'en_US.utf8' THEN 1
ELSE 0
END DESC
@@ -222,7 +224,7 @@ ORDER BY (
"")))
(exec-query conn query
- (list commit-hash search-query)))
+ (list commit-hash search-query locale)))
(define (count-packages-in-revision conn commit-hash)
(define query
diff --git a/guix-data-service/web/revision/controller.scm b/guix-data-service/web/revision/controller.scm
index a038e5c..08529be 100644
--- a/guix-data-service/web/revision/controller.scm
+++ b/guix-data-service/web/revision/controller.scm
@@ -575,7 +575,8 @@
conn
commit-hash
search-query
- #:limit-results limit-results)
+ #:limit-results limit-results
+ #:locale locale)
(select-packages-in-revision
conn
commit-hash