From bdb0dbe5c547b6868204d59b44e58131b1e830f0 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 9 Aug 2004 10:53:41 +0000 Subject: (basic_seclevel_explanation) handle any tags ala label --- perl-install/standalone/draksec | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'perl-install') diff --git a/perl-install/standalone/draksec b/perl-install/standalone/draksec index 9be5a015b..f5dd0b5d4 100755 --- a/perl-install/standalone/draksec +++ b/perl-install/standalone/draksec @@ -76,15 +76,20 @@ sub basic_seclevel_explanations() { use Gtk2::Pango; my %common_opts = ('left-margin' => '10', 'right-margin' => '10'); gtktext_insert($text, [ map { - if (my ($title, $str) = m!(.*)(.*)!) { - if_($title, [ $title, { 'foreground' => 'royalblue3', 'weight' => Gtk2::Pango->PANGO_WEIGHT_BOLD, %common_opts } ]), - if_($str, [ $str . "\n\n", \%common_opts ]); + if (s!^/span>!!) { + [ $_, \%common_opts ]; + } elsif (s!span !!) { + my %tags = %common_opts; + while (s!(\w+?)="(\w+?)"!!) { + $tags{weight} ||= Gtk2::Pango->PANGO_WEIGHT_BOLD if $1 eq 'foreground'; + $tags{$1} = $2; + } + s/^>//; + [ $_, \%tags ]; } else { - if_($_, [ "$_\n\n", \%common_opts ]); - } - } split("\n", - - formatAlaTeX( + [ $_, \%common_opts ]; + } + } split("<", formatAlaTeX( #-PO: Do not alter the and tags. #-PO: Translate the security levels (Poor, Standard, High, Higher and Paranoid) in the same way, you translated these individuals words. #-PO: keep the doble empty lines between sections, this is formated a la LaTeX. -- cgit v1.2.1