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