diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-05-25 00:25:15 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-05-25 00:25:15 +0200 |
commit | 57df83e07d4b5e78d9a54c1a88d05b4a9ed65714 (patch) | |
tree | 76684e63965e9ad6e37d9d45bc3159e6c9782cd0 /po/doc/local.mk | |
parent | 43d9ed7792808638eabb43aa6133f1d6186c520b (diff) | |
parent | 136b7d81f0eb713783e9ea7cf7f260a2b6252dfd (diff) | |
download | guix-57df83e07d4b5e78d9a54c1a88d05b4a9ed65714.tar.gz |
Merge branch 'staging' into core-updates
Diffstat (limited to 'po/doc/local.mk')
-rw-r--r-- | po/doc/local.mk | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/po/doc/local.mk b/po/doc/local.mk index 6b51c2a071..fb3c5aee03 100644 --- a/po/doc/local.mk +++ b/po/doc/local.mk @@ -20,6 +20,7 @@ DOC_PO_FILES= \ %D%/guix-manual.es.po \ %D%/guix-manual.de.po \ %D%/guix-manual.fr.po \ + %D%/guix-manual.ru.po \ %D%/guix-manual.zh_CN.po EXTRA_DIST = \ @@ -30,22 +31,24 @@ POT_OPTIONS = --package-name "guix" --package-version "$(VERSION)" \ --copyright-holder "Ludovic Courtès" \ --msgid-bugs-address "ludo@gnu.org" -$(srcdir)/po/doc/guix-manual.%.po: $(srcdir)/po/doc/guix-manual.pot - @lang=`echo $$(basename "$@") | sed -e 's|^guix-manual.||' -e 's|.po$$||'` ;\ - if test -f "$@"; then \ +doc-po-update-%: + @lang=`echo "$@" | sed -e's/^doc-po-update-//'` ; \ + output="$(srcdir)/po/doc/guix-manual.$$lang.po" ; \ + input="$(srcdir)/po/doc/guix-manual.pot" ; \ + if test -f "$$output"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $@ $<"; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $$output $$input"; \ cd $(srcdir) \ && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ - $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $@ $<;; \ + $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) "$$output" "$$input";; \ *) \ - $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $@ $<;; \ + $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} "$$output" "$$input";; \ esac; \ }; \ - touch "$@"; \ + touch "$$output"; \ else \ - echo "File $@ does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ + echo "File $$output does not exist. If you are a translator, you can create it with 'msginit'." 1>&2; \ exit 1; \ fi @@ -54,7 +57,7 @@ $(srcdir)/po/doc/%.pot-update: doc/%.texi -p "$$(echo $@ | sed 's|-update||')" $(POT_OPTIONS) @touch "$$(echo $@ | sed 's|-update||')" -TMP_POT_FILES=contributing.pot guix.pot +TMP_POT_FILES = contributing.pot guix.pot doc-pot-update: for f in $(TMP_POT_FILES); do \ @@ -65,6 +68,9 @@ doc-pot-update: rm -f $(addprefix $(srcdir)/po/doc/, $(TMP_POT_FILES)) doc-po-update: doc-pot-update - for f in $(DOC_PO_FILES); do \ - $(MAKE) "$$f"; \ + for f in $(DOC_PO_FILES); do \ + lang="`echo "$$f" | $(SED) -es'|.*/guix-manual\.\(.*\)\.po$$|\1|g'`"; \ + $(MAKE) "doc-po-update-$$lang"; \ done + +.PHONY: doc-po-update doc-pot-update |