summaryrefslogtreecommitdiff
path: root/solenv/bin/desktop-translate.pl
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2013-05-13 17:52:18 +0100
committerMichael Meeks <michael.meeks@suse.com>2013-05-15 09:37:41 +0100
commit5d5950a766311cac4c851744c6622f8ac525975f (patch)
treec65cf8fcdebfca202108576f147753c2b117dd5f /solenv/bin/desktop-translate.pl
parent08df0ab05ee209f1198ee0879f97a63ffaf56d76 (diff)
gallery: convert text-shapes to new build logic.
Change-Id: Ia45a2eed7104b376b92290e1a40219e8988d927b
Diffstat (limited to 'solenv/bin/desktop-translate.pl')
-rw-r--r--solenv/bin/desktop-translate.pl14
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";
+}