-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
27 lines (23 loc) · 858 Bytes
/
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
TEMPLATE = api.pot
POFILES = $(wildcard *.po)
all: update merge
# Update the translations template with updated API strings.
update:
@cd ..; \
python3 tools/scripts/extract_api_strings.py \
--path docs modules/*/docs \
--output translations/$(TEMPLATE)
# Merge changes in the translations template with each translation file.
merge:
@echo "Merging changes."
@for po in $(POFILES); do \
echo "Merging changes into: $$po"; \
msgmerge -w 79 -C $$po $$po $(TEMPLATE) > "$$po".new; \
mv -f "$$po".new $$po; \
msgattrib --output-file=$$po --no-obsolete $$po; \
done
check:
@for po in $(POFILES); do \
echo "Checking: $$po"; \
msgfmt -c $$po -o /dev/null; \
done