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.
37 This script is used to extract strings from tpl files
46 use base "HTML::Parser";
55 next if ($w eq ' ');
59 next if (exists $dict{$w});
62 # we add " at the begining and the end of the string
63 $w =~ s/(^|$)/"/gm; # "
64 print "msgid ", $w, "\n";
65 print 'msgstr ""', "\n\n";
70 my ($self, $text) = @_;
72 # between <script>..</script> we take only "words"
74 my @words = ($text =~ /"([\w\s]+)"/gs);
79 # just print out the original text
80 # $text =~ s/<\/?TMPL[^>]+>//gs;
83 $text =~ s/(^\s+)|(\s+$)//gs;
85 # skip some special cases
86 return if ($text eq 'selected');
91 my ($self, $tag, $attr, $attrseq, $origtext) = @_;
93 # On note qu'on se trouve dans un script
94 # pour prendre que les chaines entre ""
95 if ($tag eq 'script') {
99 #return unless ($tag =~ /^(a|input|img)$/);
101 # liste des attributs a traduire
102 if (defined $attr->{'title'}) {
103 print_it($attr->{'title'});
106 if (defined $attr->{'alt'}) {
107 print_it($attr->{'alt'});
119 my $p = new TmplParser;
120 for (my $f = shift ; $f and -f $f ; $f = shift) {
122 print "#============ $f ==========\n";