aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--GNUmakefile10
-rw-r--r--doc/i18n.md6
2 files changed, 11 insertions, 5 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 23f261b..6e320e7 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -15,7 +15,7 @@ all: euro-cash.eu exttmpl
euro-cash.eu: $(cssfiles) $(templates) $(gofiles) $(sqlfiles)
$(GO) build
-po: exttmpl
+extract: exttmpl
find . -name '*.go' -exec xgettext -Lgo --force-po --from-code=UTF-8 \
-o po/backend.pot {} +
find . -name '*.html.tmpl' -exec ./exttmpl {} + \
@@ -33,6 +33,12 @@ po: exttmpl
done
find po -name '*~' -delete
+po:
+ for po in po/*/*.po; \
+ do \
+ msgfmt "$$po" -o "$${po%.*}.mo"; \
+ done
+
exttmpl: $(exttmpl)
$(GO) build ./cmd/exttmpl
@@ -52,4 +58,4 @@ clean:
-or -name '*.tar.gz' \
\) -delete
-.PHONY: clean po release \ No newline at end of file
+.PHONY: clean extract po release \ No newline at end of file
diff --git a/doc/i18n.md b/doc/i18n.md
index 475a512..b7de2dc 100644
--- a/doc/i18n.md
+++ b/doc/i18n.md
@@ -5,9 +5,9 @@
For translators to be able to translate text, and for us to be able to
work with those translations, we need translation files. These files are
located in the `/po` directory. These files are automatically generated
-by running the `make po` command. In order to extract translations from
-the source code, the `make po` command will search for calls to the
-`Get()` family of functions, such as `Get()` and `GetN()`.
+by running the `make extract` command. In order to extract translations
+from the source code, the `make extract` command will search for calls to
+the `Get()` family of functions, such as `Get()` and `GetN()`.
```go
func example(n int) {