summaryrefslogtreecommitdiffstats
path: root/perl-install/harddrake
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-11-06 13:20:21 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-11-06 13:20:21 +0000
commit9091151d546e5d749b47e2efce3ff651784fcc8c (patch)
tree2be2bec5e60f21ffe431eeef74095896ae5efe7f /perl-install/harddrake
parent68a1a2a6f2b9fdb1fd0c833cd9b3d8dcb9d8fd5c (diff)
downloaddrakx-9091151d546e5d749b47e2efce3ff651784fcc8c.tar
drakx-9091151d546e5d749b47e2efce3ff651784fcc8c.tar.gz
drakx-9091151d546e5d749b47e2efce3ff651784fcc8c.tar.bz2
drakx-9091151d546e5d749b47e2efce3ff651784fcc8c.tar.xz
drakx-9091151d546e5d749b47e2efce3ff651784fcc8c.zip
replace "_" with "N" and "__" with "N_"
rationale: - currently, we use _("xxx") as a shorthand for gettext("xxx"). It also used to call xgettext with --keyword=_ - alas, function &_ is global and not by package (notice esp. that _ is not exported in common.pm) - this lead to big ugly pb with packages defining their own &_, overriding common.pm's &_ - a fix is to set @::textdomains to add a new domain (the default being "libDrakX") but relying on the global "_" is still dangerous!
Diffstat (limited to 'perl-install/harddrake')
-rw-r--r--perl-install/harddrake/data.pm2
-rw-r--r--perl-install/harddrake/sound.pm30
-rw-r--r--perl-install/harddrake/ui.pm90
-rw-r--r--perl-install/harddrake/v4l.pm26
4 files changed, 74 insertions, 74 deletions
diff --git a/perl-install/harddrake/data.pm b/perl-install/harddrake/data.pm
index efa673ed1..372ce504b 100644
--- a/perl-install/harddrake/data.pm
+++ b/perl-install/harddrake/data.pm
@@ -67,7 +67,7 @@ sub custom_id {
my ($device, $str) = @_;
defined($device->{device}) ? $device->{device} :
(defined($device->{processor}) ?
- "$device->{vendor_id} $device->{name} " . _("cpu number ") . $device->{processor} :
+ "$device->{vendor_id} $device->{name} " . N("cpu number ") . $device->{processor} :
(defined($device->{description}) ? $device->{description} : $str));
}
diff --git a/perl-install/harddrake/sound.pm b/perl-install/harddrake/sound.pm
index 4e2c0c21e..6c8c80d69 100644
--- a/perl-install/harddrake/sound.pm
+++ b/perl-install/harddrake/sound.pm
@@ -165,23 +165,23 @@ sub switch {
if ($alternative) {
my $new_driver = $alternative->[0];
if ($new_driver eq 'unknown') {
- $in->ask_warn(_("No alternative driver"),
- _("There's no known OSS/ALSA alternative driver for your sound card (%s) which currently uses \"%s\"",
+ $in->ask_warn(N("No alternative driver"),
+ N("There's no known OSS/ALSA alternative driver for your sound card (%s) which currently uses \"%s\"",
$device->{description}, $driver));
- } elsif ($in->ask_from(_("Sound configuration"),
- _("Here you can select an alternative driver (either OSS or ALSA) for your sound card (%s).",
+ } elsif ($in->ask_from(N("Sound configuration"),
+ N("Here you can select an alternative driver (either OSS or ALSA) for your sound card (%s).",
$device->{description}) .
- _("\n\nYour card currently use the %s\"%s\" driver (default driver for your card is \"%s\")", ($driver =~ /^snd-/ ? "ALSA " : "OSS "), $driver, $device->{driver}),
+ N("\n\nYour card currently use the %s\"%s\" driver (default driver for your card is \"%s\")", ($driver =~ /^snd-/ ? "ALSA " : "OSS "), $driver, $device->{driver}),
[
- { label => _("Driver:"), val => \$new_driver, list => $alternative, default => $new_driver, sort =>1, format => sub {
+ { label => N("Driver:"), val => \$new_driver, list => $alternative, default => $new_driver, sort =>1, format => sub {
my %des = category2modules_and_description('multimedia/sound');
"$_[0] (". $des{$_[0]} . ')'
}, allow_empty_list => 1 },
{
- val => _("Help"), disabled => sub { },
+ val => N("Help"), disabled => sub { },
clicked => sub {
- $in->ask_warn(_("Switching between ALSA and OSS help"),
- _("OSS (Open Sound System) was the first sound API. It's an OS independant sound API (it's available on most unices systems) but it's a very basic and limited API.
+ $in->ask_warn(N("Switching between ALSA and OSS help"),
+ N("OSS (Open Sound System) was the first sound API. It's an OS independant sound API (it's available on most unices systems) but it's a very basic and limited API.
What's more, OSS drivers all reinvent the wheel.
ALSA (Advanced Linux Sound Architecture) is a modularized architecture which
@@ -197,20 +197,20 @@ To use alsa, one can either use:
{
return if ($new_driver eq $driver);
standalone::explanations("switching audio driver from '$driver' to '$new_driver'\n");
- $in->ask_warn(_("Warning"), _("The old \"%s\" driver is blacklisted.\n
+ $in->ask_warn(N("Warning"), N("The old \"%s\" driver is blacklisted.\n
It has been reported to oopses the kernel on unloading.\n
The new \"%s\" driver'll only be used on next bootstrap.", $driver, $new_driver)) if $blacklisted;
- my $wait = $in->wait_message(_("Please wait"),_("Please Wait... Applying the configuration"));
+ my $wait = $in->wait_message(N("Please wait"),N("Please Wait... Applying the configuration"));
do_switch($driver, $new_driver);
undef $wait;
}
} elsif ($driver eq "unknown") {
- $in->ask_warn(_("No known driver"),
- _("There's no known driver for your sound card (%s)",
+ $in->ask_warn(N("No known driver"),
+ N("There's no known driver for your sound card (%s)",
$device->{description}));
} else {
- $in->ask_warn(_("Unkown driver"),
- _("The \"%s\" driver for your sound card is unlisted\n
+ $in->ask_warn(N("Unkown driver"),
+ N("The \"%s\" driver for your sound card is unlisted\n
Please send the output of the \"lspcidrake -v\" command to
<install at mandrakesoft dot com>
with subject: unlisted sound driver \"%s\"")
diff --git a/perl-install/harddrake/ui.pm b/perl-install/harddrake/ui.pm
index b2ec58a9e..627abeed2 100644
--- a/perl-install/harddrake/ui.pm
+++ b/perl-install/harddrake/ui.pm
@@ -11,33 +11,33 @@ use interactive;
# { field => [ short_translation, full_description] }
my %fields =
(
- "alternative_drivers" => [ _("Alternative drivers"),
- _("the list of alternative drivers for this sound card")],
+ "alternative_drivers" => [ N("Alternative drivers"),
+ N("the list of alternative drivers for this sound card")],
"bus" =>
- [ _("Bus"),
- _("this is the physical bus on which the device is plugged (eg: PCI, USB, ...)")],
- "channel" => [_("Channel"), _("EIDE/SCSI channel")],
+ [ N("Bus"),
+ N("this is the physical bus on which the device is plugged (eg: PCI, USB, ...)")],
+ "channel" => [N("Channel"), N("EIDE/SCSI channel")],
"bus_id" =>
- [ _("Bus identification"),
- _("- PCI and USB devices: this list the vendor, device, subvendor and subdevice PCI/USB ids")],
+ [ N("Bus identification"),
+ N("- PCI and USB devices: this list the vendor, device, subvendor and subdevice PCI/USB ids")],
"bus_location" =>
- [ _("Location on the bus"),
- _("- pci devices: this gives the PCI slot, device and function of this card
+ [ N("Location on the bus"),
+ N("- pci devices: this gives the PCI slot, device and function of this card
- eide devices: the device is either a slave or a master device
- scsi devices: the scsi bus and the scsi device ids")],
- "description" => [ _("Description"), _("this field describe the device")],
- "device" => [ _("Old device file"),
- _("old static device name used in dev package")],
- "devfs_device" => [ _("New devfs device"),
- _("new dinamic device name generated by incore kernel devfs")],
- "driver" => [ _("Module"), _("the module of the GNU/Linux kernel that handle that device")],
- "media_type" => [ _("Media class"), _("class of hardware device")],
- "Model" => [_("Model"), _("hard disk model")],
- "nbuttons" => [ _("Number of buttons"), "the number of buttons the mouse have"],
- "name" => [ _("Name"), "the name of the cpu"],
- "processor" => [ _("Processor ID"), _("the number of the processor")],
- "Vendor" => [ _("Vendor"), _("the vendor name of the device")],
- "vendor_id" => [ _("Vendor"), _("the vendor name of the processor")]
+ "description" => [ N("Description"), N("this field describe the device")],
+ "device" => [ N("Old device file"),
+ N("old static device name used in dev package")],
+ "devfs_device" => [ N("New devfs device"),
+ N("new dinamic device name generated by incore kernel devfs")],
+ "driver" => [ N("Module"), N("the module of the GNU/Linux kernel that handle that device")],
+ "media_type" => [ N("Media class"), N("class of hardware device")],
+ "Model" => [N("Model"), N("hard disk model")],
+ "nbuttons" => [ N("Number of buttons"), "the number of buttons the mouse have"],
+ "name" => [ N("Name"), "the name of the cpu"],
+ "processor" => [ N("Processor ID"), N("the number of the processor")],
+ "Vendor" => [ N("Vendor"), N("the vendor name of the device")],
+ "vendor_id" => [ N("Vendor"), N("the vendor name of the processor")]
);
@@ -67,28 +67,28 @@ my ($modem_check_box, $printer_check_box);
my @menu_items =
(
- { path => _("/_File"), type => '<Branch>' },
- { path => _("/_File")._("/_Quit"), accelerator => _("<control>Q"), callback => \&quit_global },
-# { path => _("/_Options")._("/Autodetect _printers"), type => '<CheckItem>',
+ { path => N("/_File"), type => '<Branch>' },
+ { path => N("/_File").N("/_Quit"), accelerator => N("<control>Q"), callback => \&quit_global },
+# { path => N("/_Options").N("/Autodetect _printers"), type => '<CheckItem>',
# callback => sub { $options{PRINTERS_DETECTION} ^= 1 } },
-# { path => _("/_Options")._("/Autodetect _modems"), type => '<CheckItem>',
+# { path => N("/_Options").N("/Autodetect _modems"), type => '<CheckItem>',
# callback => sub { $options{MODEMS_DETECTION} ^= 1 } },
- { path => _("/_Help"), type => '<Branch>' },
+ { path => N("/_Help"), type => '<Branch>' },
{
- path => _("/_Help")._("/_Help..."),
+ path => N("/_Help").N("/_Help..."),
callback => sub {
- $in->ask_warn(_("Harddrake help"),
- _("Description of the fields:\n\n")
+ $in->ask_warn(N("Harddrake help"),
+ N("Description of the fields:\n\n")
. join("\n\n", map { if_($fields{$_}[0], "$fields{$_}[0]: $fields{$_}[1]")} keys %fields));
}
},
- { path => _("/_Help")._("/_Report Bug"),
+ { path => N("/_Help").N("/_Report Bug"),
callback => sub { unless (fork) { exec("drakbug --report harddrake2 &") } } },
- { path => _("/_Help")._("/_About..."),
+ { path => N("/_Help").N("/_About..."),
callback => sub {
- $in->ask_warn(_("About Harddrake"),
- join ("", _("This is HardDrake, a Mandrake hardware configuration tool.\nVersion:"), " $harddrake::data::version\n",
- _("Author:"), " Thierry Vignaud <tvignaud\@mandrakesoft.com> \n\n" ,
+ $in->ask_warn(N("About Harddrake"),
+ join ("", N("This is HardDrake, a Mandrake hardware configuration tool.\nVersion:"), " $harddrake::data::version\n",
+ N("Author:"), " Thierry Vignaud <tvignaud\@mandrakesoft.com> \n\n" ,
formatAlaTeX($license)));
}
}
@@ -103,7 +103,7 @@ sub detect {
next if $Ident =~ /(MODEM|PRINTER)/ && "@ARGV" =~ /test/;
next if $Ident =~ /MODEM/ && !$options{MODEMS_DETECTION};
next if $Ident =~ /PRINTER/ && !$options{PRINTERS_DETECTION};
-# print _("Probing %s class\n", $Ident);
+# print N("Probing %s class\n", $Ident);
# standalone::explanations("Probing %s class\n", $Ident);
my @devices = &$detector;
@@ -125,7 +125,7 @@ sub detect {
}
# EIDE detection incoherency:
if (exists $_->{bus} && $_->{bus} eq 'ide') {
- $_->{channel} = _($_->{channel} ? "secondary" : "primary");
+ $_->{channel} = $_->{channel} ? N("secondary") : N("primary");
delete $_->{info};
} elsif ((exists $_->{id}) && ($_->{bus} ne 'PCI')) {
# SCSI detection incoherency:
@@ -150,7 +150,7 @@ sub new {
my ($sig_id, $wait);
unless ($::isEmbedded) {
$in = 'interactive'->vnew('su', 'default');
- $wait = $in->wait_message(_("Please wait"), _("Detection in progress"));
+ $wait = $in->wait_message(N("Please wait"), N("Detection in progress"));
my_gtk::flush;
}
%options = getVarsFromSh($conffile);
@@ -158,7 +158,7 @@ sub new {
# Build the gui
add_icon_path('/usr/share/pixmaps/harddrake2/');
- $w = my_gtk->new((_("Harddrake2 version ") . $harddrake::data::version));
+ $w = my_gtk->new((N("Harddrake2 version ") . $harddrake::data::version));
$w->{window}->set_usize(760, 550) unless $::isEmbedded;
$options{MODEMS_DETECTION} = 1 unless defined $options{MODEMS_DETECTION};
$options{PRINTERS_DETECTION} = 1 unless defined $options{PRINTERS_DETECTION};
@@ -170,18 +170,18 @@ sub new {
my $statusbar = new Gtk::Statusbar));
$main_vbox->set_child_packing($statusbar, 0, 0, 0, 'start');
if ($::isEmbedded) {
- $main_vbox->add(gtksignal_connect(my $but = new Gtk::Button(_("Quit")),
+ $main_vbox->add(gtksignal_connect(my $but = new Gtk::Button(N("Quit")),
'clicked' => \&quit_global));
$main_vbox->set_child_packing($but, 0, 0, 0, 'start');
} else { $main_vbox->set_child_packing($menubar, 0, 0, 0, 'start') }
- $hpaned->pack1(gtkadd(new Gtk::Frame(_("Detected hardware")), createScrolledWindow(my $tree = new Gtk::CTree(1, 0))), 1, 1);
+ $hpaned->pack1(gtkadd(new Gtk::Frame(N("Detected hardware")), createScrolledWindow(my $tree = new Gtk::CTree(1, 0))), 1, 1);
$hpaned->pack2(my $vbox = gtkadd(gtkadd(gtkadd(new Gtk::VBox,
- gtkadd(new Gtk::Frame(_("Information")),
+ gtkadd(new Gtk::Frame(N("Information")),
gtkadd(new Gtk::HBox,
createScrolledWindow(my $text = new Gtk::Text)))),
- my $module_cfg_button = new Gtk::Button(_("Configure module"))),
- my $config_button = new Gtk::Button(_("Run config tool"))), 1, 1);
+ my $module_cfg_button = new Gtk::Button(N("Configure module"))),
+ my $config_button = new Gtk::Button(N("Run config tool"))), 1, 1);
$vbox->set_child_packing($config_button, 0, 0, 0, 'start');
$vbox->set_child_packing($module_cfg_button, 0, 0, 0, 'start');
@@ -229,7 +229,7 @@ sub new {
$IDs{tool} = $config_button->signal_connect(clicked => sub {
return if defined $pid;
if ($pid = fork()) {
- $sig_id = $statusbar->push($statusbar->get_context_id("id"), _("Running \"%s\" ...", $configurator));
+ $sig_id = $statusbar->push($statusbar->get_context_id("id"), N("Running \"%s\" ...", $configurator));
} else { exec($configurator) or die "$configurator missing\n" }
}) ;
$config_button->show;
diff --git a/perl-install/harddrake/v4l.pm b/perl-install/harddrake/v4l.pm
index 414d26a84..47cce15cf 100644
--- a/perl-install/harddrake/v4l.pm
+++ b/perl-install/harddrake/v4l.pm
@@ -11,7 +11,7 @@ use modules;
# please update me on bttv update :
-my $default = _("Auto-detect");
+my $default = N("Auto-detect");
# TODO: split %tuners_lst in per driver perl source files that get transformed in Storable files
my %tuners_lst =
(
@@ -61,8 +61,8 @@ my %tuners_lst =
# Tweaked from Cardlist
my $cards_lst = {
'bttv' => {
- _("Auto-detect") => -1,
- _("Unknown|Generic") => 0,
+ N("Auto-detect") => -1,
+ N("Unknown|Generic") => 0,
"M|Miro|PCTV" => 1,
"Hauppauge|bt848" => 2,
"S|STB|Hauppauge 878" => 3,
@@ -94,8 +94,8 @@ my $cards_lst = {
"A|Askey|CPH06X (bt878)" => 24,
"G|Guillemot|Maxi TV Video 3" => 24,
"A|Askey|CPH05X (bt878)" => 24,
- _("Unknown|CPH05X (bt878) [many vendors]") => 24,
- _("Unknown|CPH06X (bt878) [many vendors]") => 24,
+ N("Unknown|CPH05X (bt878) [many vendors]") => 24,
+ N("Unknown|CPH06X (bt878) [many vendors]") => 24,
"T|Terratec|Terra TV+ Version 1.0 (Bt848)" => 25,
"Vobis|TV-Boostar" => 25,
"T|Terratec|TV-Boostar" => 25,
@@ -182,7 +182,7 @@ my $cards_lst = {
"Hauppauge|WinTV PVR" => 80
},
'saa7134' => {
- _("Unknown|Generic") => 0,
+ N("Unknown|Generic") => 0,
"Proteus|Pro [philips reference design]" => 1,
"LifeView|FlyVIDEO3000" => 2,
"LifeView|FlyVIDEO2000" => 3,
@@ -197,7 +197,7 @@ my $cards_lst = {
my %pll_lst =
(
- -1 => _("Default"),
+ -1 => N("Default"),
0 => "don't use pll",
1 => "28 Mhz Crystal (X)",
2 =>"35 Mhz Crystal"
@@ -206,15 +206,15 @@ my %pll_lst =
sub config {
my ($in, $driver) = @_;
my %conf = (gbuffers => 4, card => $default, tuner => -1, radio => 0, pll => -1);
- if ($in->ask_from("BTTV configuration", _("For most modern TV cards, the bttv module of the GNU/Linux kernel just auto-detect the rights parameters.
+ if ($in->ask_from("BTTV configuration", N("For most modern TV cards, the bttv module of the GNU/Linux kernel just auto-detect the rights parameters.
If your card is misdetected, you can force the right tuner and card types here. Just select your tv card parameters if needed"),
[
- { label => _("Card model:"), val => \$conf{card}, list => [keys %{$cards_lst->{$driver}}], type => 'combo', default => -1, sort =>1, separator => '|'},
- { label => _("Tuner type:"), val => \$conf{tuner}, list => [keys %tuners_lst], format => sub { $tuners_lst{$_[0]} }, sort => 1, separator => '|'},
- { label => _("Number of capture buffers:"), val => \$conf{gbuffers}, min=>2, max=>32, sort => 1, default => 0, type=>'range', advanced =>1, help => _("number of capture buffers for mmap'ed capture")},
+ { label => N("Card model:"), val => \$conf{card}, list => [keys %{$cards_lst->{$driver}}], type => 'combo', default => -1, sort =>1, separator => '|'},
+ { label => N("Tuner type:"), val => \$conf{tuner}, list => [keys %tuners_lst], format => sub { $tuners_lst{$_[0]} }, sort => 1, separator => '|'},
+ { label => N("Number of capture buffers:"), val => \$conf{gbuffers}, min=>2, max=>32, sort => 1, default => 0, type=>'range', advanced =>1, help => N("number of capture buffers for mmap'ed capture")},
if_($driver eq 'bttv',
- { label => _("PLL setting:"), val => \$conf{pll}, list => [keys %pll_lst], format => sub { $pll_lst{$_[0]} }, sort => 1, default => 0, advanced =>1},
- { label => _("Radio support:"), val => \$conf{radio}, type => "bool", text => _("enable radio support")}),
+ { label => N("PLL setting:"), val => \$conf{pll}, list => [keys %pll_lst], format => sub { $pll_lst{$_[0]} }, sort => 1, default => 0, advanced =>1},
+ { label => N("Radio support:"), val => \$conf{radio}, type => "bool", text => N("enable radio support")}),
]
))
{