fetch-translations.sh 797 B

1234567891011121314151617181920
  1. # Delete old translation files (except "en" which is the source translation)
  2. find ../wagtail -iname *.po ! -iwholename */en/* -delete
  3. # Fetch new translations from transifex
  4. tx pull -a --minimum-perc=30
  5. # Clean the PO files using msgattrib
  6. # This removes the following:
  7. # - Blank, fuzzy and obsolete translations
  8. # - The line numbers above each translation
  9. # These things are only needed by translators (which they won't be seen by) and make the translation updates difficult to check
  10. find ../wagtail -iname *.po ! -iwholename */en/* -exec msgattrib --translated --no-fuzzy --no-obsolete --no-location -o {} {} \;
  11. # Run compilemessages on each app
  12. for d in $(find ../wagtail -iname *.po | sed 's|\(.*\)/locale.*|\1|' | sort -u);
  13. do
  14. pushd $d
  15. django-admin compilemessages
  16. popd
  17. done