From 4d1ac5fb51fcacc4d5ef9a22c940c3e745e6e03d Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 30 Sep 2005 15:48:30 +0000 Subject: fallback nicely, trying english if i18n doc not available (need a change in ctxhelp, but won't fail worse than current behaviour without it) --- perl-install/standalone/drakhelp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'perl-install') diff --git a/perl-install/standalone/drakhelp b/perl-install/standalone/drakhelp index 16a39f32a..54fd10435 100644 --- a/perl-install/standalone/drakhelp +++ b/perl-install/standalone/drakhelp @@ -28,14 +28,25 @@ Usage: my ($opt, $idlabel) = @ARGV; @ARGV == 2 && ($opt eq '--id' || $opt eq '--doc' || $opt eq '--help') or usage(); + + my ($instpath, $ancpath, $package) = ctxhelp::path2help($opt, $idlabel); +if (! -e $instpath) { + system("/usr/sbin/drakhelp_inst $package"); +} --e $instpath or system("/usr/sbin/drakhelp_inst $package"); +if (! -e $instpath) { + #- trying again, asking for the english entry + ($instpath, $ancpath, my $package2) = ctxhelp::path2help($opt, $idlabel, 'en'); + if (! -e $instpath && $package ne $package2) { + system("/usr/sbin/drakhelp_inst $package2"); + } +} if (-e $instpath) { system("/usr/bin/www-browser file://$ancpath &"); } else { $ugtk2::wm_icon = "help"; my $in = interactive->vnew; - $in->ask_warn(N("Mandriva Linux Help Center"), N("%s cannot be displayed \n. No Help entry of this type\n", $instpath)); + $in->ask_warn(N("Mandriva Linux Help Center"), N("No Help entry for %s\n", $idlabel)); } -- cgit v1.2.1