From 17c86a5829a81d228c0106ee86f637548b945d5f Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 3 Jan 2005 18:53:35 +0000 Subject: a somewhat nicer message when loading a module --- perl-install/modules/interactive.pm | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'perl-install/modules') diff --git a/perl-install/modules/interactive.pm b/perl-install/modules/interactive.pm index 0788bb83c..3c103266f 100644 --- a/perl-install/modules/interactive.pm +++ b/perl-install/modules/interactive.pm @@ -78,14 +78,25 @@ sub load_category__prompt_for_more { } } +my %category2text = ( + 'bus/usb' => N_("Installing driver for USB controller"), + 'bus/firewire' => N_("Installing driver for firewire controller %s"), + 'disk/ide|scsi|hardware_raid|firewire' => N_("Installing driver for hard drive controller %s"), + list_modules::ethernet_categories() => N_("Installing driver for ethernet controller %s"), +); + sub wait_load_module { my ($in, $category, $text, $module) = @_; - $in->wait_message('', - [ - #-PO: the first %s is the card type (scsi, network, sound,...) - #-PO: the second is the vendor+model name - N("Installing driver for %s card %s", $category, $text), if_($::expert, N("(module %s)", $module)) - ]); + my $msg = do { + if (my $t = $category2text{$category}) { + sprintf(translate($t), $text); + } else { + #-PO: the first %s is the card type (scsi, network, sound,...) + #-PO: the second is the vendor+model name + N("Installing driver for %s card %s", $category, $text); + } + }; + $in->wait_message('', [ $msg, if_($::expert, N("(module %s)", $module)) ]); } sub load_module__ask_options { -- cgit v1.2.1