From 36d7b15a34a1e5607f7c8b44e2a6b6081914b612 Mon Sep 17 00:00:00 2001 From: ArtyIF Date: Sat, 30 Jul 2022 07:17:50 +0300 Subject: [PATCH] Fixed potfile update script --- po/AdwCustomizer.pot | 4 ++-- po/LINGUAS | 1 + po/update_potfile.sh | 8 ++------ 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/po/AdwCustomizer.pot b/po/AdwCustomizer.pot index d594d3f1..93b8d0ff 100644 --- a/po/AdwCustomizer.pot +++ b/po/AdwCustomizer.pot @@ -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 , 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 \n" "Language-Team: LANGUAGE \n" diff --git a/po/LINGUAS b/po/LINGUAS index 562ba4cf..335fcf0d 100644 --- a/po/LINGUAS +++ b/po/LINGUAS @@ -1 +1,2 @@ ru +tr diff --git a/po/update_potfile.sh b/po/update_potfile.sh index e0c384b8..b20cc2c9 100755 --- a/po/update_potfile.sh +++ b/po/update_potfile.sh @@ -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 , YEAR./Artyom Fomin , $(date +%Y)./" "$po_dir"/AdwCustomizer.pot +sed -i "s/FIRST AUTHOR , 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 \ No newline at end of file +find "$po_dir" -type f -name "*.po" | sed -rn "s:$regex:\1:p" > "$po_dir/LINGUAS" \ No newline at end of file