diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/printer.pm | 2 | ||||
-rw-r--r-- | perl-install/printerdrake.pm | 14 | ||||
-rwxr-xr-x | perl-install/standalone/printerdrake | 3 |
3 files changed, 11 insertions, 8 deletions
diff --git a/perl-install/printer.pm b/perl-install/printer.pm index 6985a4ddd..70ed8a6ea 100644 --- a/perl-install/printer.pm +++ b/perl-install/printer.pm @@ -864,7 +864,7 @@ sub get_cups_remote_queues { ($::expert ? _("CUPS") . $sep : "") . _("Remote Printers") . "$sep$queuename: $comment" . ($queuename eq $printer->{DEFAULT} ? - _(" (Default)") : ())); + _(" (Default)") : (""))); } } } diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm index e7483cffe..e735e3a78 100644 --- a/perl-install/printerdrake.pm +++ b/perl-install/printerdrake.pm @@ -584,9 +584,10 @@ _(" (Parallel Ports: /dev/lp0, /dev/lp1, ..., equivalent to LPT1:, LPT2:, ..., 1 } #- Search the database entry which matches the detected printer best + my $descr = ""; foreach (@parport) { $device eq $_->{port} or next; - my $descr = $_->{val}{DESCRIPTION}; + $descr = $_->{val}{DESCRIPTION}; # Clean up the description from noise which makes the best match # difficult $descr =~ s/\s+Inc\.//; @@ -609,6 +610,9 @@ _(" (Parallel Ports: /dev/lp0, /dev/lp1, ..., equivalent to LPT1:, LPT2:, ..., 1 ($descr !~ /Hewlett[\s-]+Packard/i))) {$printer->{DBENTRY} = ""}; } + if ((!$printer->{currentqueue}{'desc'}) && ($descr)) { + $printer->{currentqueue}{'desc'} = $descr; + } 1; } @@ -1165,12 +1169,14 @@ sub get_printer_info { if ($printer->{PAPERSIZE}) { $printer->{SPECIAL_OPTIONS} .= " -o PageSize=$printer->{PAPERSIZE}"; - } elsif (($in->{lang}) || + } elsif (($pagesize = $in->{lang}) || ($pagesize = $ENV{'LC_PAPER'}) || ($pagesize = $ENV{'LANG'}) || ($pagesize = $ENV{'LANGUAGE'}) || ($pagesize = $ENV{'LC_ALL'})) { - if (($pagesize eq 'en') || ($pagesize eq 'en_US')) { + if (($pagesize =~ /^en_CA/) || + ($pagesize =~ /^fr_CA/) || + ($pagesize =~ /^en_US/)) { $pagesize = "Letter"; } else { $pagesize = "A4"; @@ -2329,7 +2335,7 @@ sub main { my @printerlist = ( (sort((map {$printer->{configured}{$_}{'queuedata'}{'menuentry'} . ($_ eq $printer->{DEFAULT} ? - _(" (Default)") : ())} + _(" (Default)") : (""))} keys(%{$printer->{configured} || {}})), ($printer->{SPOOLER} eq "cups" ? diff --git a/perl-install/standalone/printerdrake b/perl-install/standalone/printerdrake index 5e0d16408..501119148 100755 --- a/perl-install/standalone/printerdrake +++ b/perl-install/standalone/printerdrake @@ -32,11 +32,8 @@ local $_ = join '', @ARGV; /-h/ and die "usage: printerdrake [--beginner] [--expert] [--auto] [--noauto] [--skiptest] [--testing] [--cups] [--lprng] [--lpd] [--pdq]\n"; -$::beginner = /-beginner/; $::expert = /-expert/; -$::auto = /-auto/; $::noauto = /-noauto/; -$::skiptest = /-skiptest/; $::testing = /-testing/; my $printer; |