Remove support for pulling from Transifex
Switch the translation scripts to only pull from Zanata, no matter what extra arguments they are passed on the command line. This does not completly remove support for Transifex, which will be cleaned up in a future commit. Change-Id: I21bd54d4205693315da1152a310ff4faf22531a5
This commit is contained in:
parent
6809526e3f
commit
28eb4ce6f5
@ -194,11 +194,10 @@ function setup_manuals {
|
||||
# Setup project so that git review works, sets global variable
|
||||
# COMMIT_MSG.
|
||||
function setup_review {
|
||||
local TRANSLATION_SOFTWARE=${1:-Transifex}
|
||||
FULL_PROJECT=$(grep project .gitreview | cut -f2 -d= |sed -e 's/\.git$//')
|
||||
set +e
|
||||
read -d '' COMMIT_MSG <<EOF
|
||||
Imported Translations from $TRANSLATION_SOFTWARE
|
||||
Imported Translations from Zanata
|
||||
|
||||
For more information about this automatic import see:
|
||||
https://wiki.openstack.org/wiki/Translations/Infrastructure
|
||||
@ -466,17 +465,6 @@ function compress_manual_po_files {
|
||||
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
|
||||
}
|
||||
|
||||
function pull_from_zanata {
|
||||
# Since Zanata does not currently have an option to not download new
|
||||
# files, we download everything, and then remove new files that are not
|
||||
|
@ -13,11 +13,6 @@
|
||||
# under the License.
|
||||
|
||||
PROJECT=$1
|
||||
SOFTWARE="Transifex"
|
||||
|
||||
if [ -n "$2" -a "$2" = "zanata" ]; then
|
||||
SOFTWARE="Zanata"
|
||||
fi
|
||||
|
||||
source /usr/local/jenkins/slave_scripts/common_translation_update.sh
|
||||
|
||||
@ -25,7 +20,7 @@ source /usr/local/jenkins/slave_scripts/common_translation_update.sh
|
||||
setup_git
|
||||
|
||||
# Check whether a review already exists, setup review commit message.
|
||||
setup_review "$SOFTWARE"
|
||||
setup_review
|
||||
# Setup basic connection for transifex.
|
||||
setup_translation
|
||||
# Project specific transifex setup.
|
||||
@ -36,15 +31,8 @@ setup_loglevel_vars
|
||||
# Project specific transifex setup for log translations.
|
||||
setup_loglevel_project "$PROJECT"
|
||||
|
||||
# Pull updated translations from Transifex, or Zanata.
|
||||
case "$SOFTWARE" in
|
||||
Transifex)
|
||||
pull_from_transifex
|
||||
;;
|
||||
Zanata)
|
||||
pull_from_zanata
|
||||
;;
|
||||
esac
|
||||
# Pull updated translations from Zanata
|
||||
pull_from_zanata
|
||||
|
||||
# Extract all messages from project, including log messages.
|
||||
extract_messages_log "$PROJECT"
|
||||
|
@ -12,32 +12,19 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
SOFTWARE="Transifex"
|
||||
|
||||
if [ -n "$1" -a "$1" = "zanata" ]; then
|
||||
SOFTWARE="Zanata"
|
||||
fi
|
||||
|
||||
source /usr/local/jenkins/slave_scripts/common_translation_update.sh
|
||||
|
||||
setup_git
|
||||
|
||||
setup_review "$SOFTWARE"
|
||||
setup_review
|
||||
|
||||
# Setup basic connection for transifex.
|
||||
setup_translation
|
||||
|
||||
setup_django_openstack_auth
|
||||
|
||||
# Pull updated translations from Transifex, or Zanata.
|
||||
case "$SOFTWARE" in
|
||||
Transifex)
|
||||
pull_from_transifex
|
||||
;;
|
||||
Zanata)
|
||||
pull_from_zanata
|
||||
;;
|
||||
esac
|
||||
# Pull updated translations from Zanata.
|
||||
pull_from_zanata
|
||||
|
||||
# Update the .pot file
|
||||
python setup.py extract_messages
|
||||
|
@ -12,29 +12,16 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
SOFTWARE="Transifex"
|
||||
|
||||
if [ -n "$1" -a "$1" = "zanata" ]; then
|
||||
SOFTWARE="Zanata"
|
||||
fi
|
||||
|
||||
source /usr/local/jenkins/slave_scripts/common_translation_update.sh
|
||||
|
||||
setup_git
|
||||
|
||||
setup_review "$SOFTWARE"
|
||||
setup_review
|
||||
setup_translation
|
||||
setup_horizon
|
||||
|
||||
# Pull updated translations from Transifex, or Zanata.
|
||||
case "$SOFTWARE" in
|
||||
Transifex)
|
||||
pull_from_transifex
|
||||
;;
|
||||
Zanata)
|
||||
pull_from_zanata
|
||||
;;
|
||||
esac
|
||||
# Pull updated translations from Zanata.
|
||||
pull_from_zanata
|
||||
|
||||
# Invoke run_tests.sh to update the po files
|
||||
# Or else, "../manage.py makemessages" can be used.
|
||||
|
@ -18,41 +18,19 @@
|
||||
# and push to Gerrit.
|
||||
|
||||
PROJECT=$1
|
||||
SOFTWARE="Transifex"
|
||||
|
||||
if [ -n "$2" -a "$2" = "zanata" ]; then
|
||||
SOFTWARE="Zanata"
|
||||
fi
|
||||
|
||||
source /usr/local/jenkins/slave_scripts/common_translation_update.sh
|
||||
|
||||
init_manuals "$PROJECT"
|
||||
|
||||
setup_git
|
||||
setup_review "$SOFTWARE"
|
||||
setup_review
|
||||
setup_translation
|
||||
|
||||
setup_manuals "$PROJECT"
|
||||
|
||||
# Pull updated translations from Transifex, or Zanata.
|
||||
case "$SOFTWARE" in
|
||||
Transifex)
|
||||
# Download new files.
|
||||
# Also downloads updates for existing files that are
|
||||
# translated to a certain amount as configured in setup_manuals.
|
||||
# The function setup_manuals will setup most files --minimum-perc=75
|
||||
# for most files.
|
||||
tx pull -a -f
|
||||
|
||||
# Pull upstream translations of all downloaded files but do not
|
||||
# download new files.
|
||||
# Use lower percentage here to update the existing files.
|
||||
tx pull -f --minimum-perc=50
|
||||
;;
|
||||
Zanata)
|
||||
pull_from_zanata_manuals "$PROJECT"
|
||||
;;
|
||||
esac
|
||||
# Pull updated translations from Zanata.
|
||||
pull_from_zanata_manuals "$PROJECT"
|
||||
|
||||
# Compress downloaded po files
|
||||
# Only touch glossary in openstack-manuals but not in any other
|
||||
|
Loading…
x
Reference in New Issue
Block a user