6 Bweb - A Bacula web interface
7 Bacula® - The Network Backup Solution
9 Copyright (C) 2000-2006 Free Software Foundation Europe e.V.
11 The main author of Bweb is Eric Bollengier.
12 The main author of Bacula is Kern Sibbald, with contributions from
13 many others, a complete list can be found in the file AUTHORS.
15 This program is Free Software; you can redistribute it and/or
16 modify it under the terms of version two of the GNU General Public
17 License as published by the Free Software Foundation plus additions
18 that are listed in the file LICENSE.
20 This program is distributed in the hope that it will be useful, but
21 WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 General Public License for more details.
25 You should have received a copy of the GNU General Public License
26 along with this program; if not, write to the Free Software
27 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
30 Bacula® is a registered trademark of John Walker.
31 The licensor of Bacula is the Free Software Foundation Europe
32 (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zurich,
33 Switzerland, email:ftf@fsfeurope.org.
38 rm -f lang/fr/tpl/*.tpl
39 LANGUAGE=fr ./script/tpl_generate.pl tpl/*.pl
49 my $lang = $ENV{LANGUAGE};
51 if (!$lang or $lang !~ /^[a-z]+$/) {
52 print "Can't find \$LANGUAGE, please set it before running $0 (to en, fr, it, es...)\n";
56 my $out = "lang/$lang/tpl";
58 die "Can't write to $out" unless (-d $out);
60 print "Using LANGUAGE=$lang and writing tpl to: $out\n";
62 use Locale::TextDomain ('bweb', './po/');
63 use File::Basename qw/basename/;
69 print STDERR "Skipping $f, file not found\n";
73 my $file = basename($f);
75 open(FP, $f) or print STDERR "Can't open $f for reading $!\n";
76 open(OUT, ">$out/$file") or print STDERR "Can't open $out/$file for writing $!\n";
77 print "Converting $f -> $out/$file ";
80 my (@str) = ($l =~ m/__(.+?)__/g);
82 while (my $s = shift @str) {
87 print STDERR "$s -> $r\n";
93 $s =~ s/([\[\]\(\)])/\\$1/g;
95 $l =~ s/__${s}__/$r/g;
99 print "($nb strings)\n";