diff options
Diffstat (limited to 'wiz2fake_c.pl')
-rwxr-xr-x | wiz2fake_c.pl | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/wiz2fake_c.pl b/wiz2fake_c.pl index 635eb6d9..879f9539 100755 --- a/wiz2fake_c.pl +++ b/wiz2fake_c.pl @@ -11,7 +11,7 @@ sub wrap { } sub load_wpo { - my ($tree, $tag ,$page) = @_; + my ($tree, $tag, $page) = @_; foreach my $leaf (@$tree) { if (ref($leaf) eq 'ARRAY') { @@ -26,7 +26,7 @@ sub load_wpo { $page->{$leaf->{helpText}} = ""; $page->{$leaf->{description}} = ""; $page->{$leaf->{nextButtonText}} = ""; - } elsif(ref($leaf)=~ /\w\D/){ + } elsif (ref($leaf) =~ /\w\D/) { $tag = $leaf; } } @@ -37,13 +37,14 @@ my $xmltree = XML::Parser->new(Style => 'Tree')->parsefile($ARGV[0]); my $wpo = load_wpo($xmltree); print STDERR "$ARGV[0] => "; -my $fullname = "$ARGV[0]"."_.c"; +my $fullname = $ARGV[0] . "_.c"; -open(PO, "> $fullname"); +my $PO; +open($PO, "> $fullname"); -foreach (keys %{$wpo}) { +foreach (keys %$wpo) { # print "$_\n"; - $_ ne "" and print PO "printf(_(\"$_\"));\n"; + $_ ne "" and print $PO qq(printf(_("$_"));\n); } -close PO; +close $PO; print STDERR "$fullname\n"; |