Skip to content

Commit

Permalink
Refining scripts/update_locale.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
cvvergara committed Dec 16, 2024
1 parent 2cf087c commit 6e6ca33
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/scripts/update_locale.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,13 @@ cp build/docs/locale_changes_po.txt build/docs/locale_changes_po_pot.txt
perl -ne '/\/en\// && print' build/docs/locale_changes_po.txt | \
perl -pe 's/(.*)en\/LC_MESSAGES(.*)/$1pot$2t/' >> build/docs/locale_changes_po_pot.txt # .pot files

# Do not create empty translation files
git status locale/es --porcelain | awk 'match($1, "?"){print $2}' | xargs -r rm -rf
git status locale/ja --porcelain | awk 'match($1, "?"){print $2}' | xargs -r rm -rf

# Remove obsolete entries #~ from .po files
bash .github/scripts/remove_obsolete_entries.sh

while read -r f; do git add "$f"; done < build/docs/locale_changes_po_pot.txt
cat build/docs/locale_changes_po_pot.txt | xargs -I {} sh -c "(ls {} >> /dev/null 2>&1 && git add {} )"

popd > /dev/null || exit 1

0 comments on commit 6e6ca33

Please sign in to comment.