ci: use action-update-pot instead of run.

Signed-off-by: 0xMRTT <0xMRTT@tuta.io>
This commit is contained in:
0xMRTT 2022-08-13 16:51:08 +02:00 committed by GitHub
parent 64b9038385
commit 54d875d706
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,15 +18,12 @@ jobs:
uses: actions/checkout@v3
- name: Update .pot
run: |
#!/bin/bash
po_dir=$(dirname "$(realpath "$0")")
xgettext -f "$po_dir"/POTFILES -o "$po_dir"/AdwCustomizer.pot --add-comments=Translators --keyword=_ --keyword=C_1c,2 --from-code=UTF-8
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.@GNU GPLv3 license.@" "$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"
find "$po_dir" -type f -name "*.po" | sed -rn "s:$regex:\1:p" > "$po_dir/LINGUAS"
uses: AdwCustomizerTeam/action-update-po@main
with:
title: "Adwaita Manager POT file"
copyright: "Adwaita Manager Team"
license: "GNU GPLv3"
author: "Adwaita Manager Team"
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}