forked from toolshed/abra
refactor: use xgettext-go from makefile variable
Easier to hack when customising xgettext-go.
This commit is contained in:
7
Makefile
7
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
|
||||
|
||||
Reference in New Issue
Block a user