ogclient/misc/update_translations.sh

20 lines
580 B
Bash

#!/usr/bin/env bash
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
translations_dir="$script_dir/../src/kiosk/translations"
kiosk_dir="$script_dir/../src/kiosk"
# Update all .ts files in the translations directory
for ts_file in "$kiosk_dir"/translations/*.ts; do
if [[ -f $ts_file ]]; then
echo "Updating translations in: $ts_file"
pylupdate6 "$kiosk_dir"/*.py --verbose --no-obsolete -ts "$ts_file"
else
echo "No .ts files found in the translations directory."
exit 1
fi
done
echo "All translations have been updated"