3 # Application demonstration for GNU gettext in shell scripts.
4 # Copyright © 2015 mirabilos <t.glaser@tarent.de>
5 # Published under any OSI-approved Open Source licence.
15 rm -rf mo po/*.pot po/*~
17 all: update-translations install-translations
21 find * -name \*.sh | xargs perl -pi -e 's!^(TEXTDOMAIN=).*$$!$$1$D!'
22 find * -name \*.sh | xgettext -f - -d $D -o po/$D.pot \
23 -L Shell --from-code=UTF-8 --check=ellipsis-unicode \
24 --check=space-ellipsis --check=quote-unicode \
25 --sentence-end=single-space -k_ -F --foreign-user \
26 --package-name=$P --package-version=$V \
27 --msgid-bugs-address=$B
28 set -e; for x in po/*.po; do \
29 msgmerge -U "$$x" po/$D.pot; \
34 set -e; for x in po/*.po; do \
35 l=$${x##*/}; l=$${l%.po}; \
36 mkdir -p "mo/$$l/LC_MESSAGES"; \
37 msgfmt -o "mo/$$l/LC_MESSAGES/$D.mo" "$$x"; \
40 .PHONY: all clean update-translations install-translations