Use a loop to go over files instead of passing them all in as arguments so that we don't go over the argument size limit.

CURA-9814
This commit is contained in:
Joey de l'Arago 2023-01-16 15:50:19 +01:00
parent 20778f3d10
commit d24bd3f979

View file

@ -9,5 +9,14 @@
#
dir=$1
dest=$2
xgettext --from-code=UTF-8 --language=python -ki18n:1 -ki18nc:1c,2 -ki18np:1,2 -ki18ncp:1c,2,3 -o $dest $(find -L "$dir" -name \*.py)
xgettext --from-code=UTF-8 --join-existing --language=javascript -ki18n:1 -ki18nc:1c,2 -ki18np:1,2 -ki18ncp:1c,2,3 -o $dest $(find -L "$dir" -name \*.qml)
for f in $(find -L "$dir" -name \*.py)
do
echo "Extracting strings from python file: $f"
xgettext --from-code=UTF-8 --language=python -ki18n:1 -ki18nc:1c,2 -ki18np:1,2 -ki18ncp:1c,2,3 -o $dest $f
done
for f in $(find -L "$dir" -name \*.qml)
do
echo "Extracting strings from qml file: $f"
xgettext --from-code=UTF-8 --join-existing --language=javascript -ki18n:1 -ki18nc:1c,2 -ki18np:1,2 -ki18ncp:1c,2,3 -o $dest $f
done