-
Notifications
You must be signed in to change notification settings - Fork 58
/
Makefile
45 lines (34 loc) · 1.98 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
SRC_DIR = .
DOCS_DIR = docs
.PHONY: all docs pot get-translations help update-translations
all: help
docs:
# The following creates the HTML docs.
# NOTE: cd and make must be in the same line.
cd ${DOCS_DIR}; make SPHINXOPTS="-W -q" html
pot:
cd ${SRC_DIR}/po; ./intltool-update --pot
get-translations:
ssh pootletranslations ". /var/www/sites/pootle/env/bin/activate; python /var/www/sites/pootle/src/manage.py sync_stores --verbosity=3 --project=virtaal --overwrite"
rsync -az --delete --exclude="README" --exclude="LINGUAS*" --exclude="Makevars" --exclude="intltool-update" --exclude="testlocalisations" --exclude="POTFILES.*" --exclude=".translation_index" --exclude=pootle-terminology.po pootletranslations:/var/www/sites/pootle/translations/virtaal/ ${SRC_DIR}/po
po/%.po: po/virtaal.pot
cd ${SRC_DIR}/po; ./intltool-update $(*F)
update-translations: ${SRC_DIR}/po/*.po
publish-pot:
scp ${SRC_DIR}/po/virtaal.pot pootletranslations:/var/www/sites/pootle/translations/virtaal/
ssh pootletranslations ". /var/www/sites/pootle/env/bin/activate; python /var/www/sites/pootle/src/manage.py update_stores --verbosity=3 --project=virtaal --language=templates"
publish-translations:
scp ${SRC_DIR}/po/*.po pootletranslations:/var/www/sites/pootle/translations/virtaal/
ssh pootletranslations ". /var/www/sites/pootle/env/bin/activate; python /var/www/sites/pootle/src/manage.py update_stores --verbosity=3 --project=virtaal; python /var/www/sites/pootle/src/manage.py update_translation_projects --verbosity=3 --project=virtaal"
help:
@echo
@echo "Help"
@echo "----"
@echo
@echo " docs - build Sphinx docs"
@echo " pot - update the POT translations templates"
@echo " get-translations - retrieve Pootle translations from server (requires ssh config for pootletranslations)"
@echo " update-translations - update *.po against virtaal.pot"
@echo " publish-translations - send all *.po to Pootle translations server"
@echo " publish-pot - send virtaal.pot to Pootle translations server"
@echo