diff options
author | Michael Meeks <michael.meeks@suse.com> | 2013-05-13 17:52:18 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-05-15 09:37:41 +0100 |
commit | 5d5950a766311cac4c851744c6622f8ac525975f (patch) | |
tree | c65cf8fcdebfca202108576f147753c2b117dd5f /solenv | |
parent | 08df0ab05ee209f1198ee0879f97a63ffaf56d76 (diff) |
gallery: convert text-shapes to new build logic.
Change-Id: Ia45a2eed7104b376b92290e1a40219e8988d927b
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/bin/desktop-translate.pl | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/solenv/bin/desktop-translate.pl b/solenv/bin/desktop-translate.pl index 21d80ab91a76..2b7b88263fb8 100644 --- a/solenv/bin/desktop-translate.pl +++ b/solenv/bin/desktop-translate.pl @@ -116,15 +116,19 @@ while (<SOURCE>) { close(SOURCE); +my $processed = 0; # process templates foreach $template (keys %templates) { my $outfile = $templates{$template}->{'outfile'}; # open the template file - ignore sections for which no # templates exist - unless(open(TEMPLATE, $outfile)) { - print STDERR "Warning: No template found for item '$template' : '$outfile' : '$_': $!\n"; - exit -1; + if (open(TEMPLATE, $outfile)) { + $processed++; + } elsif ($ext eq 'str') { # string files processed one by one + next; + } else { + die "Warning: No template found for item '$template' : '$outfile' : '$_': $!\n"; } # open output file @@ -161,3 +165,7 @@ foreach $template (keys %templates) { system "mv -f $outfile.tmp $outfile\n"; } } + +if ($ext eq 'str' && $processed == 0) { + die "Warning: No matching templates processed"; +} |