forked from jmichault/motioneye.eo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (39 loc) · 1.82 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
all: motioneye/locale/??/LC_MESSAGES/motioneye.mo \
motioneye/static/js/motioneye.??.json
%.mo: %.po
msgfmt -f $*.po -o $*.mo
%/motioneye.po: motioneye/locale/motioneye.pot
msgmerge --no-wrap -N -U $@ $<
l10n/traduki_po.sh $@
motioneye/static/js/motioneye.%.json : motioneye/locale/%/LC_MESSAGES/motioneye.js.po
l10n/po2json motioneye/locale/$*/LC_MESSAGES/motioneye.js.po motioneye/static/js/motioneye.$*.json
%/motioneye.js.po: motioneye/locale/motioneye.js.pot
msgmerge --no-wrap -N -U $@ $<
l10n/traduki_po.sh $@
motioneye/locale/motioneye.js.pot : motioneye/static/js/*.js
xgettext --from-code=UTF-8 --no-wrap -o motioneye/locale/motioneye.js.pot motioneye/static/js/*.js
motioneye/locale/motioneye.pot : motioneye/*.py motioneye/templates/*.html
pybabel extract -F l10n/babel.cfg -o motioneye/locale/motioneye.pot motioneye/
#####
# regulo por krei novan tradukon
# ekz. : uzi "make initro" por krei la rumana traduko.
#####
init%:
mkdir motioneye/locale/$*
mkdir motioneye/locale/$*/LC_MESSAGES
msginit --no-wrap --input motioneye/locale/motioneye.js.pot --output motioneye/locale/$*.js.tmp -l$* --no-translator
l10n/traduki_po.sh motioneye/locale/$*.js.tmp
mv motioneye/locale/$*.js.tmp motioneye/locale/$*/LC_MESSAGES/motioneye.js.po
make motioneye/static/js/motioneye.$*.json
msginit --no-wrap --input motioneye/locale/motioneye.pot --output motioneye/locale/$*.tmp -l$* --no-translator
l10n/traduki_po.sh motioneye/locale/$*.tmp
mv motioneye/locale/$*.tmp motioneye/locale/$*/LC_MESSAGES/motioneye.po
make motioneye/locale/$*/LC_MESSAGES/motioneye.mo
#
# msgattrib --set-fuzzy --clear-obsolete --no-wrap locale/$*.tmp -o locale/$*/LC_MESSAGES/motioneye.po
traduki :
find motioneye/locale -name "*.po" -exec l10n/traduki_po.sh {} \;
dist :
rm -rf build dist
python3 -m build
twine upload --repository testpypi dist/*