2015-05-13 18:23:13 +02:00
|
|
|
# Delete old translation files (except "en" which is the source translation)
|
2023-01-20 13:35:45 +01:00
|
|
|
find ./wagtail -iname *.po ! -iwholename */en/* -delete
|
2015-05-13 18:23:13 +02:00
|
|
|
|
|
|
|
# Fetch new translations from transifex
|
2016-03-09 12:19:07 +01:00
|
|
|
tx pull -a --minimum-perc=1
|
2015-05-13 18:23:13 +02:00
|
|
|
|
|
|
|
# Clean the PO files using msgattrib
|
|
|
|
# This removes the following:
|
|
|
|
# - Blank, fuzzy and obsolete translations
|
|
|
|
# - The line numbers above each translation
|
|
|
|
# These things are only needed by translators (which they won't be seen by) and make the translation updates difficult to check
|
2023-01-20 13:35:45 +01:00
|
|
|
find ./wagtail -iname *.po ! -iwholename */en/* -exec msgattrib --translated --no-fuzzy --no-obsolete --no-location -o {} {} \;
|
2015-05-13 18:23:13 +02:00
|
|
|
|
2015-08-26 15:26:21 +02:00
|
|
|
# Run compilemessages on each app
|
2023-01-20 13:35:45 +01:00
|
|
|
for d in $(find ./wagtail -iname *.po | sed 's|\(.*\)/locale.*|\1|' | sort -u);
|
2015-05-13 18:23:13 +02:00
|
|
|
do
|
|
|
|
pushd $d
|
|
|
|
django-admin compilemessages
|
|
|
|
popd
|
|
|
|
done
|