refactor: use xgettext-go from makefile variable

Easier to hack when customising xgettext-go.
This commit is contained in:
2025-10-23 09:19:17 +02:00
parent 662f45008c
commit 6c1c0a8a8a

View File

@ -1,4 +1,5 @@
ABRA := ./cmd/abra
XGETTEXT := ./bin/xgettext-go
COMMIT := $(shell git rev-list -1 HEAD)
GOPATH := $(shell go env GOPATH)
GOVERSION := 1.24
@ -60,8 +61,8 @@ update-po:
done
.PHONY: update-pot
update-pot: ./bin/xgettext-go
@./bin/xgettext-go \
update-pot: $(XGETTEXT)
@${XGETTEXT} \
-o pkg/i18n/locales/$(DOMAIN).pot \
--keyword=i18n.G \
--keyword-ctx=i18n.GC \
@ -69,7 +70,7 @@ update-pot: ./bin/xgettext-go
--add-comments-tag="translators" \
$$(find . -name "*.go" -not -path "*vendor*" | sort)
./bin/xgettext-go:
${XGETTEXT}:
@mkdir -p ./bin && \
wget -O ./bin/xgettext-go https://git.coopcloud.tech/toolshed/xgettext-go/raw/branch/main/xgettext-go && \
chmod +x ./bin/xgettext-go