summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
Diffstat (limited to 'solenv')
-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";
+}