diff options
author | Till Kamppeter <tkamppeter@mandriva.com> | 2005-03-02 21:25:53 +0000 |
---|---|---|
committer | Till Kamppeter <tkamppeter@mandriva.com> | 2005-03-02 21:25:53 +0000 |
commit | 854e603dc751754d1e86712056e5553376ca8f8e (patch) | |
tree | 9f5c86d538dd9b499758f158ee8712aa47eac54c /perl-install/printer/printerdrake.pm | |
parent | 82b4bf307fb03b6bab4b0f016232793e1aa780f7 (diff) | |
download | drakx-854e603dc751754d1e86712056e5553376ca8f8e.tar drakx-854e603dc751754d1e86712056e5553376ca8f8e.tar.gz drakx-854e603dc751754d1e86712056e5553376ca8f8e.tar.bz2 drakx-854e603dc751754d1e86712056e5553376ca8f8e.tar.xz drakx-854e603dc751754d1e86712056e5553376ca8f8e.zip |
- Made the "(recommended)" in the printer/driver lists translateable (bug
10651)
Diffstat (limited to 'perl-install/printer/printerdrake.pm')
-rw-r--r-- | perl-install/printer/printerdrake.pm | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm index eda1f11ba..8389262aa 100644 --- a/perl-install/printer/printerdrake.pm +++ b/perl-install/printer/printerdrake.pm @@ -14,6 +14,11 @@ use printer::detect; use printer::default; use printer::data; +# Overtake translation for "(recommended)" from printer/main.pm +my $recstr = $printer::main::recstr; +my $precstr = $printer::main::precstr; +my $sprecstr = $printer::main::sprecstr; + my $shortdistroname = "Mandrakelinux"; my $hp1000fwtext = N("The HP LaserJet 1000 needs its firmware to be uploaded after being turned on. Download the Windows driver package from the HP web site (the firmware on the printer's CD does not work) and extract the firmware file from it by decompressing the self-extracting '.exe' file with the 'unzip' utility and searching for the 'sihp1000.img' file. Copy this file into the '/etc/printer' directory. There it will be found by the automatic uploader script and uploaded whenever the printer is connected and turned on. @@ -2821,7 +2826,7 @@ sub get_db_entry { # database key contains the "(recommended)" for the # recommended driver, so add it if necessary unless (exists($printer::main::thedb{$printer->{DBENTRY}})) { - $printer->{DBENTRY} .= " (recommended)"; + $printer->{DBENTRY} .= " $precstr"; } } else { $printer->{DBENTRY} = "$make|$model"; @@ -2833,7 +2838,7 @@ sub get_db_entry { printer::main::get_descr_from_ppd($printer) || $printer->{DBENTRY}; unless (exists($printer::main::thedb{$printer->{DBENTRY}})) { - $printer->{DBENTRY} .= " (recommended)"; + $printer->{DBENTRY} .= " $precstr"; } $printer->{OLD_CHOICE} = $printer->{DBENTRY}; } @@ -2855,7 +2860,7 @@ sub get_db_entry { } foreach my $key (keys %printer::main::thedb) { if ($printer->{expert} && - $key =~ /^$make\|$model\|.*\(recommended\).*$/ || + $key =~ /^$make\|$model\|.*$sprecstr.*$/ || !$printer->{expert} && $key =~ /^$make\|$model$/) { $printer->{DBENTRY} = $key; } @@ -2868,7 +2873,7 @@ sub get_db_entry { $model =~ s/PostScript//i; $model =~ s/Series//i; foreach my $key (keys %printer::main::thedb) { - if ($printer->{expert} && $key =~ /^$make\|$model\|.*\(recommended\).*$/ || + if ($printer->{expert} && $key =~ /^$make\|$model\|.*$sprecstr.*$/ || !$printer->{expert} && $key =~ /^$make\|$model$/) { $printer->{DBENTRY} = $key; } @@ -2892,10 +2897,10 @@ sub get_db_entry { $printer->{OLD_CHOICE} = "XXX"; } } else { - if ($printer->{expert} && $printer->{DBENTRY} !~ /(recommended)/) { + if ($printer->{expert} && $printer->{DBENTRY} !~ /$sprecstr/) { my ($make, $model) = $printer->{DBENTRY} =~ /^([^\|]+)\|([^\|]+)\|/; foreach my $key (keys %printer::main::thedb) { - if ($key =~ /^$make\|$model\|.*\(recommended\).*$/) { + if ($key =~ /^$make\|$model\|.*$sprecstr.*$/) { $printer->{DBENTRY} = $key; } } |