summaryrefslogtreecommitdiff
path: root/po
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2024-04-15 10:57:23 +0100
committerChristopher Baines <mail@cbaines.net>2024-04-15 10:57:31 +0100
commit953253eff32197863d223e5fece42b3c2440df01 (patch)
treeeb85f6b719322174f5dc504cac9de9829e1651e2 /po
parent2718616f77aace28b3962fef29b4e38b87a512ce (diff)
parent8e3831eb126478cad50588a0f3474667981b11ec (diff)
Merge remote-tracking branch 'savannah/master' into mesa-updates
Change-Id: I00980ec5dbd9d23ab076995bc79331d136424796
Diffstat (limited to 'po')
-rw-r--r--po/doc/local.mk16
-rw-r--r--po/guix/Makevars7
-rw-r--r--po/packages/Makevars10
3 files changed, 26 insertions, 7 deletions
diff --git a/po/doc/local.mk b/po/doc/local.mk
index dd6ba30133..77ec4721e3 100644
--- a/po/doc/local.mk
+++ b/po/doc/local.mk
@@ -1,6 +1,7 @@
# GNU Guix --- Functional package management for GNU
# Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
# Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+# Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
#
# This file is part of GNU Guix.
#
@@ -44,12 +45,19 @@ POT_OPTIONS = \
--msgid-bugs-address "bug-guix@gnu.org"
%D%/%.pot: $(srcdir)/doc/%.texi
- $(AM_V_PO4A)$(PO4A_UPDATEPO) -M UTF-8 -f texinfo -m "$<" \
- -p "$@" $(POT_OPTIONS) && \
- touch $@
+ $(AM_V_PO4A)$(PO4A_UPDATEPO) -M UTF-8 -f texinfo -m "$<" \
+ -p "$@-t" $(POT_OPTIONS)
+ date="$$(git log --pretty=format:%ci -n 1 -- $< 2>/dev/null \
+ || echo $(SOURCE_DATE_EPOCH))" \
+ sed -ri -e "s,^(.POT-Creation-Date: )[^\]*,\1$$date," "$@-t"
+ mv "$@-t" "$@"
%D%/guix-manual.pot: %D%/guix.pot %D%/contributing.pot
- msgcat $^ > $@
+ msgcat $^ > "$@-t"
+ date="$$(git log --pretty=format:%ci -n 1 -- $< 2>/dev/null \
+ || echo $(SOURCE_DATE_EPOCH))" \
+ sed -ri "s,^(.POT-Creation-Date: )[^\]*,\1$$date," "$@-t"
+ mv "$@-t" "$@"
doc-pot-update: %D%/guix-manual.pot %D%/guix-cookbook.pot
.PHONY: doc-pot-update
diff --git a/po/guix/Makevars b/po/guix/Makevars
index 88a4e8c7bc..4cfd0f431d 100644
--- a/po/guix/Makevars
+++ b/po/guix/Makevars
@@ -5,6 +5,10 @@ DOMAIN = guix
subdir = po/guix
top_builddir = ../..
+# We use our xgettext.scm wrapper to produce .PO files reproducibly using a
+# timestamp from Git.
+XGETTEXT:=$(top_srcdir)/build-aux/xgettext.scm
+
# These options get passed to xgettext. We want to catch standard
# gettext uses, and SRFI-35 error condition messages. In C++ code
# we use 'n_' instead of the more usual 'N_' for no-ops.
@@ -14,7 +18,8 @@ XGETTEXT_OPTIONS = \
--keyword=message \
--keyword=description \
--keyword=synopsis \
- --keyword=n_
+ --keyword=n_ \
+ --xgettext=$(XGETTEXT_)
COPYRIGHT_HOLDER = the authors of Guix (msgids)
diff --git a/po/packages/Makevars b/po/packages/Makevars
index 65912786d8..0ba4f1ba7e 100644
--- a/po/packages/Makevars
+++ b/po/packages/Makevars
@@ -6,12 +6,18 @@ DOMAIN = guix-packages
subdir = po/packages
top_builddir = ../..
+# We use our xgettext.scm wrapper to produce .PO files reproducibly using a
+# timestamp from Git. The `real' xgettext is passed as an option to
+# xgettext.scm
+XGETTEXT:=$(top_srcdir)/build-aux/xgettext.scm
+
# These options get passed to xgettext. We want to catch exclusively package
# synopses and descriptions.
XGETTEXT_OPTIONS = \
--language=Scheme --from-code=UTF-8 \
- --keyword=synopsis --keyword=description \
- --keyword=output-synopsis:2
+ --keyword=synopsis --keyword=description \
+ --keyword=output-synopsis:2 \
+ --xgettext=$(XGETTEXT_)
COPYRIGHT_HOLDER = the authors of Guix (msgids)