Fixed potfile update script

This commit is contained in:
ArtyIF 2022-07-30 07:17:50 +03:00
parent 4a0249f88f
commit 36d7b15a34
3 changed files with 5 additions and 8 deletions

View file

@ -1,14 +1,14 @@
# Adwaita Manager POT file
# Copyright (C) 2022 Adwaita Manager Team
# This file is distributed under the MIT/X11 license.
# Artyom Fomin <artyomisflash@mail.ru>, 2022.
# Adwaita Manager Team, 2022.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-07-29 17:11+0300\n"
"POT-Creation-Date: 2022-07-30 07:17+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View file

@ -1 +1,2 @@
ru
tr

View file

@ -4,11 +4,7 @@ xgettext -f "$po_dir"/POTFILES -o "$po_dir"/AdwCustomizer.pot --add-comments=Tra
sed -i "s/SOME DESCRIPTIVE TITLE./Adwaita Manager POT file/" "$po_dir"/AdwCustomizer.pot
sed -i "s/YEAR THE PACKAGE'S COPYRIGHT HOLDER/$(date +%Y) Adwaita Manager Team/" "$po_dir"/AdwCustomizer.pot
sed -i "s@same license as the PACKAGE package.@MIT/X11 license.@" "$po_dir"/AdwCustomizer.pot
sed -i "s/FIRST AUTHOR <EMAIL@ADDRESS>, YEAR./Artyom Fomin <artyomisflash@mail.ru>, $(date +%Y)./" "$po_dir"/AdwCustomizer.pot
sed -i "s/FIRST AUTHOR <EMAIL@ADDRESS>, YEAR./Adwaita Manager Team, $(date +%Y)./" "$po_dir"/AdwCustomizer.pot
regex="$po_dir/([a-zA-Z_]*).po"
po_files=$(find "$po_dir" -type f -name "*.po")
if [[ $po_files =~ $regex ]]
then
echo "${BASH_REMATCH[1]}" > "$po_dir"/LINGUAS
fi
find "$po_dir" -type f -name "*.po" | sed -rn "s:$regex:\1:p" > "$po_dir/LINGUAS"