Mercurial > p > roundup > code
annotate locale/GNUmakefile @ 6628:2bb6d7baa47d
"Comment" out the meta data - will not process under 1.7.5 sphinx
Apparently field names with : fail on 1.7.5 sphinx which is the
virtual env version on sourceforge. It works on my 1.6.7 python2
install.
Looks like I need to add sphinxext-opengraph to get this to work.
However that is python3 only so need to spin up new virtualenv etc.
Looks like no python3 on sourceforge which may be an issue.
On sourceforge in /home/project-web/roundup/src/docbuilder these
packages are used and must be scp'ed as pip has no network access
outside of sourceforge:
Babel-2.6.0-py2.py3-none-any.whl
Jinja2-2.10-py2.py3-none-any.whl
MarkupSafe-1.0.tar.gz
Pygments-2.2.0-py2.py3-none-any.whl
Sphinx-1.7.5
Sphinx-1.7.5-py2.py3-none-any.whl
Sphinx-1.7.5.tar.gz
alabaster-0.7.11-py2.py3-none-any.whl
certifi-2018.4.16-py2.py3-none-any.whl
chardet-3.0.4-py2.py3-none-any.whl
docutils-0.14-py2-none-any.whl
idna-2.7-py2.py3-none-any.whl
imagesize-1.0.0-py2.py3-none-any.whl
packaging-17.1-py2.py3-none-any.whl
pip-10.0.1
pip-10.0.1.tar.gz
pyparsing-2.2.0-py2.py3-none-any.whl
pytz-2018.5-py2.py3-none-any.whl
requests-2.19.1-py2.py3-none-any.whl
setuptools-39.2.0-py2.py3-none-any.whl
six-1.11.0-py2.py3-none-any.whl
snowballstemmer-1.2.1-py2.py3-none-any.whl
sphinxcontrib_websupport-1.1.0-py2.py3-none-any.whl
typing-3.6.4-py2-none-any.whl
urllib3-1.23-py2.py3-none-any.whl
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 27 Mar 2022 13:57:04 -0400 |
| parents | ebd8f962fbf1 |
| children | 01216187a167 |
| rev | line source |
|---|---|
|
2330
8ae58eda9331
in addition to xpot...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2306
diff
changeset
|
1 # Extract translatable strings from Roundup sources, |
|
8ae58eda9331
in addition to xpot...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2306
diff
changeset
|
2 # update and compile all existing translations |
|
8ae58eda9331
in addition to xpot...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2306
diff
changeset
|
3 |
|
8ae58eda9331
in addition to xpot...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2306
diff
changeset
|
4 # tool locations |
|
8ae58eda9331
in addition to xpot...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2306
diff
changeset
|
5 XPOT ?= xpot |
|
8ae58eda9331
in addition to xpot...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2306
diff
changeset
|
6 MSGFMT ?= msgfmt |
|
8ae58eda9331
in addition to xpot...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2306
diff
changeset
|
7 MSGMERGE ?= msgmerge |
|
8ae58eda9331
in addition to xpot...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2306
diff
changeset
|
8 XGETTEXT ?= xgettext |
|
6609
b6452b669720
Updates, python3, hg diff, add target doc, add pytest target
John Rouillard <rouilj@ieee.org>
parents:
6483
diff
changeset
|
9 PYTHON ?= python3 |
|
2330
8ae58eda9331
in addition to xpot...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2306
diff
changeset
|
10 |
|
8ae58eda9331
in addition to xpot...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2306
diff
changeset
|
11 TEMPLATE=roundup.pot |
|
2306
1421b19cd61b
build message template file
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
diff
changeset
|
12 |
|
4094
5a9631828e33
update message template file building:
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
3761
diff
changeset
|
13 PACKAGES=$(shell find ../roundup ../share/roundup/templates -name '*.py' \ |
|
3761
800bc51a9c8e
add template directories to the list of Python packages for message extraction
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
3593
diff
changeset
|
14 | sed -e 's,/[^/]*$$,,' | sort | uniq) |
|
2330
8ae58eda9331
in addition to xpot...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2306
diff
changeset
|
15 SOURCES=$(PACKAGES:=/*.py) |
|
8ae58eda9331
in addition to xpot...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2306
diff
changeset
|
16 PO_FILES=$(wildcard *.po) |
|
8ae58eda9331
in addition to xpot...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2306
diff
changeset
|
17 MO_FILES=$(PO_FILES:.po=.mo) |
|
6222
2c0f7f16ce04
Check that build link is present otherwise abort.
John Rouillard <rouilj@ieee.org>
parents:
4570
diff
changeset
|
18 PYTHON_BUILD=../build/lib |
|
2c0f7f16ce04
Check that build link is present otherwise abort.
John Rouillard <rouilj@ieee.org>
parents:
4570
diff
changeset
|
19 RUN_PYTHON=PYTHONPATH=$(PYTHON_BUILD) $(PYTHON) -O |
|
2330
8ae58eda9331
in addition to xpot...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2306
diff
changeset
|
20 |
|
2455
ece6ed48dd3d
by default, build binary message catalogs only...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2384
diff
changeset
|
21 all: dist |
|
ece6ed48dd3d
by default, build binary message catalogs only...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2384
diff
changeset
|
22 |
|
ece6ed48dd3d
by default, build binary message catalogs only...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2384
diff
changeset
|
23 help: |
|
ece6ed48dd3d
by default, build binary message catalogs only...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2384
diff
changeset
|
24 @echo "$(MAKE) - build MO files. Run this before sdist" |
|
6618
ebd8f962fbf1
Fix make help. Missing close quotes.
John Rouillard <rouilj@ieee.org>
parents:
6609
diff
changeset
|
25 @echo "$(MAKE) dist - same as above" |
|
2455
ece6ed48dd3d
by default, build binary message catalogs only...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2384
diff
changeset
|
26 @echo "$(MAKE) template - update message template from sources" |
|
6609
b6452b669720
Updates, python3, hg diff, add target doc, add pytest target
John Rouillard <rouilj@ieee.org>
parents:
6483
diff
changeset
|
27 @echo "$(MAKE) diff - see template differences in vi" |
|
6618
ebd8f962fbf1
Fix make help. Missing close quotes.
John Rouillard <rouilj@ieee.org>
parents:
6609
diff
changeset
|
28 @echo "$(MAKE) pytest - create locale files to run pytest" |
|
2455
ece6ed48dd3d
by default, build binary message catalogs only...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2384
diff
changeset
|
29 @echo "$(MAKE) locale.po - update message file from template" |
|
ece6ed48dd3d
by default, build binary message catalogs only...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2384
diff
changeset
|
30 @echo "$(MAKE) locale.mo - compile individual message file" |
|
6618
ebd8f962fbf1
Fix make help. Missing close quotes.
John Rouillard <rouilj@ieee.org>
parents:
6609
diff
changeset
|
31 @echo "$(MAKE) help - this text" |
|
2330
8ae58eda9331
in addition to xpot...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2306
diff
changeset
|
32 |
|
2455
ece6ed48dd3d
by default, build binary message catalogs only...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2384
diff
changeset
|
33 # This will rebuild all MO files without updating their corresponding PO |
|
ece6ed48dd3d
by default, build binary message catalogs only...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2384
diff
changeset
|
34 # files first. Run before creating Roundup distribution (hence the name). |
|
ece6ed48dd3d
by default, build binary message catalogs only...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2384
diff
changeset
|
35 # PO files should be updated by their translators only, automatic update |
|
ece6ed48dd3d
by default, build binary message catalogs only...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2384
diff
changeset
|
36 # adds unwanted fuzzy labels. |
|
ece6ed48dd3d
by default, build binary message catalogs only...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2384
diff
changeset
|
37 dist: |
|
ece6ed48dd3d
by default, build binary message catalogs only...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2384
diff
changeset
|
38 for file in $(PO_FILES); do \ |
|
ece6ed48dd3d
by default, build binary message catalogs only...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2384
diff
changeset
|
39 ${MSGFMT} -o `basename $$file .po`.mo $$file; \ |
|
ece6ed48dd3d
by default, build binary message catalogs only...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2384
diff
changeset
|
40 done |
|
2306
1421b19cd61b
build message template file
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
diff
changeset
|
41 |
|
2455
ece6ed48dd3d
by default, build binary message catalogs only...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2384
diff
changeset
|
42 template: |
|
6609
b6452b669720
Updates, python3, hg diff, add target doc, add pytest target
John Rouillard <rouilj@ieee.org>
parents:
6483
diff
changeset
|
43 test -d $(PYTHON_BUILD) || (echo "Missing build directory $(PYTHON_BUILD). ln -s lib to build library"; exit 1) |
|
2459
fd04f41ab988
fix: 'template' target was meant to make 'roundup.pot' file
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2455
diff
changeset
|
44 ${XPOT} -n -o $(TEMPLATE) $(SOURCES) |
|
6222
2c0f7f16ce04
Check that build link is present otherwise abort.
John Rouillard <rouilj@ieee.org>
parents:
4570
diff
changeset
|
45 |
|
2459
fd04f41ab988
fix: 'template' target was meant to make 'roundup.pot' file
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2455
diff
changeset
|
46 ${RUN_PYTHON} ../roundup/cgi/TAL/talgettext.py -u $(TEMPLATE) \ |
|
4094
5a9631828e33
update message template file building:
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
3761
diff
changeset
|
47 ../share/roundup/templates/classic/html/*.html \ |
|
6405
a21b574554c3
extract translatable strings from devel and responsive templates
John Rouillard <rouilj@ieee.org>
parents:
6222
diff
changeset
|
48 ../share/roundup/templates/devel/html/*.html \ |
|
a21b574554c3
extract translatable strings from devel and responsive templates
John Rouillard <rouilj@ieee.org>
parents:
6222
diff
changeset
|
49 ../share/roundup/templates/minimal/html/*.html \ |
|
a21b574554c3
extract translatable strings from devel and responsive templates
John Rouillard <rouilj@ieee.org>
parents:
6222
diff
changeset
|
50 ../share/roundup/templates/responsive/html/*.html |
|
2330
8ae58eda9331
in addition to xpot...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2306
diff
changeset
|
51 ${XGETTEXT} -j -w 80 -F \ |
|
8ae58eda9331
in addition to xpot...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2306
diff
changeset
|
52 --msgid-bugs-address=roundup-devel@lists.sourceforge.net \ |
|
8ae58eda9331
in addition to xpot...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2306
diff
changeset
|
53 --copyright-holder="See Roundup README.txt" \ |
|
2459
fd04f41ab988
fix: 'template' target was meant to make 'roundup.pot' file
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2455
diff
changeset
|
54 -o $(TEMPLATE) $(SOURCES) |
|
2330
8ae58eda9331
in addition to xpot...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2306
diff
changeset
|
55 |
|
6609
b6452b669720
Updates, python3, hg diff, add target doc, add pytest target
John Rouillard <rouilj@ieee.org>
parents:
6483
diff
changeset
|
56 pytest local_install: dist |
| 6480 | 57 for file in $(MO_FILES); do \ |
|
6483
9730eff21de3
Remove verbose from local_install. Cleanup log.
John Rouillard <rouilj@ieee.org>
parents:
6480
diff
changeset
|
58 lang=`basename $$file .mo`; \ |
| 6480 | 59 mkdir -p locale/$$lang/LC_MESSAGES; \ |
| 60 cp $$file locale/$$lang/LC_MESSAGES/roundup.mo; \ | |
| 61 done | |
| 62 | |
|
3578
782287e01b99
added template diff target: view changes in message strings
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2459
diff
changeset
|
63 # helps to check template file before check in |
|
782287e01b99
added template diff target: view changes in message strings
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2459
diff
changeset
|
64 diff: |
|
6609
b6452b669720
Updates, python3, hg diff, add target doc, add pytest target
John Rouillard <rouilj@ieee.org>
parents:
6483
diff
changeset
|
65 hg diff roundup.pot|grep -v '^[-+]#'| vi -Rv - |
|
3578
782287e01b99
added template diff target: view changes in message strings
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2459
diff
changeset
|
66 |
|
2330
8ae58eda9331
in addition to xpot...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2306
diff
changeset
|
67 %.po: $(TEMPLATE) |
|
3593
3d9e1906ba58
don't wrap po files at position 72
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
3578
diff
changeset
|
68 ${MSGMERGE} -U --suffix=.bak $@ $< |
|
2330
8ae58eda9331
in addition to xpot...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2306
diff
changeset
|
69 |
|
8ae58eda9331
in addition to xpot...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2306
diff
changeset
|
70 %.mo: %.po |
|
2342
106737dbe689
show statistics for message catalogs
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2330
diff
changeset
|
71 ${MSGFMT} --statistics -o $@ $< |
