diff --git a/.gitignore b/.gitignore index 2912d62..7a50349 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /dist/ /build/ +/localizations/ diff --git a/.goreleaser.yml b/.goreleaser.yml index 10581aa..8207933 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,5 +1,6 @@ before: hooks: + - go generate ./... - scdoc < doc/comitium.1.scd > dist/comitum.1 - mv dist/comitium.1 /home/alex/projects/gemini.nytpu.com/releases/comitium/{{ .Version }} builds: diff --git a/Makefile b/Makefile index 2eb2cd5..bf4b844 100644 --- a/Makefile +++ b/Makefile @@ -46,6 +46,7 @@ $(BUILDDIR): $(BUILDDIR)/$(NAME): $(GOSRC) | $(BUILDDIR) + $(GO) generate ./... $(GO) build $(GOFLAGS) -ldflags "$(GOLDFLAGS)" -o $@ @@ -55,6 +56,7 @@ $(BUILDDIR)/%.1: doc/%.1.scd | $(BUILDDIR) clean: -$(RM) -r $(BUILDDIR) + -$(RM) -r localizations install: all diff --git a/comitium.go b/comitium.go index 6ab845f..5756098 100644 --- a/comitium.go +++ b/comitium.go @@ -6,6 +6,9 @@ // doc/comitium.1.scd for a manual page. package main +// generate the translations: +//go:generate go-localize -input localizations_src -output localizations + import ( "fmt" "net/url"