2022-07-25 14:35:40 +00:00
|
|
|
#!/bin/bash
|
|
|
|
po_dir=$(dirname "$(realpath "$0")")
|
2022-07-29 18:09:07 +00:00
|
|
|
xgettext -f "$po_dir"/POTFILES -o "$po_dir"/AdwCustomizer.pot --add-comments=Translators --keyword=_ --keyword=C_1c,2 --from-code=UTF-8
|
2022-08-15 23:30:05 +00:00
|
|
|
sed -i "s/SOME DESCRIPTIVE TITLE./Gradience POT file/" "$po_dir"/AdwCustomizer.pot
|
|
|
|
sed -i "s/YEAR THE PACKAGE'S COPYRIGHT HOLDER/$(date +%Y) Gradience Team/" "$po_dir"/AdwCustomizer.pot
|
2022-08-12 09:28:57 +00:00
|
|
|
sed -i "s@same license as the PACKAGE package.@GNU GPLv3 license.@" "$po_dir"/AdwCustomizer.pot
|
2022-08-15 23:30:05 +00:00
|
|
|
sed -i "s/FIRST AUTHOR <EMAIL@ADDRESS>, YEAR./Gradience Team, $(date +%Y)./" "$po_dir"/AdwCustomizer.pot
|
2022-07-29 13:46:52 +00:00
|
|
|
|
|
|
|
regex="$po_dir/([a-zA-Z_]*).po"
|
2022-08-15 23:30:05 +00:00
|
|
|
find "$po_dir" -type f -name "*.po" | sed -rn "s:$regex:\1:p" > "$po_dir/LINGUAS"
|