diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-09-07 14:46:58 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-09-07 14:46:58 +0000 |
commit | 1b26b93c21046b9ae27042c139c5453e638c2a6f (patch) | |
tree | 9c6e11a6e6e07b7681eca1ad3cc9203cf2973154 /perl-install/share | |
parent | 8dc78ef0278bc8f2fec367406ff97eea43ed66e8 (diff) | |
download | drakx-1b26b93c21046b9ae27042c139c5453e638c2a6f.tar drakx-1b26b93c21046b9ae27042c139c5453e638c2a6f.tar.gz drakx-1b26b93c21046b9ae27042c139c5453e638c2a6f.tar.bz2 drakx-1b26b93c21046b9ae27042c139c5453e638c2a6f.tar.xz drakx-1b26b93c21046b9ae27042c139c5453e638c2a6f.zip |
new help
Diffstat (limited to 'perl-install/share')
-rw-r--r-- | perl-install/share/po/Makefile | 2 | ||||
-rwxr-xr-x | perl-install/share/po/help_xml2pm.pl | 21 |
2 files changed, 18 insertions, 5 deletions
diff --git a/perl-install/share/po/Makefile b/perl-install/share/po/Makefile index 62daa8643..1d1a2d4ef 100644 --- a/perl-install/share/po/Makefile +++ b/perl-install/share/po/Makefile @@ -13,7 +13,7 @@ LOCALEDIR=$(DATADIR)/locale all: $(MOFILES) help: - wget -q -O drakx-help.xml "http://www.mandrakelinux.com/cgi-bin/cvsweb.cgi/~checkout~/doc/manual/literal/drakx/en/drakx-help.xml?rev=1.1&content-type=text/plain" + wget -q -O drakx-help.xml "http://www.mandrakelinux.com/cgi-bin/cvsweb.cgi/~checkout~/doc/manual/literal/drakx/en/drakx-help.xml?rev=1&content-type=text/plain" ./help_xml2pm.pl drakx-help.xml | LC_ALL=fr iconv -f utf8 -t ascii//TRANSLIT > ../../help.pm %.mo: %.po diff --git a/perl-install/share/po/help_xml2pm.pl b/perl-install/share/po/help_xml2pm.pl index 9996c13d6..cf7f36167 100755 --- a/perl-install/share/po/help_xml2pm.pl +++ b/perl-install/share/po/help_xml2pm.pl @@ -38,8 +38,13 @@ sub rewrite1 { s/\s+/ /gs; s/"/\\"/g; } + push @l, $tree + } elsif ($tag eq 'screen') { + $tree->[1] eq '0' or die "screen tag contains non CDATA\n"; + push @l, $tree->[2]; + } else { + push @l, rewrite1($tag, $tree); } - push @l, $tag eq '0' ? $tree : rewrite1($tag, $tree); } { attr => $attr, tag => $tag, children => \@l }; } @@ -60,6 +65,11 @@ sub rewrite2 { my ($tree) = @_; ref($tree) or return $tree; + if ($tree->{tag} eq 'screen') { + ''; + } + + my $text = do { my @l = map { rewrite2($_) } @{$tree->{children}}; my $text; @@ -78,13 +88,13 @@ sub rewrite2 { $text =~ s/^( ?\n)+//; $text =~ s/\s+$//; qq(\n$text\n); - } elsif ($tree->{tag} eq 'quote') { + } elsif (member($tree->{tag}, 'quote', 'citetitle')) { qq(``$text''); } elsif ($tree->{tag} eq 'command') { qq(\\"$text\\"); } elsif ($tree->{tag} eq 'userinput') { qq(>>$text<<); - } elsif ($tree->{tag} eq 'footnote') { + } elsif (member($tree->{tag}, 'footnote', 'keysym')) { '(*)' } elsif ($tree->{tag} eq 'warning') { $text =~ s/^(\s+)/$1!! /; @@ -98,7 +108,8 @@ sub rewrite2 { } elsif (member($tree->{tag}, 'guibutton', 'guimenu', 'guilabel', 'emphasis', 'acronym', 'keycap', 'ulink', 'tip', 'note', - 'primary', 'indexterm', + 'primary', 'indexterm', 'application', 'keycombo', + 'literal', 'superscript', )) { # ignored tags $text; @@ -115,6 +126,8 @@ sub rewrite2 { } find('footnote', $tree); $help->{$tree->{attr}{id}} = aerate($text . join('', @footnotes)); ''; + } elsif ($tree->{tag} eq 'screen') { + qq(\n$text\n); } else { die "unknown tag $tree->{tag}\n"; } |