1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-06 22:10:53 +00:00

[po] meson target update-po

This commit is contained in:
Witold Filipczyk 2022-10-09 17:24:08 +02:00
parent 1140727fae
commit 36b08e69d1
2 changed files with 18 additions and 0 deletions

View File

@ -9,3 +9,6 @@ endif
check_po_sh = find_program('check_po.sh')
run_target('check-po', command:[check_po_sh])
update_po_sh = find_program('update_po.sh')
run_target('update-po', command:[update_po_sh])

15
po/update_po.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
SRC=$(dirname -- ${BASH_SOURCE[0]})
for po in "$SRC"/*.po
do
lang=$(basename $po .po)
echo -n "$lang"
if $(msgmerge "$SRC/$lang.po" "$SRC/elinks.pot" -o "$lang.new.po"); then
mv -f "$lang.new.po" "$SRC/$lanf.po"
else
echo "msgmerge failed!"
rm -f "$lang.new.po"
fi
done