Only download nearly finished translated files
The daily "Imported Translations from Transifex" patch includes all po files, even the ones that are completely untranslated or only have a partial translation. There's no real need for these files. Therefore, only download files that are at least 75 per cent translated. There is one exception: For openstack-manuals the common directory contains many files where only a few need to be translated - so allow here 8 per cent translation. This currently downloads the Japanese and French files and thus covers the languages that we need. Partial-Bug: #1317794 Change-Id: I763c21768e3876aaaf4734bf2d769de20b49ff42
This commit is contained in:
parent
fa59ac7351
commit
017c4505b4
@ -46,8 +46,10 @@ if [ ! -d .tx ] ; then
|
||||
fi
|
||||
tx set --auto-local -r ${PROJECT}.${PROJECT}-translations "${PROJECT}/locale/<lang>/LC_MESSAGES/${PROJECT}.po" --source-lang en --source-file ${PROJECT}/locale/${PROJECT}.pot -t PO --execute
|
||||
|
||||
# Pull all upstream translations
|
||||
tx pull -a -f
|
||||
# Pull upstream translations of files that are at least 75 %
|
||||
# translated
|
||||
tx pull -a -f --minimum-perc=75
|
||||
|
||||
# Update the .pot file
|
||||
python setup.py extract_messages
|
||||
PO_FILES=`find ${PROJECT}/locale -name '*.po'`
|
||||
|
@ -58,8 +58,9 @@ tx set --auto-local -r ${PROJECT}.openstack-dashboard-translations \
|
||||
"openstack_dashboard/locale/<lang>/LC_MESSAGES/django.po" --source-lang en \
|
||||
--source-file openstack_dashboard/locale/en/LC_MESSAGES/django.po -t PO --execute
|
||||
|
||||
# Pull all upstream translations
|
||||
tx pull -a -f
|
||||
# Pull upstream translations of files that are at least 75 %
|
||||
# translated
|
||||
tx pull -a -f --minimum-perc=75
|
||||
|
||||
# Invoke run_tests.sh to update the po files
|
||||
# Or else, "../manage.py makemessages" can be used.
|
||||
|
@ -82,8 +82,18 @@ do
|
||||
fi
|
||||
done
|
||||
|
||||
# Pull all upstream translations
|
||||
tx pull -a -f
|
||||
# Pull upstream translations of files that are at least 75 %
|
||||
# translated
|
||||
tx pull -a -f --minimum-perc=75
|
||||
|
||||
# The common directory is used by the other guides, let's be more
|
||||
# liberal here since teams might only translate the files used by a
|
||||
# single guide. We use 8 % since that downloads the currently
|
||||
# translated files.
|
||||
if [ $PROJECT = "openstack-manuals" ] ; then
|
||||
tx pull -f --minimum-perc=8 -r openstack-manuals-i18n.common
|
||||
fi
|
||||
|
||||
|
||||
for FILE in ${DocFolder}/*
|
||||
do
|
||||
|
Loading…
x
Reference in New Issue
Block a user