From 199d57b9218a21dfac47731239ad7756090027e6 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 23 Sep 2016 09:27:44 +0200 Subject: [PATCH] Cleanup partial translated files Raise threshold on when we remove partially translated files from 20 per cent to 40 per cent. New files that get added need to be translated by 75 per cent. We agreed in the past that files with less than 60 per cent can be improved but let's not go that high directly. Change-Id: I2c9a8c73d8364124b98ae8fcc0c0eb5221507d46 --- jenkins/scripts/common_translation_update.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jenkins/scripts/common_translation_update.sh b/jenkins/scripts/common_translation_update.sh index 8931ad9d69..3f95b83d81 100644 --- a/jenkins/scripts/common_translation_update.sh +++ b/jenkins/scripts/common_translation_update.sh @@ -517,7 +517,7 @@ function cleanup_po_files { for i in $(find $modulename -name *.po) ; do check_po_file "$i" - if [ $RATIO -lt 20 ]; then + if [ $RATIO -lt 40 ]; then git rm -f --ignore-unmatch $i fi done @@ -564,19 +564,19 @@ function pull_from_zanata { check_po_file "$i" # We want new files to be >75% translated. The # common documents in openstack-manuals have that relaxed to - # >30%. + # >40%. percentage=75 if [ $project = "openstack-manuals" ]; then case "$i" in *common*) - percentage=30 + percentage=40 ;; esac fi if [ $RATIO -lt $percentage ]; then # This means the file is below the ratio, but we only want # to delete it, if it is a new file. Files known to git - # that drop below 20% will be cleaned up by + # that drop below 40% will be cleaned up by # cleanup_po_files. if ! git ls-files | grep -xq "$i"; then rm -f "$i"