mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-22 00:06:12 -05:00
release.pl: fail if transifex doesn't deliver an existing translation
This commit is contained in:
parent
1deb1daf03
commit
01c9c27d45
@ -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 {
|
||||
|
@ -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(<I>) {
|
||||
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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user