summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-08-09 10:53:41 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-08-09 10:53:41 +0000
commitbdb0dbe5c547b6868204d59b44e58131b1e830f0 (patch)
tree829cef8ec33803e8c21ec382ddedad6b3537fd83 /perl-install
parent5a8b899ba18858cf88b2773f1874c1d53c392763 (diff)
downloaddrakx-backup-do-not-use-bdb0dbe5c547b6868204d59b44e58131b1e830f0.tar
drakx-backup-do-not-use-bdb0dbe5c547b6868204d59b44e58131b1e830f0.tar.gz
drakx-backup-do-not-use-bdb0dbe5c547b6868204d59b44e58131b1e830f0.tar.bz2
drakx-backup-do-not-use-bdb0dbe5c547b6868204d59b44e58131b1e830f0.tar.xz
drakx-backup-do-not-use-bdb0dbe5c547b6868204d59b44e58131b1e830f0.zip
(basic_seclevel_explanation) handle any tags ala label
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/standalone/draksec21
1 files changed, 13 insertions, 8 deletions
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!<span foreground="royalblue3">(.*)</span>(.*)!) {
- 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 <span ..> and </span> 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.