Files
noVNC/po/Makefile
Pierre Ossman 3328675b44 Clarify which Chinese translation we have
Chinese has several writing systems so we need to be clear which one
our translation covers. The one we currently have is for Traditional
Chinese so make sure it uses the matching language tag.
2018-04-03 14:51:12 +02:00

36 lines
905 B
Makefile

all:
.PHONY: update-po update-js update-pot
LINGUAS := de el es nl pl sv tr zh_TW
VERSION := $(shell grep '"version"' ../package.json | cut -d '"' -f 4)
POFILES := $(addsuffix .po,$(LINGUAS))
JSONFILES := $(addprefix ../app/locale/,$(addsuffix .json,$(LINGUAS)))
update-po: $(POFILES)
update-js: $(JSONFILES)
%.po: noVNC.pot
msgmerge --update --lang=$* $@ $<
../app/locale/%.json: %.po
./po2js $< $@
update-pot:
xgettext --output=noVNC.js.pot \
--copyright-holder="Various Authors" \
--package-name="noVNC" \
--package-version="$(VERSION)" \
--msgid-bugs-address="novnc@googlegroups.com" \
--add-comments=TRANSLATORS: \
--from-code=UTF-8 \
--sort-by-file \
../app/*.js \
../core/*.js \
../core/input/*.js
./xgettext-html --output=noVNC.html.pot \
../vnc.html
msgcat --output-file=noVNC.pot \
--sort-by-file noVNC.js.pot noVNC.html.pot
rm -f noVNC.js.pot noVNC.html.pot