summaryrefslogtreecommitdiffstats
path: root/perl-install/share/po/help_xml2pm.pl
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/share/po/help_xml2pm.pl')
-rwxr-xr-xperl-install/share/po/help_xml2pm.pl13
1 files changed, 8 insertions, 5 deletions
diff --git a/perl-install/share/po/help_xml2pm.pl b/perl-install/share/po/help_xml2pm.pl
index 08455030d..d7823a122 100755
--- a/perl-install/share/po/help_xml2pm.pl
+++ b/perl-install/share/po/help_xml2pm.pl
@@ -22,6 +22,7 @@ foreach my $lang (keys %helps) {
local *F;
my ($charset) = cat_("$lang.po") =~ /charset=([^\\]+)/ or die "missing charset in $lang.po\n";
open F, "| iconv -f utf8 -t $charset//TRANSLIT > help-$lang.pot";
+ #open F, "|cat - > help-$lang.pot";
print F "\n";
foreach my $id (keys %{$helps{$lang}}) {
$base->{$id} or die "$lang:$id doesn't exist in english\n";
@@ -97,6 +98,8 @@ sub rewrite2 {
our $i18ned_close_command_quote = $ {{ fr => " »", de => "“"}}{$lang};
our $i18ned_open_input_quote = $ {{ fr => "« ", de => "»"}}{$lang};
our $i18ned_close_input_quote = $ {{ fr => " »", de => "«"}}{$lang};
+ our $i18ned_open_key_quote = $ {{ de => "["}}{$lang};
+ our $i18ned_close_key_quote = $ {{ de => "]"}}{$lang};
# rewrite2_ fills in $help
$help = {};
rewrite2_($tree);
@@ -127,18 +130,18 @@ sub rewrite2_ {
qq(\n$text\n);
} elsif (member($tree->{tag}, 'quote', 'citetitle', 'foreignphrase')) {
($i18ned_open_text_quote || "``") . $text . ($i18ned_close_text_quote || "''");
- } elsif ($tree->{tag} eq 'guilabel') {
+ } elsif (member($tree->{tag}, 'guilabel', 'guibutton', 'guimenu', 'literal')) {
($i18ned_open_label_quote || "\\\"") . $text . ($i18ned_close_label_quote || "\\\"");
} elsif ($tree->{tag} eq 'command') {
($i18ned_open_command_quote || "\\\"") . $text . ($i18ned_close_command_quote || "\\\"");
} elsif ($tree->{tag} eq 'userinput') {
($i18ned_open_input_quote || ">>") . $text . ($i18ned_close_input_quote || "<<");
+ } elsif ($tree->{tag} eq 'keycap') {
+ ($i18ned_open_key_quote || "[") . $text . ($i18ned_close_key_quote || "]");
} elsif (member($tree->{tag}, 'keysym')) {
qq($text);
} elsif (member($tree->{tag}, 'footnote')) {
'(*)'
- } elsif ($tree->{tag} eq 'keycap') {
- "[" . $text . "]";
} elsif ($tree->{tag} eq 'warning') {
$text =~ s/^(\s+)/$1!! /;
$text =~ s/(\s+)$/ !!$1/;
@@ -149,10 +152,10 @@ sub rewrite2_ {
$text =~ s/^/' ' . ($cnt++ ? ' ' : '* ')/emg;
"\n$text\n";
- } elsif (member($tree->{tag}, 'guibutton', 'guimenu',
+ } elsif (member($tree->{tag},
'emphasis', 'acronym', 'ulink', 'tip', 'note',
'primary', 'indexterm', 'application', 'keycombo',
- 'literal', 'superscript', 'xref',
+ 'superscript', 'xref',
)) {
# ignored tags
$text;