Commit e3661520 authored by Franco Fichtner's avatar Franco Fichtner

lang: add mechanism to clean machine translation files

parent 75eec228
...@@ -24,13 +24,15 @@ PAGER?= less ...@@ -24,13 +24,15 @@ PAGER?= less
all: all:
@cat ${.CURDIR}/README.md | ${PAGER} @cat ${.CURDIR}/README.md | ${PAGER}
.for LANG in ${LANGUAGES} .for LANG in ${LANGUAGES}
${LANG}DIR= ${LOCALEDIR:S/%%LANG%%/${LANG}/g} ${LANG}DIR= ${LOCALEDIR:S/%%LANG%%/${LANG}/g}
install-${LANG}: install-${LANG}:
@mkdir -p ${DESTDIR}${${LANG}DIR} @mkdir -p ${DESTDIR}${${LANG}DIR}
${MSGFMT} -o ${DESTDIR}${${LANG}DIR}/OPNsense.mo ${LANG}.po ${MSGFMT} -o ${DESTDIR}${${LANG}DIR}/OPNsense.mo ${LANG}.po
clean-${LANG}:
@rm -f ${DESTDIR}${${LANG}DIR}/OPNsense.mo
plist-${LANG}: plist-${LANG}:
@echo ${${LANG}DIR}/OPNsense.mo @echo ${${LANG}DIR}/OPNsense.mo
...@@ -40,6 +42,7 @@ merge-${LANG}: ...@@ -40,6 +42,7 @@ merge-${LANG}:
sed -i '' -e '/^#~.*/d' ${LANG}.po sed -i '' -e '/^#~.*/d' ${LANG}.po
INSTALL+= install-${LANG} INSTALL+= install-${LANG}
CLEAN+= clean-${LANG}
PLIST+= plist-${LANG} PLIST+= plist-${LANG}
MERGE+= merge-${LANG} MERGE+= merge-${LANG}
.endfor .endfor
...@@ -54,6 +57,7 @@ ${TEMPLATE}: ...@@ -54,6 +57,7 @@ ${TEMPLATE}:
template: ${TEMPLATE} template: ${TEMPLATE}
install: ${INSTALL} install: ${INSTALL}
clean: ${CLEAN}
plist: ${PLIST} plist: ${PLIST}
merge: ${MERGE} merge: ${MERGE}
......
...@@ -19,4 +19,8 @@ Merge the latest template changes into the actual translations: ...@@ -19,4 +19,8 @@ Merge the latest template changes into the actual translations:
# make merge # make merge
Remove the compiled translation files from the system/chroot:
# make clean
The build system will automatically pick up all registered languages. The build system will automatically pick up all registered languages.
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