self: Move statements after definitions in translation derivation.

* guix/self.scm (translate-texi-manuals)[build]: Move statements after
definitions.
This commit is contained in:
Ludovic Courtès 2020-06-22 23:40:15 +02:00
parent 5837b3e41f
commit 301527be8b
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -293,22 +293,6 @@ (define build
(ice-9 vlist) (ice-9 vlist)
(srfi srfi-1)) (srfi srfi-1))
(mkdir #$output)
(copy-recursively #$documentation "."
#:log (%make-void-port "w"))
(for-each
(lambda (file)
(copy-file file (basename file)))
(find-files #$documentation-po ".*.po$"))
(setenv "GUIX_LOCPATH"
#+(file-append glibc-utf8-locales "/lib/locale"))
(setenv "PATH" #+(file-append gettext "/bin"))
(setenv "LC_ALL" "en_US.UTF-8")
(setlocale LC_ALL "en_US.UTF-8")
(define (translate-tmp-texi po source output) (define (translate-tmp-texi po source output)
"Translate Texinfo file SOURCE using messages from PO, and write "Translate Texinfo file SOURCE using messages from PO, and write
the result to OUTPUT." the result to OUTPUT."
@ -414,6 +398,21 @@ (define (available-translations directory domain)
(find-files directory (find-files directory
"\\.[a-z]{2}(_[A-Z]{2})?\\.po$"))) "\\.[a-z]{2}(_[A-Z]{2})?\\.po$")))
(mkdir #$output)
(copy-recursively #$documentation "."
#:log (%make-void-port "w"))
(for-each
(lambda (file)
(copy-file file (basename file)))
(find-files #$documentation-po ".*.po$"))
(setenv "GUIX_LOCPATH"
#+(file-append glibc-utf8-locales "/lib/locale"))
(setenv "PATH" #+(file-append gettext "/bin"))
(setenv "LC_ALL" "en_US.UTF-8")
(setlocale LC_ALL "en_US.UTF-8")
(for-each (match-lambda (for-each (match-lambda
((language . po) ((language . po)
(translate-texi "guix" po language (translate-texi "guix" po language