summaryrefslogtreecommitdiff
path: root/sysui/desktop/share/translate.pl
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2004-07-23 09:26:49 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2004-07-23 09:26:49 +0000
commit54a84bf98d1820d58983e74df6bfd680370cd9bc (patch)
tree1df2db9277eb005f8751e1df201bcf7a441093ed /sysui/desktop/share/translate.pl
parentdc4b57d5e3c44edd50965892e4cd64555be59c3f (diff)
INTEGRATION: CWS launchertips (1.2.18); FILE MERGED
2004/07/15 13:51:50 obr 1.2.18.1: #i29569#,#i30472# switched to new translation mechanism, removed invalid entries and added tooltips/help strings
Diffstat (limited to 'sysui/desktop/share/translate.pl')
-rw-r--r--sysui/desktop/share/translate.pl28
1 files changed, 10 insertions, 18 deletions
diff --git a/sysui/desktop/share/translate.pl b/sysui/desktop/share/translate.pl
index 2bcd17790dfb..06f393a4f8ef 100644
--- a/sysui/desktop/share/translate.pl
+++ b/sysui/desktop/share/translate.pl
@@ -113,35 +113,27 @@ while (<SOURCE>) {
print OUTFILE;
}
+ close(TEMPLATE);
+
if (close(OUTFILE)) {
system "mv -f $outfile.tmp $outfile\n";
}
- close(TEMPLATE);
-
$_ = substr($line, 1, index($line,"]")-1);
-
- # HACK: need to translate section strings for now
- s/writer-math/formula/;
- s/writer-global/master-document/;
- s/writer/text/;
- s/calc/spreadsheet/;
- s/draw/drawing/;
- s/impress/presentation/;
-
$outfile = "$workdir/$prefix$_.$ext";
+ # open the template file - ignore sections for which no
+ # templates exist
+ unless(open(TEMPLATE, $outfile)) {
+ print STDERR "Warning: No template found for item $_: $outfile: $!\n";
+ next;
+ }
+
# open output file
unless (open(OUTFILE, "> $outfile.tmp")) {
print STDERR "Can't create output file $outfile.tmp: $!\n";
exit -1;
- }
-
- # open the template file
- unless(open(TEMPLATE, $outfile)) {
- print STDERR "Can't open template file $outfile: $!\n";
- exit -1;
- }
+ }
# Pass the head of the template to the output file
KEY: while (<TEMPLATE>) {