From 6c1c0a8a8a9398d3f35cafbfe01a091ea7ad01dd Mon Sep 17 00:00:00 2001 From: decentral1se Date: Thu, 23 Oct 2025 09:19:17 +0200 Subject: [PATCH] refactor: use xgettext-go from makefile variable Easier to hack when customising xgettext-go. --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 4a6163eb7..a651439fb 100644 --- a/Makefile +++ b/Makefile @@ -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