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 ...@@ -4,12 +4,15 @@ _XGETTEXT!= which xgettext || echo true
XGETTEXT= ${_XGETTEXT} -L PHP --from-code=UTF-8 -F --strict --debug XGETTEXT= ${_XGETTEXT} -L PHP --from-code=UTF-8 -F --strict --debug
_MSGFMT!= which msgfmt || echo true _MSGFMT!= which msgfmt || echo true
MSGFMT= ${_MSGFMT} --strict MSGFMT= ${_MSGFMT} --strict
_MSGMERGE!= which msgmerge || echo true
MSGMERGE= ${_MSGMERGE} -U --backup=off
LOCALEDIR= /usr/local/share/locale/%%LANG%%/LC_MESSAGES LOCALEDIR= /usr/local/share/locale/%%LANG%%/LC_MESSAGES
LANGUAGES= de_DE es_CO fr_FR ja_JP zh_CN LANGUAGES= de_DE es_CO fr_FR ja_JP zh_CN
TEMPLATE= en_US TEMPLATE= en_US
INSTALL= INSTALL=
MERGE=
PLIST= PLIST=
.for LANG in ${LANGUAGES} .for LANG in ${LANGUAGES}
...@@ -21,8 +24,12 @@ install-${LANG}: ...@@ -21,8 +24,12 @@ install-${LANG}:
plist-${LANG}: plist-${LANG}:
@echo ${${LANG}DIR}/OPNsense.mo @echo ${${LANG}DIR}/OPNsense.mo
merge-${LANG}:
${MSGMERGE} ${LANG}.po ${TEMPLATE}.pot
INSTALL+= install-${LANG} INSTALL+= install-${LANG}
PLIST+= plist-${LANG} PLIST+= plist-${LANG}
MERGE+= merge-${LANG}
.endfor .endfor
${TEMPLATE}: ${TEMPLATE}:
...@@ -33,8 +40,9 @@ ${TEMPLATE}: ...@@ -33,8 +40,9 @@ ${TEMPLATE}:
template: ${TEMPLATE} template: ${TEMPLATE}
install: ${INSTALL} install: ${INSTALL}
plist: ${PLIST} plist: ${PLIST}
merge: ${MERGE}
dynamic: dynamic:
@${.CURDIR}/dynamic/collect.py ${.CURDIR}/.. @${.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