[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/07: doc: Allow different translations for 'guix-cookbook' and 'guix-m
From: |
guix-commits |
Subject: |
01/07: doc: Allow different translations for 'guix-cookbook' and 'guix-manual'. |
Date: |
Fri, 8 Apr 2022 18:00:58 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 0d0e2165ea80262b1044e6cebcc7ad820e59f872
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Apr 8 22:56:02 2022 +0200
doc: Allow different translations for 'guix-cookbook' and 'guix-manual'.
Previously, 'guix-manual-text-domain' could be passed the cookbook
language list as its second argument. Thus, it started failing when the
set of cookbook languages was no longer a subset of the manual
languages, starting with commit
93bfd4d9c7ba7055c19f02128491b3a98a180860, which removed "sk" from
'guix-manual' but kept it for 'guix-cookbook'.
* doc/build.scm (%manual-languages, %cookbook-languages): New
variables.
(%languages): Use them.
(guix-manual-text-domain): Give LANGUAGES a valid default value.
(localization-helper-module): Remove optional argument to
'guix-manual-text-domain'.
---
doc/build.scm | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/doc/build.scm b/doc/build.scm
index 9d79215b98..f5c8713b41 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
@@ -969,7 +977,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 +1051,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"))
- branch master updated (20645d8467 -> 13307c198b), guix-commits, 2022/04/08
- 02/07: doc: Build an empty index if the manual is missing., guix-commits, 2022/04/08
- 04/07: gnu: emacs-geiser: Add dependency on Project., guix-commits, 2022/04/08
- 01/07: doc: Allow different translations for 'guix-cookbook' and 'guix-manual'.,
guix-commits <=
- 03/07: gnu: lsof: Fix invalid G-Expression., guix-commits, 2022/04/08
- 06/07: ui: Move 'location->hyperlink' to (guix diagnostics)., guix-commits, 2022/04/08
- 07/07: diagnostics: Turn diagnostic locations into hyperlinks., guix-commits, 2022/04/08
- 05/07: ui: Move hyperlink facilities to (guix colors)., guix-commits, 2022/04/08