Imaginer/po/update-pot.sh
Sabri Ünal f2b847cf2b po: Fix update-pot.sh
- Fix language listing error
- Fix some ui files missing error
2023-10-07 16:36:28 +03:00

11 lines
646 B
Bash

#!/bin/bash
po_dir=$(dirname "$(realpath "$0")")
xgettext --files-from="$po_dir"/POTFILES --output="$po_dir"/Imaginer.pot --add-comments --keyword=_ --keyword=C_:1c,2
sed -i "s/SOME DESCRIPTIVE TITLE./Imaginer POT file/" "$po_dir"/Imaginer.pot
sed -i "s/YEAR THE PACKAGE'S COPYRIGHT HOLDER/$(date +%Y) Imaginer/" "$po_dir"/Imaginer.pot
sed -i "s@same license as the PACKAGE package.@GNU GPLv3 license.@" "$po_dir"/Imaginer.pot
sed -i "s/FIRST AUTHOR <EMAIL@ADDRESS>, YEAR./Imaginer, $(date +%Y)./" "$po_dir"/Imaginer.pot
regex="$po_dir/([a-zA-Z_]*).po"
find "$po_dir" -type f -name "*.po" | sort | sed 's|.*/\(.*\)\.po$|\1|' > "$po_dir/LINGUAS"