summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-09-30 15:48:30 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-09-30 15:48:30 +0000
commit4d1ac5fb51fcacc4d5ef9a22c940c3e745e6e03d (patch)
tree7a1840ac34522404f5a58efac6334d18027abb38
parenta7e277c216138a802406a2788b60624f19231e13 (diff)
downloaddrakx-4d1ac5fb51fcacc4d5ef9a22c940c3e745e6e03d.tar
drakx-4d1ac5fb51fcacc4d5ef9a22c940c3e745e6e03d.tar.gz
drakx-4d1ac5fb51fcacc4d5ef9a22c940c3e745e6e03d.tar.bz2
drakx-4d1ac5fb51fcacc4d5ef9a22c940c3e745e6e03d.tar.xz
drakx-4d1ac5fb51fcacc4d5ef9a22c940c3e745e6e03d.zip
fallback nicely, trying english if i18n doc not available
(need a change in ctxhelp, but won't fail worse than current behaviour without it)
-rw-r--r--perl-install/standalone/drakhelp15
1 files changed, 13 insertions, 2 deletions
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));
}