diff options
author | Arnaud Desmons <adesmons@mandriva.com> | 2002-08-14 10:06:38 +0000 |
---|---|---|
committer | Arnaud Desmons <adesmons@mandriva.com> | 2002-08-14 10:06:38 +0000 |
commit | e4df7a18ecdfe873ca5a075079a3ee4cd921882b (patch) | |
tree | 57f7451226253d2f818a912f1c186952f2eaeae6 /wiz2pot.pl | |
parent | f592678e566a2e364fca0c8ffe770a2f29bfea8a (diff) | |
download | drakwizard-e4df7a18ecdfe873ca5a075079a3ee4cd921882b.tar drakwizard-e4df7a18ecdfe873ca5a075079a3ee4cd921882b.tar.gz drakwizard-e4df7a18ecdfe873ca5a075079a3ee4cd921882b.tar.bz2 drakwizard-e4df7a18ecdfe873ca5a075079a3ee4cd921882b.tar.xz drakwizard-e4df7a18ecdfe873ca5a075079a3ee4cd921882b.zip |
added nextButtonText wizardTitle description
Diffstat (limited to 'wiz2pot.pl')
-rwxr-xr-x | wiz2pot.pl | 31 |
1 files changed, 17 insertions, 14 deletions
@@ -3,6 +3,13 @@ use strict; use XML::Parser; +sub wrap { + @_[0] =~ s/\\'/\\\\'/g; + @_[0] =~ s/\\q/\\\\q/g; + @_[0] =~ s/\\a/\\\\a/g; + @_[0] =~ s/\\n/\\\\n/g; +} + sub load_wpo { my ($tree, $tag ,$page) = @_; @@ -11,12 +18,15 @@ sub load_wpo { $page = load_wpo($leaf, $tag, $page); } elsif (ref($leaf) eq 'HASH') { # XML compatibility - $leaf->{helpText} =~ s/\\'/\\\\'/g; - $leaf->{helpText} =~ s/\\q/\\\\q/g; - $leaf->{helpText} =~ s/\\a/\\\\a/g; - $leaf->{helpText} =~ s/\\n/\\\\n/g; + wrap $leaf->{description}; + wrap $leaf->{helpText}; + wrap $leaf->{wizardTitle}; + wrap $leaf->{nextButtonText}; + $page->{$leaf->{wizardTitle}} = ""; $page->{$leaf->{helpText}} = ""; - }elsif(ref($leaf)=~ /\w\D/){ + $page->{$leaf->{description}} = ""; + $page->{$leaf->{nextButtonText}} = ""; + } elsif(ref($leaf)=~ /\w\D/){ $tag = $leaf; } } @@ -34,15 +44,8 @@ my $date = `date +%Y-%m-%d\\ %H:%M\\ %z`; chomp $date; foreach (keys %{$wpo}) { - if ($_ ne "") { - if ($_ eq $wpo->{$_}) { - print PO "msgid \"$_\"\nmsgstr \"\"\n\n"; - } - else { - print PO "msgid \"$_\"\nmsgstr \"$wpo->{$_}\"\n\n"; - } - } - + print "$_\n"; + $_ ne "" and print PO "msgid \"$_\"\nmsgstr \"\"\n\n"; } close PO; print STDERR "./po/$1.pot\n"; |