1
0
Fork 0
gnome-shell-extensions-extra/extensions/48/just-perfection/scripts/update-pot.sh
Daniel Baumann 16d75ef64d
Adding upstream version 20250212.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-02-12 16:21:01 +01:00

34 lines
762 B
Bash
Executable file

#!/bin/bash
# Script to update main.pot and *.po files
#
# This Script is released under GPL v3 license
# Copyright (C) 2020-2025 Javad Rahmatzadeh
set -e
# cd to the repo root
cd "$( cd "$( dirname "$0" )" && pwd )/.."
find -name *.ui -o -name *.js | xargs \
xgettext \
--from-code=UTF-8 \
--copyright-holder="Just Perfection" \
--package-name="Just Perfection" \
--package-version="3" \
--output="po/main.pot"
for file in po/*.po
do
echo -n "Updating $(basename "$file" .po)"
msgmerge -U "$file" po/main.pot
if grep --silent "#, fuzzy" "$file"; then
fuzzy+=("$(basename "$file" .po)")
fi
done
if [[ -v fuzzy ]]; then
echo "WARNING: Translations have unclear strings and need an update: ${fuzzy[*]}"
fi