mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
doc: Add Guix Cookbook.
* .gitignore: Update ignore list. * Makefile.am (assert-no-store-file-names): Exclude the cookbook. * bootstrap: Generate po files for cookbook translations. * doc/guix-cookbook.texi: New file. * doc/local.mk (info_TEXINFOS): Add it; add a rule to build cookbook translations. * po/doc/local.mk (DOC_COOKBOOK_PO_FILES): New variable. (EXTRA_DIST): Add cookbook pot file and po files. (doc-po-update-cookbook-%): New target. (doc-pot-update): Also update cookbook pot file. (doc-po-update): Also update cookbook po files.
This commit is contained in:
parent
a870b80046
commit
7bc46ecc34
6 changed files with 890 additions and 19 deletions
|
@ -23,9 +23,13 @@ DOC_PO_FILES= \
|
|||
%D%/guix-manual.ru.po \
|
||||
%D%/guix-manual.zh_CN.po
|
||||
|
||||
DOC_COOKBOOK_PO_FILES=
|
||||
|
||||
EXTRA_DIST = \
|
||||
%D%/guix-manual.pot \
|
||||
$(DOC_PO_FILES)
|
||||
%D%/guix-cookbook.pot \
|
||||
$(DOC_PO_FILES) \
|
||||
$(DOC_COOKBOOK_PO_FILES)
|
||||
|
||||
POT_OPTIONS = --package-name "guix" --package-version "$(VERSION)" \
|
||||
--copyright-holder "Ludovic Courtès" \
|
||||
|
@ -52,6 +56,27 @@ doc-po-update-%:
|
|||
exit 1; \
|
||||
fi
|
||||
|
||||
doc-po-update-cookbook-%:
|
||||
@lang=`echo "$@" | sed -e's/^doc-po-update-//'` ; \
|
||||
output="$(srcdir)/po/doc/guix-cookbook.$$lang.po" ; \
|
||||
input="$(srcdir)/po/doc/guix-cookbook.pot" ; \
|
||||
if test -f "$$output"; then \
|
||||
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
|
||||
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) "$$output" "$$input";; \
|
||||
*) \
|
||||
$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} "$$output" "$$input";; \
|
||||
esac; \
|
||||
}; \
|
||||
touch "$$output"; \
|
||||
else \
|
||||
echo "File $$output does not exist. If you are a translator, you can create it with 'msginit'." 1>&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
$(srcdir)/po/doc/%.pot-update: doc/%.texi
|
||||
$(AM_V_PO4A)$(PO4A_UPDATEPO) -M UTF-8 -f texinfo -m "$<" \
|
||||
-p "$$(echo $@ | sed 's|-update||')" $(POT_OPTIONS)
|
||||
|
@ -64,6 +89,7 @@ doc-pot-update:
|
|||
$(MAKE) $(srcdir)/po/doc/guix.pot-update; \
|
||||
$(MAKE) $(srcdir)/po/doc/contributing.pot-update; \
|
||||
done
|
||||
$(MAKE) $(srcdir)/po/doc/guix-cookbook.pot-update;
|
||||
msgcat $(addprefix $(srcdir)/po/doc/, $(TMP_POT_FILES)) > $(srcdir)/po/doc/guix-manual.pot
|
||||
rm -f $(addprefix $(srcdir)/po/doc/, $(TMP_POT_FILES))
|
||||
|
||||
|
@ -72,5 +98,10 @@ doc-po-update: doc-pot-update
|
|||
lang="`echo "$$f" | $(SED) -es'|.*/guix-manual\.\(.*\)\.po$$|\1|g'`"; \
|
||||
$(MAKE) "doc-po-update-$$lang"; \
|
||||
done
|
||||
for f in $(DOC_COOKBOOK_PO_FILES); do \
|
||||
lang="`echo "$$f" | $(SED) -es'|.*/guix-cookbook\.\(.*\)\.po$$|\1|g'`"; \
|
||||
$(MAKE) "doc-po-update-cookbook-$$lang"; \
|
||||
done
|
||||
|
||||
|
||||
.PHONY: doc-po-update doc-pot-update
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue