diff options
| author | nytpu <alex@nytpu.com> | 2021-05-11 11:19:37 -0600 |
|---|---|---|
| committer | nytpu <alex@nytpu.com> | 2021-05-11 11:23:28 -0600 |
| commit | 5aa80302af2aa31b63c51f5e020b8464ab635ff2 (patch) | |
| tree | b741b6b54a68881508a15b0fca70371508260ad6 | |
| parent | 4d23da8c389d210c5d067fdbcb28d6875797e9e6 (diff) | |
add localization generation and add to build system
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | .goreleaser.yml | 1 | ||||
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | comitium.go | 3 |
4 files changed, 7 insertions, 0 deletions
@@ -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: @@ -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" |
