summaryrefslogtreecommitdiffstats
path: root/perl-install/harddrake/ui.pm
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/ui.pm
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/ui.pm')
-rw-r--r--perl-install/harddrake/ui.pm90
1 files changed, 45 insertions, 45 deletions
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;