From 14ee80582aff2802723f2194bba9a73d3515de81 Mon Sep 17 00:00:00 2001 From: Linus Gasser Date: Sun, 14 Jun 2026 18:28:45 +0200 Subject: [PATCH 1/2] Use go run for xgettext-go Before: on a mac, the Makefile downloaded a linux file, which did not work for updating the i18n. Now: use 'go run' to run the xgettext-go file. go caches it, so it compiles only once. --- Makefile | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index be3dc7bf..b46181de 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ ABRA := ./cmd/abra -XGETTEXT := ./bin/xgettext-go +XGETTEXT := go run git.coopcloud.tech/toolshed/xgettext-go@latest COMMIT := $(shell git rev-list -1 HEAD) GOPATH := $(shell go env GOPATH) GOVERSION := 1.26 @@ -62,8 +62,8 @@ update-po: done .PHONY: update-pot -update-pot: $(XGETTEXT) - @${XGETTEXT} \ +update-pot: + @$(XGETTEXT) \ -o pkg/i18n/locales/$(DOMAIN).pot \ --keyword=i18n.G \ --keyword-ctx=i18n.GC \ @@ -71,11 +71,6 @@ update-pot: $(XGETTEXT) --add-comments-tag="translators" \ $$(find . -name "*.go" -not -path "*vendor*" | sort) -${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 - .PHONY: update-pot-po-metadata update-pot-po-metadata: @sed -i "s/charset=CHARSET/charset=UTF-8/g" pkg/i18n/locales/*.po pkg/i18n/locales/*.pot -- 2.52.0 From 1541e6aa6a3afcfb5f0531c681b1f4d574690cb6 Mon Sep 17 00:00:00 2001 From: Linus Gasser Date: Sun, 14 Jun 2026 18:37:34 +0200 Subject: [PATCH 2/2] Also use xgettext-go@latest for .drone.yml --- .drone.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index 75096bfb..f197f196 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,12 +8,17 @@ steps: - make check - name: xgettext-go - image: git.coopcloud.tech/toolshed/drone-xgettext-go:latest - settings: - keyword: i18n.G - keyword_ctx: i18n.GC - out: pkg/i18n/locales/abra.pot - comments_tag: translators + image: golang:1.26 + environment: + GOPRIVATE: coopcloud.tech + commands: + - go run git.coopcloud.tech/toolshed/xgettext-go@latest + -o pkg/i18n/locales/abra.pot + --keyword=i18n.G + --keyword-ctx=i18n.GC + --sort-output + --add-comments-tag="translators" + $(find . -name "*.go" -not -path "*vendor*" | sort) depends_on: - make check when: -- 2.52.0