19 lines
381 B
Makefile
19 lines
381 B
Makefile
|
DEFAULT_DOMAIN = editor
|
||
|
POT_FILE = po/$(DEFAULT_DOMAIN).pot
|
||
|
LINGUAS = es
|
||
|
JSON_FILES = $(patsubst %,web/static/%.json,$(LINGUAS))
|
||
|
|
||
|
locales: $(JSON_FILES)
|
||
|
|
||
|
po/%.po: $(POT_FILE)
|
||
|
msgmerge --no-wrap --update --backup=off $@ $<
|
||
|
|
||
|
web/static/%.json: po/%.po
|
||
|
npx po2json --format jed1.x $< $@
|
||
|
|
||
|
$(POT_FILE):
|
||
|
wp i18n make-pot . $@ --ignore-domain --include=editor,po/src
|
||
|
|
||
|
|
||
|
.PHONY: locales
|