Making mo files
This commit is contained in:
parent
a253dac52d
commit
830278caaf
|
@ -90,10 +90,17 @@ function install_translations {
|
||||||
do
|
do
|
||||||
# convert json to mo
|
# convert json to mo
|
||||||
if [ -f /usr/bin/i18next-conv ]; then
|
if [ -f /usr/bin/i18next-conv ]; then
|
||||||
|
if [ ! -f locale/${lang}/${COMMAND_NAME}.mo ]; then
|
||||||
if [ -f locale/${lang}/${COMMAND_NAME}.json ]; then
|
if [ -f locale/${lang}/${COMMAND_NAME}.json ]; then
|
||||||
i18next-conv -l ${lang} -s locale/${lang}/${COMMAND_NAME}.json -t /usr/share/locale/${lang}/${COMMAND_NAME}.mo
|
i18next-conv -l ${lang} -s locale/${lang}/${COMMAND_NAME}.json -t locale/${lang}/${COMMAND_NAME}.mo
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# install the mo
|
||||||
|
if [ -f locale/${lang}/${COMMAND_NAME}.mo ]; then
|
||||||
|
cp locale/${lang}/${COMMAND_NAME}.mo /usr/share/locale/${lang}/${COMMAND_NAME}.mo
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue