Show More
@@ -2,6 +2,7 b' PREFIX=/usr/local' | |||||
2 | export PREFIX |
|
2 | export PREFIX | |
3 | PYTHON=python |
|
3 | PYTHON=python | |
4 | PURE= |
|
4 | PURE= | |
|
5 | PYTHON_FILES:=$(shell find mercurial hgext doc -name '*.py') | |||
5 |
|
6 | |||
6 | help: |
|
7 | help: | |
7 | @echo 'Commonly used make targets:' |
|
8 | @echo 'Commonly used make targets:' | |
@@ -76,7 +77,9 b' tests:' | |||||
76 | test-%: |
|
77 | test-%: | |
77 | cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@ |
|
78 | cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@ | |
78 |
|
79 | |||
79 | update-pot: |
|
80 | update-pot: i18n/hg.pot | |
|
81 | ||||
|
82 | i18n/hg.pot: $(PYTHON_FILES) | |||
80 | mkdir -p i18n |
|
83 | mkdir -p i18n | |
81 | pygettext -d hg -p i18n --docstrings \ |
|
84 | pygettext -d hg -p i18n --docstrings \ | |
82 | mercurial/commands.py hgext/*.py hgext/*/__init__.py |
|
85 | mercurial/commands.py hgext/*.py hgext/*/__init__.py | |
@@ -86,10 +89,13 b' update-pot:' | |||||
86 | # parse these them even though they are not marked for |
|
89 | # parse these them even though they are not marked for | |
87 | # translation. Extracting with an explicit encoding of |
|
90 | # translation. Extracting with an explicit encoding of | |
88 | # ISO-8859-1 will make xgettext "parse" and ignore them. |
|
91 | # ISO-8859-1 will make xgettext "parse" and ignore them. | |
89 | find mercurial hgext doc -name '*.py' | xargs \ |
|
92 | echo $^ | xargs \ | |
90 | xgettext --from-code ISO-8859-1 --join --sort-by-file \ |
|
93 | xgettext --from-code ISO-8859-1 --join --sort-by-file \ | |
91 | -d hg -p i18n -o hg.pot |
|
94 | -d hg -p i18n -o hg.pot | |
92 |
|
95 | |||
|
96 | %.po: i18n/hg.pot | |||
|
97 | msgmerge --no-location --update $@ $^ | |||
|
98 | ||||
93 | .PHONY: help all local build doc clean install install-bin install-doc \ |
|
99 | .PHONY: help all local build doc clean install install-bin install-doc \ | |
94 | install-home install-home-bin install-home-doc dist dist-notests tests \ |
|
100 | install-home install-home-bin install-home-doc dist dist-notests tests \ | |
95 | update-pot |
|
101 | update-pot |
General Comments 0
You need to be logged in to leave comments.
Login now