diff --git a/scripts/release.pl b/scripts/release.pl index 5b77c0c9f3e..6d269443278 100755 --- a/scripts/release.pl +++ b/scripts/release.pl @@ -156,7 +156,7 @@ my $reltag = "final-${newmajor}_${newminor}_${newpatch}"; unless( $skipts ) { print "Pulling transifex translations...\n"; - run( "scripts/pull_ts.sh", "pull_ts.sh failed" ); + run( "CONSIDER_TS_DROP_FATAL=1 scripts/pull_ts.sh", "pull_ts.sh failed" ); run( "git add i18n/*.ts", "adding translations failed" ); run( "git commit -n -a -m \"translation update for $version from transifex\"", "could not commit translation updates" ); } else { diff --git a/scripts/tsstat.pl b/scripts/tsstat.pl index 1e1af7dd1ca..3e9a214a070 100755 --- a/scripts/tsstat.pl +++ b/scripts/tsstat.pl @@ -207,8 +207,17 @@ rename "i18n/CMakeLists.txt", "i18n/CMakeLists.txt.temp" || die "cannot rename i open I, "i18n/CMakeLists.txt.temp"; open O, ">i18n/CMakeLists.txt"; while() { - if( /^SET\(TS_FILES /i ) { - print O "set(TS_FILES " . join( " ", map { "qgis_$_\.ts"; } @ts ) . ")\n"; + if( /^SET\(TS_FILES (.*)\)/i ) { + my @oldts = split /\s+/, $1; + my @newts = map { "qgis_$_\.ts"; } @ts; + for my $ts (@oldts) { + die "FATAL: $ts was dropped\n" if exists $ENV{CONSIDER_TS_DROP_FATAL} && ! grep /^$ts$/, @newts; + print STDERR "WARNING: $ts dropped\n" unless grep /^$ts$/, @newts; + } + for my $ts (@newts) { + print STDERR "INFO: $ts added\n" unless grep /^$ts$/, @oldts; + } + print O "set(TS_FILES " . join( " ", @newts ) . ")\n"; } else { print O; }