Refactor pulling translations into a common func
In preperation for switching projects one at a time to pulling translations from Zanata, refactor the two calls to tx pull into a common function. Change-Id: I21051fbdcf7bd210606333ba46e5abb0c64e7540
This commit is contained in:
@@ -469,3 +469,14 @@ function compress_manual_po_files {
|
||||
mv "${i}.tmp" "$i"
|
||||
done
|
||||
}
|
||||
|
||||
function pull_from_transifex {
|
||||
# Download new files that are at least 75 % translated.
|
||||
# Also downloads updates for existing files that are at least 75 %
|
||||
# translated.
|
||||
tx pull -a -f --minimum-perc=75
|
||||
|
||||
# Pull upstream translations of all downloaded files but do not
|
||||
# download new files.
|
||||
tx pull -f
|
||||
}
|
||||
|
@@ -31,14 +31,8 @@ setup_loglevel_vars
|
||||
# Project specific transifex setup for log translations.
|
||||
setup_loglevel_project "$PROJECT"
|
||||
|
||||
# Download new files that are at least 75 % translated.
|
||||
# Also downloads updates for existing files that are at least 75 %
|
||||
# translated.
|
||||
tx pull -a -f --minimum-perc=75
|
||||
|
||||
# Pull upstream translations of all downloaded files but do not
|
||||
# download new files.
|
||||
tx pull -f
|
||||
# Pull updated translations from Transifex.
|
||||
pull_from_transifex
|
||||
|
||||
# Extract all messages from project, including log messages.
|
||||
extract_messages_log "$PROJECT"
|
||||
|
@@ -25,14 +25,8 @@ setup_translation
|
||||
|
||||
setup_django_openstack_auth
|
||||
|
||||
# Download new files that are at least 75 % translated.
|
||||
# Also downloads updates for existing files that are at least 75 %
|
||||
# translated.
|
||||
tx pull -a -f --minimum-perc=75
|
||||
|
||||
# Pull upstream translations of all downloaded files but do not
|
||||
# download new files.
|
||||
tx pull -f
|
||||
# Pull updated translations from Transifex.
|
||||
pull_from_transifex
|
||||
|
||||
# Update the .pot file
|
||||
python setup.py extract_messages
|
||||
|
@@ -20,14 +20,8 @@ setup_review
|
||||
setup_translation
|
||||
setup_horizon
|
||||
|
||||
# Download new files that are at least 75 % translated.
|
||||
# Also downloads updates for existing files that are at least 75 %
|
||||
# translated.
|
||||
tx pull -a -f --minimum-perc=75
|
||||
|
||||
# Pull upstream translations of all downloaded files but do not
|
||||
# download new files.
|
||||
tx pull -f
|
||||
# Pull updated translations from Transifex.
|
||||
pull_from_transifex
|
||||
|
||||
# Invoke run_tests.sh to update the po files
|
||||
# Or else, "../manage.py makemessages" can be used.
|
||||
|
Reference in New Issue
Block a user