aboutsummaryrefslogtreecommitdiff
path: root/doc/build.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-06-08 14:46:24 +0200
committerLudovic Courtès <ludo@gnu.org>2022-06-08 14:46:24 +0200
commit8c3e9da13a3c92a7db308db8c0d81cb474ad7799 (patch)
tree88d06952aa5cc3a9c4991d9c43eb7950ff174fe1 /doc/build.scm
parent5439c04ebdb7b6405f5ea2446b375f1d155a8d95 (diff)
parent0c5299200ffcd16370f047b7ccb187c60f30da34 (diff)
downloadguix-8c3e9da13a3c92a7db308db8c0d81cb474ad7799.tar.gz
guix-8c3e9da13a3c92a7db308db8c0d81cb474ad7799.zip
Merge branch 'master' into core-updates
Diffstat (limited to 'doc/build.scm')
-rw-r--r--doc/build.scm26
1 files changed, 17 insertions, 9 deletions
diff --git a/doc/build.scm b/doc/build.scm
index 9d79215b98..cf3e5d2830 100644
--- a/doc/build.scm
+++ b/doc/build.scm
@@ -62,11 +62,19 @@
(or (getenv "GUIX_MANUAL")
"guix"))
+(define %manual-languages
+ ;; Available translations for the 'guix-manual' text domain.
+ '("de" "en" "es" "fr" "ru" "zh_CN"))
+
+(define %cookbook-languages
+ ;; Available translations for the 'guix-cookbook' text domain.
+ '("de" "en" "fr" "sk"))
+
(define %languages
- ;; The cookbook is not translated in the same languages as the manual
+ ;; Available translations for the document being built.
(if (string=? %manual "guix-cookbook")
- '("de" "en" "fr" "sk")
- '("de" "en" "es" "fr" "ru" "zh_CN")))
+ %cookbook-languages
+ %manual-languages))
(define (texinfo-manual-images source)
"Return a directory containing all the images used by the user manual, taken
@@ -301,8 +309,9 @@ actual file name."
(define (html-files directory)
;; Return the list of HTML files under DIRECTORY.
(map (cut string-append directory "/" <>)
- (scandir #$manual (lambda (file)
- (string-suffix? ".html" file)))))
+ (or (scandir #$manual (lambda (file)
+ (string-suffix? ".html" file)))
+ '())))
(define anchors
(sort (concatenate
@@ -969,7 +978,8 @@ PDF for language '~a'!~%~%"
(computed-file (string-append manual "-pdf-manual") build
#:local-build? #f))
-(define (guix-manual-text-domain source languages)
+(define* (guix-manual-text-domain source
+ #:optional (languages %manual-languages))
"Return the PO files for LANGUAGES of the 'guix-manual' text domain taken
from SOURCE."
(define po-directory
@@ -1042,9 +1052,7 @@ must be the Guix top-level source directory, from which PO files are taken."
(define exp
`(begin
(bindtextdomain "guix-manual"
- #+(guix-manual-text-domain
- source
- languages))
+ #+(guix-manual-text-domain source))
(bindtextdomain "iso_639-3" ;language names
#+(file-append iso-codes
"/share/locale"))