Merge "Do not store source translation files in git"
This commit is contained in:
@@ -493,25 +493,16 @@ function cleanup_po_files {
|
||||
}
|
||||
|
||||
|
||||
# Remove obsolete files pot files, let's not store a pot file if it
|
||||
# has no translations at all.
|
||||
# Remove all pot files, we publish them to
|
||||
# http://tarballs.openstack.org/translation-source/{name}/VERSION ,
|
||||
# let's not store them in git at all.
|
||||
function cleanup_pot_files {
|
||||
local modulename=$1
|
||||
|
||||
for i in $(find $modulename -name *.pot) ; do
|
||||
local bi
|
||||
local bi_po
|
||||
local count_po
|
||||
|
||||
# Get basename and remove .pot suffix from file name
|
||||
bi=$(basename $i .pot)
|
||||
bi_po="${bi}.po"
|
||||
count_po=$(find $modulename -name "${bi_po}" | wc -l)
|
||||
if [ $count_po -eq 0 ] ; then
|
||||
# Remove file, it might be a new file unknown to git.
|
||||
rm $i
|
||||
git rm -f --ignore-unmatch $i
|
||||
fi
|
||||
# Remove file, it might be a new file unknown to git.
|
||||
rm $i
|
||||
git rm -f --ignore-unmatch $i
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
@@ -33,18 +33,25 @@ function propose_manuals {
|
||||
# repository.
|
||||
case "$PROJECT" in
|
||||
openstack-manuals)
|
||||
cleanup_pot_files "doc"
|
||||
compress_manual_po_files "doc" 1
|
||||
;;
|
||||
api-site)
|
||||
cleanup_pot_files "api-ref-guides"
|
||||
compress_manual_po_files "api-ref-guides" 0
|
||||
cleanup_pot_files "api-quick-start"
|
||||
compress_manual_po_files "api-quick-start" 0
|
||||
cleanup_pot_files "api-ref"
|
||||
compress_manual_po_files "api-ref" 0
|
||||
cleanup_pot_files "openstack-firstapp"
|
||||
compress_manual_po_files "openstack-firstapp" 0
|
||||
;;
|
||||
ha-guide|operations-guide)
|
||||
cleanup_pot_files "doc"
|
||||
compress_manual_po_files "doc" 0
|
||||
;;
|
||||
security-doc)
|
||||
cleanup_pot_files "security-guide"
|
||||
compress_manual_po_files "security-guide" 0
|
||||
;;
|
||||
esac
|
||||
@@ -67,6 +74,8 @@ function propose_training_guides {
|
||||
# Pull updated translations from Zanata.
|
||||
pull_from_zanata "$PROJECT"
|
||||
|
||||
# Remove pot files
|
||||
cleanup_pot_files "doc/upstream-training"
|
||||
# Compress downloaded po files
|
||||
compress_po_files "doc/upstream-training"
|
||||
|
||||
@@ -123,6 +132,8 @@ function handle_python_django {
|
||||
pull_from_zanata "$project"
|
||||
propose_releasenotes "$ZANATA_VERSION"
|
||||
for modulename in $module_names; do
|
||||
# Note that we need to generate the pot files so that we
|
||||
# can calculate how many strings are translated.
|
||||
case "$kind" in
|
||||
django)
|
||||
# Update the .pot file
|
||||
@@ -147,6 +158,9 @@ function propose_releasenotes {
|
||||
# they get pushed to the translation server.
|
||||
|
||||
if [[ "$version" == "master" && -f releasenotes/source/conf.py ]]; then
|
||||
|
||||
# Note that we need to generate these so that we can calculate
|
||||
# how many strings are translated.
|
||||
extract_messages_releasenotes
|
||||
|
||||
# Remove obsolete files.
|
||||
|
||||
Reference in New Issue
Block a user