Commit e4b5672e authored by Franco Fichtner's avatar Franco Fichtner

lang: add a merge target to update from template; #301

parent feaba402
......@@ -4,12 +4,15 @@ _XGETTEXT!= which xgettext || echo true
XGETTEXT= ${_XGETTEXT} -L PHP --from-code=UTF-8 -F --strict --debug
_MSGFMT!= which msgfmt || echo true
MSGFMT= ${_MSGFMT} --strict
_MSGMERGE!= which msgmerge || echo true
MSGMERGE= ${_MSGMERGE} -U --backup=off
LOCALEDIR= /usr/local/share/locale/%%LANG%%/LC_MESSAGES
LANGUAGES= de_DE es_CO fr_FR ja_JP zh_CN
TEMPLATE= en_US
INSTALL=
MERGE=
PLIST=
.for LANG in ${LANGUAGES}
......@@ -21,8 +24,12 @@ install-${LANG}:
plist-${LANG}:
@echo ${${LANG}DIR}/OPNsense.mo
merge-${LANG}:
${MSGMERGE} ${LANG}.po ${TEMPLATE}.pot
INSTALL+= install-${LANG}
PLIST+= plist-${LANG}
MERGE+= merge-${LANG}
.endfor
${TEMPLATE}:
......@@ -33,8 +40,9 @@ ${TEMPLATE}:
template: ${TEMPLATE}
install: ${INSTALL}
plist: ${PLIST}
merge: ${MERGE}
dynamic:
@${.CURDIR}/dynamic/collect.py ${.CURDIR}/..
.PHONY: ${INSTALL} ${PLIST} ${TEMPLATE} dynamic
.PHONY: ${INSTALL} ${PLIST} ${MERGE} ${TEMPLATE} dynamic
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment