Added mo-po converter, added pot-po converter

This commit is contained in:
Alexey Berezhok
2024-08-29 23:48:14 +03:00
parent 3a964e54b1
commit 7912c29bb5
43 changed files with 52823 additions and 3 deletions

20
web/locale/hst_convert_mo2po.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
if [ ! -e /usr/bin/xgettext ]; then
echo " **********************************************************"
echo " * Unable to find xgettext please install gettext package *"
echo " **********************************************************"
exit 3
fi
lang=${1-all}
if [ "$lang" == "all" ]; then
languages=$(ls -d ./*/ | awk -F'/' '{print $(NF-1)}')
for lang in $languages; do
echo "[ * ] Update $lang "
msgunfmt "$lang/LC_MESSAGES/hestiacp.mo" -o "$lang/LC_MESSAGES/hestiacp.po"
done
else
echo "[ * ] Update $lang "
msgunfmt "$lang/LC_MESSAGES/hestiacp.mo" -o "$lang/LC_MESSAGES/hestiacp.po"
fi