From 4f6dd96c731e14099c13ddfbdec80836f436d287 Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Wed, 7 Oct 2026 16:24:40 +0200 Subject: [PATCH] Make PO extraction independent of local environment --- lang/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lang/Makefile b/lang/Makefile index 0fca4e3..248981b 100644 --- a/lang/Makefile +++ b/lang/Makefile @@ -1,9 +1,9 @@ INSTALLDIR = $(shell pwd) LANGUAGES = `find ./ -name "helloasso_*.po" -print | sed 's|^\./helloasso_\(.*\).po|\1|'` DOMAINS = helloasso -PHP_SOURCES = $(shell find ../ -maxdepth 1 -name \*.php) \ - $(shell find ../lib/GaletteHelloasso/ -name \*.php) \ - $(shell find ../tempcache -name \*.twig) +PHP_SOURCES = $(sort $(shell find ../ -maxdepth 1 -name \*.php)) \ + $(sort $(shell find ../lib/GaletteHelloasso/ -name \*.php)) \ + $(sort $(shell find ../tempcache -name \*.twig)) all : extract mo @@ -32,5 +32,5 @@ extract : twig ${PHP_SOURCES} Makefile cd ../../../../ && bin/console galette:twig-pot-references $(CURDIR)/${DOMAINS}.pot $(shell basename $(abspath $(CURDIR)/..)) echo "Generating en_US:" @for d in ${DOMAINS}; do \ - LANG=C msginit --no-translator -i $$d.pot --locale=en_US.utf8 -o $${d}_en_US.po; \ + sed 's/charset=CHARSET/charset=UTF-8/' $$d.pot | LANG=C msginit --no-translator -i - --locale=en_US.utf8 -o $${d}_en_US.po; \ done