From 9091151d546e5d749b47e2efce3ff651784fcc8c Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 6 Nov 2002 13:20:21 +0000 Subject: 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! --- perl-install/standalone/XFdrake | 5 +- perl-install/standalone/drakTermServ | 116 +++--- perl-install/standalone/drakautoinst | 44 +-- perl-install/standalone/drakbackup | 610 +++++++++++++++--------------- perl-install/standalone/drakboot | 2 +- perl-install/standalone/drakbug | 68 ++-- perl-install/standalone/drakconnect | 180 ++++----- perl-install/standalone/drakfloppy | 58 +-- perl-install/standalone/drakfont | 157 ++++---- perl-install/standalone/drakgw | 114 +++--- perl-install/standalone/drakperm | 58 +-- perl-install/standalone/draksound | 6 +- perl-install/standalone/draksplash | 70 ++-- perl-install/standalone/drakxtv | 48 +-- perl-install/standalone/harddrake2 | 2 +- perl-install/standalone/keyboarddrake | 8 +- perl-install/standalone/livedrake | 6 +- perl-install/standalone/localedrake | 2 +- perl-install/standalone/logdrake | 102 ++--- perl-install/standalone/mousedrake | 8 +- perl-install/standalone/net_monitor | 66 ++-- perl-install/standalone/printerdrake | 2 +- perl-install/standalone/scannerdrake | 30 +- perl-install/standalone/service_harddrake | 8 +- 24 files changed, 882 insertions(+), 888 deletions(-) (limited to 'perl-install/standalone') diff --git a/perl-install/standalone/XFdrake b/perl-install/standalone/XFdrake index 608c2e424..80f324fe0 100755 --- a/perl-install/standalone/XFdrake +++ b/perl-install/standalone/XFdrake @@ -25,6 +25,7 @@ use Xconfig::main; use Xconfig::xfree; use Xconfig::default; use interactive; +use modules; use common; use any; use c; @@ -145,11 +146,11 @@ sub ask_for_X_restart { my ($wm, $pid) = any::running_window_manager(); if (!$wm) { - $in->ask_warn('', _("Please log out and then use Ctrl-Alt-BackSpace")); + $in->ask_warn('', N("Please log out and then use Ctrl-Alt-BackSpace")); return; } - $in->ask_okcancel('', _("Please relog into %s to activate the changes", ucfirst (lc $wm)), 1) or return; + $in->ask_okcancel('', N("Please relog into %s to activate the changes", ucfirst (lc $wm)), 1) or return; fork and return; any::ask_window_manager_to_logout($wm); diff --git a/perl-install/standalone/drakTermServ b/perl-install/standalone/drakTermServ index 9dd97f9f1..2d438757c 100755 --- a/perl-install/standalone/drakTermServ +++ b/perl-install/standalone/drakTermServ @@ -234,7 +234,7 @@ sub display_error { $error_box = gtkpack_(new Gtk::VBox(0,0), 1, new Gtk::Label($message), 0, gtkadd(gtkset_layout(new Gtk::HButtonBox, -spread), - gtksignal_connect(new Gtk::Button(_("OK")), clicked => + gtksignal_connect(new Gtk::Button(N("OK")), clicked => sub { ${$central_widget}->destroy(); create_fontsel() }), ), ) @@ -249,7 +249,7 @@ sub interactive_mode { $window1 = $::isEmbedded ? new Gtk::Plug ($::XID) : new Gtk::Window -toplevel; $window1->signal_connect (delete_event => sub { Gtk->exit(0) }); $window1->set_position(1); - $window1->set_title(_("Mandrake Terminal Server Configuration")); + $window1->set_title(N("Mandrake Terminal Server Configuration")); $window1->set_border_width(5); my ($pix_user_map, $pix_user_mask) = gtkcreate_png("ic82-network-40"); my ($pix_u_map, $pix_u_mask) = gtkcreate_png("drakTS.620x57"); @@ -264,14 +264,14 @@ sub interactive_mode { ), 1, gtkpack_(new Gtk::HBox(0,2), 0, gtkadd(gtkset_layout(new Gtk::VButtonBox, -end), - gtksignal_connect(new Gtk::Button(_("Enable Server")), clicked => + gtksignal_connect(new Gtk::Button(N("Enable Server")), clicked => sub { ${$central_widget}->destroy(); $windows = 1; cursor_wait(); enable_ts(); cursor_norm(); }), - gtksignal_connect(new Gtk::Button(_("Disable Server")), clicked => + gtksignal_connect(new Gtk::Button(N("Disable Server")), clicked => sub { ${$central_widget}->destroy(); cursor_wait(); disable_ts(); @@ -279,14 +279,14 @@ sub interactive_mode { }), ), 0, gtkadd(gtkset_layout(new Gtk::VButtonBox, -end), - gtksignal_connect(new Gtk::Button(_("Start Server")), clicked => + gtksignal_connect(new Gtk::Button(N("Start Server")), clicked => sub { ${$central_widget}->destroy(); $windows = 0; cursor_wait(); start_ts(); cursor_norm(); }), - gtksignal_connect(new Gtk::Button(_("Stop Server")), clicked => + gtksignal_connect(new Gtk::Button(N("Stop Server")), clicked => sub { ${$central_widget}->destroy(); cursor_wait(); stop_ts(); @@ -294,22 +294,22 @@ sub interactive_mode { }), ), 0, gtkadd(gtkset_layout(new Gtk::VButtonBox, -end), - gtksignal_connect(new Gtk::Button(_("Etherboot Floppy/ISO")), clicked => + gtksignal_connect(new Gtk::Button(N("Etherboot Floppy/ISO")), clicked => sub { ${$central_widget}->destroy(); $windows = 1; make_boot() }), - gtksignal_connect(new Gtk::Button(_("Net Boot Images")), clicked => + gtksignal_connect(new Gtk::Button(N("Net Boot Images")), clicked => sub { ${$central_widget}->destroy(); make_nbi() }), ), 0, gtkadd(gtkset_layout(new Gtk::VButtonBox, -end), - gtksignal_connect(new Gtk::Button(_("Add/Del Users")), clicked => + gtksignal_connect(new Gtk::Button(N("Add/Del Users")), clicked => sub { ${$central_widget}->destroy(); $windows = 0; maintain_users() }), - gtksignal_connect(new Gtk::Button(_("Add/Del Clients")), clicked => + gtksignal_connect(new Gtk::Button(N("Add/Del Clients")), clicked => sub { ${$central_widget}->destroy(); maintain_clients()}), ), 1, new Gtk::HBox(0,2), 0, gtkadd(gtkset_layout(new Gtk::VButtonBox, -end), - gtksignal_connect(new Gtk::Button(_("Help")),clicked => + gtksignal_connect(new Gtk::Button(N("Help")),clicked => sub { ${$central_widget}->destroy(); help() }), - gtksignal_connect(new Gtk::Button(_("Close")), clicked => + gtksignal_connect(new Gtk::Button(N("Close")), clicked => sub { write_conf_file(); $::isEmbedded and kill 'USR1', $::CCPID; Gtk->main_quit() @@ -364,7 +364,7 @@ sub about { 0, new Gtk::VScrollbar($text->vadj), ), 0, gtkadd(gtkset_layout(new Gtk::HButtonBox, -spread), - gtksignal_connect(new Gtk::Button(_("OK")), clicked => + gtksignal_connect(new Gtk::Button(N("OK")), clicked => sub { ${$central_widget}->destroy(); create_fontsel() }), ), ) @@ -481,7 +481,7 @@ sub help { 0, new Gtk::VScrollbar($text->vadj), ), 0, gtkadd(gtkset_layout(new Gtk::HButtonBox, -spread), - gtksignal_connect(new Gtk::Button(_("OK")), clicked => + gtksignal_connect(new Gtk::Button(N("OK")), clicked => sub { ${$central_widget}->destroy() }), ), ) @@ -512,9 +512,9 @@ sub make_boot { createScrolledWindow($list_nics), gtkadd(new Gtk::VBox(1,10), new Gtk::HBox(0,20), - gtksignal_connect(new Gtk::Button(_("Boot Floppy")), clicked => + gtksignal_connect(new Gtk::Button(N("Boot Floppy")), clicked => sub { write_eb_image($nic, $rom_path, "floppy") }), - gtksignal_connect(new Gtk::Button(_("Boot ISO")), clicked => + gtksignal_connect(new Gtk::Button(N("Boot ISO")), clicked => sub { write_eb_image($nic, $rom_path, "iso") }), new Gtk::HBox(0,20), ), @@ -583,9 +583,9 @@ sub make_nbi { 0, gtkadd(new Gtk::HBox(0,10), createScrolledWindow($tree_kernels), gtkadd(new Gtk::VBox(1,10), - gtksignal_connect(new Gtk::Button(_("Build Whole Kernel -->")), clicked => + gtksignal_connect(new Gtk::Button(N("Build Whole Kernel -->")), clicked => sub { if ($kernel) { - $in->ask_warn('',_("This will take a few minutes.")); + $in->ask_warn('',N("This will take a few minutes.")); cursor_wait(); system("/usr/bin/mknbi-set -k /boot/$kernel"); $list_nbis->clear_items(); @@ -597,10 +597,10 @@ sub make_nbi { } cursor_norm(); } else { - $in->ask_warn('',_("No kernel selected!")) if !($kernel); + $in->ask_warn('',N("No kernel selected!")) if !($kernel); } }), - gtksignal_connect(new Gtk::Button(_("Build Single NIC -->")), clicked => + gtksignal_connect(new Gtk::Button(N("Build Single NIC -->")), clicked => sub { if ($nic) { system("/usr/bin/mknbi-set -k /boot/$kernel -r $nic"); $list_nbis->clear_items(); @@ -611,11 +611,11 @@ sub make_nbi { select => sub { $nbi = $t }))); } } else { - $in->ask_warn('',_("No nic selected!")); + $in->ask_warn('',N("No nic selected!")); } }), - gtksignal_connect(new Gtk::Button(_("Build All Kernels -->")), clicked => - sub { $in->ask_warn('',_("This will take a few minutes.")); + gtksignal_connect(new Gtk::Button(N("Build All Kernels -->")), clicked => + sub { $in->ask_warn('',N("This will take a few minutes.")); cursor_wait(); system("/usr/bin/mknbi-set"); $list_nbis->clear_items(); @@ -628,14 +628,14 @@ sub make_nbi { cursor_norm(); }), new Gtk::HBox(1,1), - gtksignal_connect(new Gtk::Button(_("<-- Delete")), clicked => + gtksignal_connect(new Gtk::Button(N("<-- Delete")), clicked => sub { my $nbi = "/var/lib/tftpboot/" . $nbi; my $result = unlink($nbi) || warn("Can't delete $nbi..."); if ($result eq 1) { $list_nbis->remove_items($list_nbis->selection); } }), - gtksignal_connect(new Gtk::Button(_("Delete All NBIs")), clicked => + gtksignal_connect(new Gtk::Button(N("Delete All NBIs")), clicked => sub { cursor_wait(); foreach (grep(/\.nbi/, all("/var/lib/tftpboot"))) { my $nbi = "/var/lib/tftpboot/" . $_; @@ -692,12 +692,12 @@ sub maintain_users { gtkpack($status_box, $user_box = gtkpack_(new Gtk::VBox(0,10), - 0, gtkadd(new Gtk::Label(_("!!! Indicates the password in the system database is different than\n the one in the Terminal Server database.\nDelete/re-add the user to the Terminal Server to enable login."))), + 0, gtkadd(new Gtk::Label(N("!!! Indicates the password in the system database is different than\n the one in the Terminal Server database.\nDelete/re-add the user to the Terminal Server to enable login."))), 0, gtkadd(new Gtk::HBox(0,20), createScrolledWindow($list_sys_users), gtkadd(new Gtk::VBox(1,10), new Gtk::HBox(0,10), - gtksignal_connect(new Gtk::Button(_("Add User -->")), clicked => + gtksignal_connect(new Gtk::Button(N("Add User -->")), clicked => sub { my $result = adduser(0, $sys_user); if ($result eq 0) { $list_ts_users->add(gtkshow(gtksignal_connect(new Gtk::ListItem($sys_user), @@ -705,7 +705,7 @@ sub maintain_users { $list_ts_users->show() }))); } }), - gtksignal_connect(new Gtk::Button(_("<-- Del User")), clicked => + gtksignal_connect(new Gtk::Button(N("<-- Del User")), clicked => sub { deluser(0, $ts_user); $list_ts_users->remove_items($list_ts_users->selection); }), @@ -744,7 +744,7 @@ sub maintain_clients { $c_detail->append($c_det_ip); $c_det_ip->show(); - my $c_det_type = new_with_label Gtk::TreeItem(_("type: %s", $clients{$key}{type})); + my $c_det_type = new_with_label Gtk::TreeItem(N("type: %s", $clients{$key}{type})); $c_detail->append($c_det_type); $c_det_type->show(); @@ -777,7 +777,7 @@ sub maintain_clients { $entry_nbi->set_popdown_strings(@images); $entry_nbi->set_value_in_list(1, 0); } else { - $in->ask_warn('',_("No net boot images created!")); + $in->ask_warn('',N("No net boot images created!")); make_nbi(); return 1; } @@ -797,12 +797,12 @@ sub maintain_clients { ), gtkadd(new Gtk::VBox(1,10), gtkadd(new Gtk::HBox(0,1), - gtksignal_connect($check_thin = new Gtk::CheckButton(_("Thin Client")), clicked => + gtksignal_connect($check_thin = new Gtk::CheckButton(N("Thin Client")), clicked => sub { invbool \$is_thin }), - $check_allow_thin = new Gtk::CheckButton(_("Allow Thin Clients")), + $check_allow_thin = new Gtk::CheckButton(N("Allow Thin Clients")), ), # new Gtk::HBox(1,1), - gtksignal_connect(new Gtk::Button(_("Add Client -->")), clicked => + gtksignal_connect(new Gtk::Button(N("Add Client -->")), clicked => sub { my $hostname = $entry_host->get_text(); my $mac = $entry_mac->get_text(); my $ip = $entry_ip->get_text(); @@ -845,7 +845,7 @@ sub maintain_clients { } } }), - gtksignal_connect(new Gtk::Button(_("<-- Edit Client")), clicked => + gtksignal_connect(new Gtk::Button(N("<-- Edit Client")), clicked => sub { $entry_host->set_text($client); $entry_mac->set_text($clients{$client}{hardware}); $entry_ip->set_text($clients{$client}{address}); @@ -861,13 +861,13 @@ sub maintain_clients { $tree_clients->remove_items($tree_clients->selection); } }), - gtksignal_connect(new Gtk::Button(_("Delete Client")), clicked => + gtksignal_connect(new Gtk::Button(N("Delete Client")), clicked => sub { my $result = delclient(0, $client); if ($result eq 0) { $tree_clients->remove_items($tree_clients->selection); } }), - gtksignal_connect(new Gtk::Button(_("dhcpd Config...")), clicked => + gtksignal_connect(new Gtk::Button(N("dhcpd Config...")), clicked => sub { ${$central_widget}->destroy(); dhcpd_config() }), # new Gtk::HBox(1,1), ), @@ -900,7 +900,7 @@ sub maintain_clients { standalone::explanations("Modified files /etc/inittab, /etc/X11/xdm/xdm-config, /usr/share/config/kdm/kdmrc, /etc/X11/gdm/gdm.conf"); update_hosts_allow("disable"); } - $in->ask_warn('',_("Need to restart the Display Manager for full changes to take effect. \n(service dm restart - at the console)")); + $in->ask_warn('',N("Need to restart the Display Manager for full changes to take effect. \n(service dm restart - at the console)")); } ); $central_widget = \$client_box; @@ -918,42 +918,42 @@ sub dhcpd_config { #- entry boxes for data entry my $box_subnet = new Gtk::HBox(0,0); - my $label_subnet = new Gtk::Label(_("Subnet:")); + my $label_subnet = new Gtk::Label(N("Subnet:")); $label_subnet->set_justify('right'); my $entry_subnet = new Gtk::Entry(20); $box_subnet->pack_end($entry_subnet, 0, 0, 10); $box_subnet->pack_end($label_subnet, 0, 0, 10); my $box_netmask = new Gtk::HBox(0,0); - my $label_netmask = new Gtk::Label(_("Netmask:")); + my $label_netmask = new Gtk::Label(N("Netmask:")); $label_netmask->set_justify('left'); my $entry_netmask = new Gtk::Entry(20); $box_netmask->pack_end($entry_netmask, 0, 0, 10); $box_netmask->pack_end($label_netmask, 0, 0, 10); my $box_routers = new Gtk::HBox(0,0); - my $label_routers = new Gtk::Label(_("Routers:")); + my $label_routers = new Gtk::Label(N("Routers:")); $label_routers->set_justify('left'); my $entry_routers = new Gtk::Entry(20); $box_routers->pack_end($entry_routers, 0, 0, 10); $box_routers->pack_end($label_routers, 0, 0, 10); my $box_subnet_mask = new Gtk::HBox(0,0); - my $label_subnet_mask = new Gtk::Label(_("Subnet Mask:")); + my $label_subnet_mask = new Gtk::Label(N("Subnet Mask:")); $label_subnet_mask->set_justify('left'); my $entry_subnet_mask = new Gtk::Entry(); $box_subnet_mask->pack_end($entry_subnet_mask, 0, 0, 10); $box_subnet_mask->pack_end($label_subnet_mask, 0, 0, 10); my $box_broadcast = new Gtk::HBox(0,0); - my $label_broadcast = new Gtk::Label(_("Broadcast Address:")); + my $label_broadcast = new Gtk::Label(N("Broadcast Address:")); $label_broadcast->set_justify('left'); my $entry_broadcast = new Gtk::Entry(20); $box_broadcast->pack_end($entry_broadcast, 0, 0, 10); $box_broadcast->pack_end($label_broadcast, 0, 0, 10); my $box_domain = new Gtk::HBox(0,0); - my $label_domain = new Gtk::Label(_("Domain Name:")); + my $label_domain = new Gtk::Label(N("Domain Name:")); $label_domain->set_justify('left'); my $entry_domain = new Gtk::Entry(20); $box_domain->pack_end($entry_domain, 0, 0, 10); @@ -961,7 +961,7 @@ sub dhcpd_config { my $box_name_servers = new Gtk::HBox(0,0); my $box_name_servers_entry = new Gtk::VBox(0,0); - my $label_name_servers = new Gtk::Label(_("Name Servers:")); + my $label_name_servers = new Gtk::Label(N("Name Servers:")); $label_name_servers->set_justify('left'); my $entry_name_server1 = new Gtk::Entry(); my $entry_name_server2 = new Gtk::Entry(); @@ -972,8 +972,8 @@ sub dhcpd_config { $box_name_servers->pack_end($box_name_servers_entry, 0, 0, 10); $box_name_servers->pack_end($label_name_servers, 0, 0, 10); - my $label_ip_range_start = new Gtk::Label(_("IP Range Start:")); - my $label_ip_range_end = new Gtk::Label(_("IP Range End:")); + my $label_ip_range_start = new Gtk::Label(N("IP Range Start:")); + my $label_ip_range_end = new Gtk::Label(N("IP Range End:")); my $entry_ip_range_start = new Gtk::Entry(15); my $entry_ip_range_end = new Gtk::Entry(15); @@ -1025,11 +1025,11 @@ sub dhcpd_config { gtkadd($box_name_servers), ), 0, gtkadd(new Gtk::VBox(0,0), - new Gtk::Label(_("dhcpd Server Configuration")."\n\n". - _("Most of these values were extracted\nfrom your running system.\nYou can modify as needed.")), + new Gtk::Label(N("dhcpd Server Configuration")."\n\n". + N("Most of these values were extracted\nfrom your running system.\nYou can modify as needed.")), new Gtk::HSeparator, gtkadd((new Gtk::HBox), - new Gtk::Label(_("Dynamic IP Address Pool:")), + new Gtk::Label(N("Dynamic IP Address Pool:")), ), gtkadd((new Gtk::HBox(0,0)), gtkadd((new Gtk::VBox), @@ -1042,7 +1042,7 @@ sub dhcpd_config { ), ), gtkadd(new Gtk::HBox), - gtksignal_connect(new Gtk::Button(_("Write Config")), clicked => + gtksignal_connect(new Gtk::Button(N("Write Config")), clicked => sub { write_dhcpd_config( $entry_subnet->get_text(), $entry_netmask->get_text(), @@ -1144,16 +1144,16 @@ sub write_eb_image { if ($type eq 'floppy') { my $in = interactive->vnew; if (-e "/dev/fd0") { - my $result = $in->ask_okcancel(_("Please insert floppy disk:")); + my $result = $in->ask_okcancel(N("Please insert floppy disk:")); return if !($result); $result = system("cat $rom_path/boot1a.bin $rom_path/lzrom/$nic > /dev/fd0") if $result; if ($result) { - $in->ask_warn('',_("Couldn't access the floppy!")) + $in->ask_warn('',N("Couldn't access the floppy!")) } else { - $in->ask_warn('',_("Floppy can be removed now")) + $in->ask_warn('',N("Floppy can be removed now")) } } else { - $in->ask_warn('',_("No floppy drive available!")); + $in->ask_warn('',N("No floppy drive available!")); } } else { mkdir_p("/tmp/eb"); @@ -1162,9 +1162,9 @@ sub write_eb_image { system("mkisofs -b eb.img -o /tmp/$nic.iso /tmp/eb"); rm_rf("/tmp/eb"); if (-e "/tmp/$nic.iso") { - $in->ask_warn('',_("Etherboot ISO image is %s", "/tmp/$nic.iso")) + $in->ask_warn('',N("Etherboot ISO image is %s", "/tmp/$nic.iso")) } else { - $in->ask_warn('',_("Something went wrong! - Is mkisofs installed?")) + $in->ask_warn('',N("Something went wrong! - Is mkisofs installed?")) } } } @@ -1183,7 +1183,7 @@ sub enable_ts { print("No /etc/dhcpd.conf built yet - use GUI to create!!\n"); return; } else { - $in->ask_warn('',_("Need to create /etc/dhcpd.conf first!")); + $in->ask_warn('',N("Need to create /etc/dhcpd.conf first!")); #$central_widget->destroy; dhcpd_config(); return; @@ -1489,7 +1489,7 @@ sub update_hosts_allow { if ($mode eq "enable") { my $has_all = `grep ALL /etc/hosts.allow`; if ($has_all) { - $in->ask_warn('',_("/etc/hosts.allow and /etc/hosts.deny already configured - not changed")); + $in->ask_warn('',N("/etc/hosts.allow and /etc/hosts.deny already configured - not changed")); return; } if (!$has_all) { diff --git a/perl-install/standalone/drakautoinst b/perl-install/standalone/drakautoinst index 66cba5e93..a1ce1cbd7 100755 --- a/perl-install/standalone/drakautoinst +++ b/perl-install/standalone/drakautoinst @@ -40,11 +40,11 @@ begin: $::isEmbedded and kill 'USR2', $::CCPID; my $imagefile = "/root/drakx/replay_install.img"; --f $imagefile or $in->ask_okcancel(_("Error!"), - _("I can't find needed image file `%s'.", $imagefile), 1), quit_global($in, 0); +-f $imagefile or $in->ask_okcancel(N("Error!"), + N("I can't find needed image file `%s'.", $imagefile), 1), quit_global($in, 0); -$::direct or $in->ask_okcancel(_("Auto Install Configurator"), -_("You are about to configure an Auto Install floppy. This feature is somewhat dangerous and must be used circumspectly. +$::direct or $in->ask_okcancel(N("Auto Install Configurator"), +N("You are about to configure an Auto Install floppy. This feature is somewhat dangerous and must be used circumspectly. With that feature, you will be able to replay the installation you've performed on this computer, being interactively prompted for some steps, in order to change their values. @@ -62,24 +62,24 @@ my $st = \%steps::installSteps; for (my $f = $st->{first}; $f; $f = $st->{$f}{next}) { next if member($f, @manual_steps); my $def_choice = 'replay'; - push @choices, { label => _($st->{$f}{text}), val => \$def_choice, list => [ _('replay'), _('manual') ] }; + push @choices, { label => translate($st->{$f}{text}), val => \$def_choice, list => [ N("replay"), N("manual") ] }; push @all_steps, [ $f, \$def_choice ]; } -$in->ask_from(_("Automatic Steps Configuration"), - _("Please choose for each step whether it will replay like your install, or it will be manual"), +$in->ask_from(N("Automatic Steps Configuration"), + N("Please choose for each step whether it will replay like your install, or it will be manual"), \@choices ) or quit_global($in, 0); -${$_->[1]} eq _('manual') and push @manual_steps, $_->[0] foreach @all_steps; +${$_->[1]} eq N("manual") and push @manual_steps, $_->[0] foreach @all_steps; my $mountdir = "/root/tmp/drakautoinst-mountdir"; -d $mountdir or mkdir $mountdir, 0755; my $floppy = detect_devices::floppy(); my $dev = devices::make($floppy); -$in->ask_okcancel('', _("Insert a blank floppy in drive %s", $floppy), 1) or quit_global($in, 0); +$in->ask_okcancel('', N("Insert a blank floppy in drive %s", $floppy), 1) or quit_global($in, 0); { - standalone::explanations(_("Creating auto install floppy")); - my $w = $in->wait_message('', _("Creating auto install floppy")); + standalone::explanations(N("Creating auto install floppy")); + my $w = $in->wait_message('', N("Creating auto install floppy")); commands::dd("if=$imagefile", "of=$dev", "bs=1440", "count=1024"); common::sync(); } @@ -127,7 +127,7 @@ if (!$::isEmbedded && $in->isa('interactive::gtk')) { member($_, keys %struct_gui) and push @{$tree{$struct_gui{$_}}}, [$_ , $pixmap{$_}, h2widget($o->{$_}, "\$o->\{$_\}") ] foreach (keys %$o); - my $W = my_gtk->new(_('$o edition')); + my $W = my_gtk->new('$o edition'); my @box_to_hide; my $nb_pages=0; my $notebook = new Gtk::Notebook; @@ -141,7 +141,7 @@ if (!$::isEmbedded && $in->isa('interactive::gtk')) { new Gtk::Pixmap(gtkcreate_png('mdk_logo'))), 1, new Gtk::VBox(0,0), ), - 0, _("\nWelcome.\n\nThe parameters of the auto-install are available in the sections on the left"), + 0, N("\nWelcome.\n\nThe parameters of the auto-install are available in the sections on the left"), 1, new Gtk::VBox(0,0), ), undef); $notebook->show_all; @@ -181,7 +181,7 @@ if (!$::isEmbedded && $in->isa('interactive::gtk')) { gtksignal_connect(gtkadd($button, gtkpack__(new Gtk::VBox(0,3), $b, - _($_->[0]), + translate($_->[0]), ) ), released => sub { $button->get_active() or $button->set_active(1),return; @@ -199,15 +199,15 @@ if (!$::isEmbedded && $in->isa('interactive::gtk')) { ), 0, new Gtk::HSeparator, 0, gtkadd(gtkset_border_width(gtkset_layout(new Gtk::HButtonBox, 'end'), 5), - gtksignal_connect(new Gtk::Button(_("Accept")), clicked => sub { Gtk->main_quit; }), - gtksignal_connect(new Gtk::Button(_("Cancel")), clicked => sub { $o = $o_old; Gtk->main_quit; quit_global($in, 0) }), + gtksignal_connect(new Gtk::Button(N("Accept")), clicked => sub { Gtk->main_quit; }), + gtksignal_connect(new Gtk::Button(N("Cancel")), clicked => sub { $o = $o_old; Gtk->main_quit; quit_global($in, 0) }), ) ) ); $_->hide foreach @box_to_hide; # $W->{window}->show_all; # gtkadd($W->{window}, -# gtkpack_($W->create_box_with_title(_("Edit variables")), +# gtkpack_($W->create_box_with_title(N("Edit variables")), # 1, my $notebook = create_notebook( map { $_, h2widget($o->{$_}, "\$o->\{$_\}") } keys %$o ), # 0, gtkpack(gtkset_border_width(new Gtk::HBox(0,0),5), $W->create_okcancel), # ), @@ -236,8 +236,8 @@ output($cfgfile, $str); fs::umount($mountdir); -$in->ask_okcancel(_("Congratulations!"), -_("The floppy has been successfully generated. +$in->ask_okcancel(N("Congratulations!"), +N("The floppy has been successfully generated. You may now replay your installation.")); quit_global($in, 0); @@ -275,7 +275,7 @@ sub h2widget { control_buttons(${$k}{$list_keys[0]}, sub { my ($vb, $widget_list2, $ref_local_k, $i) = @_; my @widget_list = @{$widget_list2}; - my $field = $in->ask_from_entry(_("Auto Install"), ("Enter the name of the new field you want to add")) or return undef; + my $field = $in->ask_from_entry(N("Auto Install"), ("Enter the name of the new field you want to add")) or return undef; $field eq '' and return undef; gtkpack__($vb, $widget_list[$i] = create_packtable({ col_spacings => 10, row_spacings => 3 }, @@ -345,14 +345,14 @@ sub control_buttons { my (%local_k) = %{$ref_local_k}; my ($button_add, $button_remove); 0, gtkadd(gtkset_border_width(gtkset_layout(new Gtk::HButtonBox, 'spread'), 5), - gtksignal_connect($button_add = new Gtk::Button(_("Add an item")), clicked => sub { + gtksignal_connect($button_add = new Gtk::Button(N("Add an item")), clicked => sub { $local_k{$_} = undef foreach keys %local_k; $i++; $local_gui->($vb, \@widget_list, \%local_k, $i) or $i--, return; $i>=0 and $button_remove->set_sensitive(1); } ), - gtksignal_connect($button_remove = new Gtk::Button(_("Remove the last item")), clicked => sub { + gtksignal_connect($button_remove = new Gtk::Button(N("Remove the last item")), clicked => sub { $i>=0 or return; $widget_list[$i]->destroy(); $i--; diff --git a/perl-install/standalone/drakbackup b/perl-install/standalone/drakbackup index 38eb4cc64..a981852e4 100755 --- a/perl-install/standalone/drakbackup +++ b/perl-install/standalone/drakbackup @@ -611,7 +611,7 @@ sub read_cron_files { sub save_cron_files { if ($nonroot_user) { - show_warning("w", __("Cron not available yet as non-root")) if ($not_warned); + show_warning("w", N_("Cron not available yet as non-root")) if ($not_warned); $not_warned = 0; $backup_daemon = 0; return(1); @@ -717,9 +717,9 @@ sub write_password_file { sub show_warning { my ($mode, $warning) = @_; - $mode = __("WARNING") if ($mode eq "w"); - $mode = __("FATAL") if ($mode eq "f"); - $mode = __("INFO") if ($mode eq "i"); + $mode = N_("WARNING") if ($mode eq "w"); + $mode = N_("FATAL") if ($mode eq "f"); + $mode = N_("INFO") if ($mode eq "i"); if ($interactive) { $in->ask_warn('',translate("$mode").": ".translate("$warning")); } else { @@ -731,12 +731,12 @@ sub show_warning { sub complete_results { system_state(); $results .= "***********************************************************************\n\n"; - $daemon or $results .= _("\n DrakBackup Report \n\n"); - $daemon and $results .= _("\n DrakBackup Daemon Report\n\n\n"); + $daemon or $results .= N("\n DrakBackup Report \n\n"); + $daemon and $results .= N("\n DrakBackup Daemon Report\n\n\n"); $results .= "***********************************************************************\n\n"; $results .= $system_state; $results .= "\n\n***********************************************************************\n\n"; - $results .= _("\n DrakBackup Report Details\n\n\n"); + $results .= N("\n DrakBackup Report Details\n\n\n"); $results .= "***********************************************************************\n\n"; } @@ -757,7 +757,7 @@ sub ftp_client { $ftp->put($_); $interactive and progress($pbar, 0.5, $_); $interactive and $pbar->set_show_text($_); - $interactive and progress($pbar3, 1/@file_list_to_send_by_ftp, _("Total progess")); + $interactive and progress($pbar3, 1/@file_list_to_send_by_ftp, N("Total progess")); } $ftp->quit; return(0); @@ -812,7 +812,7 @@ sub do_expect { $exp_command = "ssh-copy-id -i $_ $login_user\@$host_name" if ($mode eq "sendkey"); if ((-e $backup_key) && ($mode eq "sendkey")) { - if ($in->ask_yesorno('', _("%s exists, delete?\n\nWarning: If you've already done this process you'll probably\n need to purge the entry from authorized_keys on the server.", $backup_key))) { + if ($in->ask_yesorno('', N("%s exists, delete?\n\nWarning: If you've already done this process you'll probably\n need to purge the entry from authorized_keys on the server.", $backup_key))) { unlink($backup_key); unlink($backup_key . '.pub'); } else { @@ -821,16 +821,16 @@ sub do_expect { } if (!(-e $backup_key) && ($mode eq "sendkey")) { - $in->ask_warn('',_("This may take a moment to generate the keys.")); + $in->ask_warn('',N("This may take a moment to generate the keys.")); cursor_wait(); #- not using a passphrase for the moment system("ssh-keygen -P '' -t dsa -f $backup_key"); cursor_norm(); } - my $exp = Expect->spawn($exp_command) or $in->ask_warn('',_("ERROR: Cannot spawn %s.", $exp_command)); + my $exp = Expect->spawn($exp_command) or $in->ask_warn('',N("ERROR: Cannot spawn %s.", $exp_command)); - $interactive and progress($pbar3, 1/@send_files, _("Total progess")); + $interactive and progress($pbar3, 1/@send_files, N("Total progess")); $interactive and $stext->set_text($_); #- run scp, look for some common errors and try to track successful progress for GUI @@ -845,17 +845,17 @@ sub do_expect { [ '-re', 'No such file or directory', sub { $bad_dir = 1; Expect::exp_continue() } ], # [ '-re', '%', sub { update_scp_progress(); Expect::exp_continue(); } ], [ eof => sub { - if (!$spawn_ok) { show_warning("f", _("No password prompt on %s at port %s", $host_name, $scp_port)) } - if ($bad_passwd) { show_warning("f", _("Bad password on %s", $host_name)) } - if ($no_perm) { show_warning("f", _("Permission denied transferring %s to %s", $_, $host_name)) } - if ($bad_dir) { show_warning("f", _("Can't find %s on %s", $host_path, $host_name)) } + if (!$spawn_ok) { show_warning("f", N("No password prompt on %s at port %s", $host_name, $scp_port)) } + if ($bad_passwd) { show_warning("f", N("Bad password on %s", $host_name)) } + if ($no_perm) { show_warning("f", N("Permission denied transferring %s to %s", $_, $host_name)) } + if ($bad_dir) { show_warning("f", N("Can't find %s on %s", $host_path, $host_name)) } } ], - [ timeout => sub { show_warning("f", _("%s not responding", $host_name)) } ], + [ timeout => sub { show_warning("f", N("%s not responding", $host_name)) } ], ); my $exit_stat = $exp->exitstatus; - $in->ask_warn('',_("Transfer successful\nYou may want to verify you can login to the server with:\n\nssh -i %s %s\@%s\n\nwithout being prompted for a password.", $backup_key, $login_user, $host_name)) if (($exit_stat eq 0) && ($mode eq "sendkey")); + $in->ask_warn('',N("Transfer successful\nYou may want to verify you can login to the server with:\n\nssh -i %s %s\@%s\n\nwithout being prompted for a password.", $backup_key, $login_user, $host_name)) if (($exit_stat eq 0) && ($mode eq "sendkey")); $log_buff .= "$_\n" if (($exit_stat eq 0) && ($mode eq "backup")); $exp->hard_close(); } @@ -885,7 +885,7 @@ sub ssh_client { close TMP; $log_buff .= "\n"; $interactive and progress($pbar, 0.5, "Done..."); - $interactive and progress($pbar3, 1/@file_list_to_send_by_ftp, _("Total progess")); + $interactive and progress($pbar3, 1/@file_list_to_send_by_ftp, N("Total progess")); } return(0); } @@ -899,11 +899,11 @@ sub webdav_client { my $command = "sitecopy -u drakbackup"; spawn_progress($command, "Running sitecopy..."); if ($log_buff =~ /Nothing to do - no changes found/) { - show_warning("w", __("WebDAV remote site already in sync!")); + show_warning("w", N_("WebDAV remote site already in sync!")); return(1); } if ($log_buff !~ /Update completed successfully/) { - show_warning("f", __("WebDAV transfer failed!")); + show_warning("f", N_("WebDAV transfer failed!")); return(1); } return(0); @@ -924,15 +924,15 @@ sub check_for_cd { my $command = "cdrecord dev=$cd_device -atip"; spawn_progress($command, "Check for media in drive"); if ($log_buff =~ /No disk/) { - show_warning("f", __("No CDR/DVDR in drive!")); + show_warning("f", N_("No CDR/DVDR in drive!")); return(1); } if ($log_buff !~ /ATIP info from disk/) { - show_warning("f", __("Does not appear to be recordable media!")); + show_warning("f", N_("Does not appear to be recordable media!")); return(1); } if (($log_buff =~ /Is not erasable/) && ($media_erase)) { - show_warning("f", __("Not erasable media!")); + show_warning("f", N_("Not erasable media!")); return(1); } @@ -971,7 +971,7 @@ sub write_on_cd { sub erase_cdrw { #- we can only hit this via interactive $interactive = 0; - $in->ask_warn('',_("This may take a moment to erase the media.")); + $in->ask_warn('',N("This may take a moment to erase the media.")); cursor_wait(); my $command = "cdrecord dev=$cd_device -blank=fast"; spawn_progress($command, "Erasing CDRW..."); @@ -984,7 +984,7 @@ sub spawn_progress { my $value; my $timer; - $interactive and progress($pbar3, 0, _($descr)); + $interactive and progress($pbar3, 0, translate($descr)); $interactive and $pbar3->set_activity_mode(1); $interactive and ($pbar3->set_value(0)); $interactive and ($timer = Gtk->timeout_add(2, \&progress_timeout)); @@ -1056,7 +1056,7 @@ sub build_cd { if (!check_for_cd()) { build_iso(); if ($log_buff =~ /Permission denied/) { - show_warning("f", __("Permission problem accessing CD.")); + show_warning("f", N_("Permission problem accessing CD.")); $media_problem = 1; return(1); } else { @@ -1083,7 +1083,7 @@ sub build_tape { $command = "mt -f $tape_device status"; spawn_progress($command, "Checking for tape"); if ($log_buff =~ /DR_OPEN/) { - show_warning("f", _("No tape in %s!", $tape_device)); + show_warning("f", N("No tape in %s!", $tape_device)); return(1); } @@ -1195,7 +1195,7 @@ sub build_backup_files { grep (/^backup\_base\_sys/, @dir_content) and $base_sys_exist = 1; if (($where_hd && !$daemon) || ($daemon)) { - $interactive and progress($pbar, 0.5, _("Backup system files...")); + $interactive and progress($pbar, 0.5, N("Backup system files...")); if ($backup_sys) { if ($backup_sys_versions) { #- 8/19/2002 - changed these greps to look at the list, rather than the tar file @@ -1244,8 +1244,8 @@ sub build_backup_files { } } - $interactive and progress($pbar, 0.5, _("Backup system files...")); - $interactive and progress($pbar3, 0.3, _("Hard Disk Backup files...")); + $interactive and progress($pbar, 0.5, N("Backup system files...")); + $interactive and progress($pbar3, 0.3, N("Hard Disk Backup files...")); if (@list_other) { system("cd $save_path && rm -f backup_other* "); @@ -1257,8 +1257,8 @@ sub build_backup_files { output_p($save_path . '/list_other', @list_other_); } - $interactive and progress($pbar1, 1, _("Backup User files...")); - $interactive and progress($pbar3, 0.3, _("Hard Disk Backup Progress...")); + $interactive and progress($pbar1, 1, N("Backup User files...")); + $interactive and progress($pbar3, 0.3, N("Hard Disk Backup Progress...")); if ($backup_user) { foreach (@user_list) { @@ -1311,13 +1311,13 @@ sub build_backup_files { } } } - $interactive and progress($pbar2, 1, _("Backup Other files...")); - $interactive and progress($pbar3, 0.4, _("Hard Disk Backup files...")); + $interactive and progress($pbar2, 1, N("Backup Other files...")); + $interactive and progress($pbar3, 0.4, N("Hard Disk Backup files...")); } my $filecount = @file_list_to_send_by_ftp; if (!$filecount) { - show_warning("w", __("No changes to backup!")); + show_warning("w", N_("No changes to backup!")); $interactive and cursor_norm(); $interactive and interactive_mode(); return(1); @@ -1333,17 +1333,17 @@ sub build_backup_files { build_cd() if ($daemon_media eq 'cd'); build_tape() if ($daemon_media eq 'tape'); - $results .= _("\nDrakbackup activities via %s:\n\n", $daemon_media) ; + $results .= N("\nDrakbackup activities via %s:\n\n", $daemon_media) ; $results .= $log_buff; } #- leave this one alone for now - works well #- integrate with other methods later if (($where_net && !$daemon && ($net_proto eq 'ftp')) || ($daemon && ($daemon_media eq 'ftp'))) { - $results .= _("file list sent by FTP: %s\n ", $_) foreach @file_list_to_send_by_ftp; + $results .= N("file list sent by FTP: %s\n ", $_) foreach @file_list_to_send_by_ftp; $interactive and build_backup_ftp_status(); if (ftp_client()) { - $results .= _("\n FTP connection problem: It was not possible to send your backup files by FTP.\n"); + $results .= N("\n FTP connection problem: It was not possible to send your backup files by FTP.\n"); $interactive and client_ftp_pb(); } } @@ -1356,17 +1356,17 @@ sub build_backup_files { ssh_client() if (($net_proto eq 'ssh') && !($use_expect)); do_expect("backup", "") if (($net_proto eq 'ssh') && ($use_expect)); webdav_client() if ($net_proto eq 'webdav'); - $results .= _("\nDrakbackup activities via %s:\n\n", $net_proto); + $results .= N("\nDrakbackup activities via %s:\n\n", $net_proto); } if ($where_cd) { build_cd(); - $results .= _("\nDrakbackup activities via CD:\n\n"); + $results .= N("\nDrakbackup activities via CD:\n\n"); } if ($where_tape) { build_tape(); - $results .= _("\nDrakbackup activities via tape:\n\n"); + $results .= N("\nDrakbackup activities via tape:\n\n"); } $results .= $log_buff; @@ -1375,7 +1375,7 @@ sub build_backup_files { if ($send_mail) { if (send_mail($results)) { $interactive and send_mail_pb(); - $interactive or print _(" Error during mail sending. \n"); + $interactive or print N(" Error during mail sending. \n"); } } @@ -1400,7 +1400,7 @@ sub build_backup_files { $catalog .= ":F" if ((!$backup_other_versions) && (@list_other)); $catalog .= "\n"; - open(CATALOG, ">> $cfg_dir/drakbackup_catalog") || show_warning("w", __("Can't create catalog!")); + open(CATALOG, ">> $cfg_dir/drakbackup_catalog") || show_warning("w", N_("Can't create catalog!")); print(CATALOG $catalog); close(CATALOG); } @@ -1513,7 +1513,7 @@ sub file_ok_sel { sub filedialog_where_hd { my $file_dialog; - $file_dialog = gtksignal_connect(new Gtk::FileSelection(_("File Selection")), destroy => sub { $file_dialog->destroy() } ); + $file_dialog = gtksignal_connect(new Gtk::FileSelection(N("File Selection")), destroy => sub { $file_dialog->destroy() } ); $file_dialog->ok_button->signal_connect(clicked => sub { $save_path_entry->set_text($file_dialog->get_filename()); $file_dialog->destroy() }); @@ -1524,7 +1524,7 @@ sub filedialog_where_hd { sub filedialog_restore_find_path { my $file_dialog; - $file_dialog = gtksignal_connect(new Gtk::FileSelection(_("File Selection")), destroy => sub { $file_dialog->destroy() } ); + $file_dialog = gtksignal_connect(new Gtk::FileSelection(N("File Selection")), destroy => sub { $file_dialog->destroy() } ); $file_dialog->ok_button->signal_connect(clicked => sub { $restore_find_path_entry->set_text($file_dialog->get_filename()); $file_dialog->destroy() }); @@ -1538,7 +1538,7 @@ sub filedialog_generic { my ($fileops, $prompt, $widget, $set_var) = @_; my $file_dialog; - $file_dialog = gtksignal_connect(new Gtk::FileSelection(_($prompt)), destroy => sub { $file_dialog->destroy() } ); + $file_dialog = gtksignal_connect(new Gtk::FileSelection(translate($prompt)), destroy => sub { $file_dialog->destroy() } ); $file_dialog->ok_button->signal_connect(clicked => sub { ${$set_var} = ($file_dialog->get_filename()); ${$widget}->set_text(${$set_var}); @@ -1552,12 +1552,12 @@ sub filedialog_generic { sub filedialog { my $file_dialog; - $file_dialog = gtksignal_connect(new Gtk::FileSelection(_("Select the files or directories and click on 'Add'")), destroy => sub { $file_dialog->destroy() } ); + $file_dialog = gtksignal_connect(new Gtk::FileSelection(N("Select the files or directories and click on 'Add'")), destroy => sub { $file_dialog->destroy() } ); $file_dialog->ok_button->signal_connect(clicked => \&file_ok_sel, $file_dialog); - $file_dialog->ok_button->child->set(_("Add")); + $file_dialog->ok_button->child->set(N("Add")); $file_dialog->cancel_button->signal_connect(clicked => sub { $file_dialog->destroy() }); - $file_dialog->cancel_button->child->set(_("Close")); -# $file_dialog->set_filename(_("Select the files or directories and click on 'Add'")); + $file_dialog->cancel_button->child->set(N("Close")); +# $file_dialog->set_filename(N("Select the files or directories and click on 'Add'")); $file_dialog->show(); } @@ -1596,12 +1596,12 @@ sub advanced_what_sys { gtkpack($advanced_box, $box_what_sys = gtkpack_(new Gtk::VBox(0, 15), - 1, _("\nPlease check all options that you need.\n"), - 1, _("These options can backup and restore all files in your /etc directory.\n"), - 0, my $check_what_sys = new Gtk::CheckButton(_("Backup your System files. (/etc directory)")), - 0, my $check_what_versions = new Gtk::CheckButton(_("Use incremental backup (do not replace old backups)")), - 0, my $check_what_critical = new Gtk::CheckButton(_("Do not include critical files (passwd, group, fstab)")), - 0, _("With this option you will be able to restore any version\n of your /etc directory."), + 1, N("\nPlease check all options that you need.\n"), + 1, N("These options can backup and restore all files in your /etc directory.\n"), + 0, my $check_what_sys = new Gtk::CheckButton(N("Backup your System files. (/etc directory)")), + 0, my $check_what_versions = new Gtk::CheckButton(N("Use incremental backup (do not replace old backups)")), + 0, my $check_what_critical = new Gtk::CheckButton(N("Do not include critical files (passwd, group, fstab)")), + 0, N("With this option you will be able to restore any version\n of your /etc directory."), 1, new Gtk::VBox(0, 15), ), ); @@ -1618,7 +1618,7 @@ sub advanced_what_user { all_user_list(); gtkpack($advanced_box, $box_what_user = gtkpack_(new Gtk::VBox(0, 15), - 0, _("Please check all users that you want to include in your backup."), + 0, N("Please check all users that you want to include in your backup."), 0, new Gtk::HSeparator, 1, createScrolledWindow( gtkpack__(new Gtk::VBox(0,0), @@ -1645,8 +1645,8 @@ sub advanced_what_user { $b } (@all_user_list) ), ), - 0, my $check_what_browser = new Gtk::CheckButton(_("Do not include the browser cache")), - 0, my $check_what_user_versions = new Gtk::CheckButton(_("Use Incremental Backups (do not replace old backups)")), + 0, my $check_what_browser = new Gtk::CheckButton(N("Do not include the browser cache")), + 0, my $check_what_user_versions = new Gtk::CheckButton(N("Use Incremental Backups (do not replace old backups)")), ), ); check_list([$check_what_browser, \$what_no_browser], [$check_what_user_versions, \$backup_user_versions]); @@ -1667,10 +1667,10 @@ sub advanced_what_other { 1, createScrolledWindow($list_other), ), 0, gtkadd(gtkset_layout(new Gtk::HButtonBox, -spread), - gtksignal_connect(new Gtk::Button(_("Add")), clicked => sub { filedialog() }), - gtksignal_connect(new Gtk::Button(_("Remove Selected")), clicked => \&list_remove, $list_other), + gtksignal_connect(new Gtk::Button(N("Add")), clicked => sub { filedialog() }), + gtksignal_connect(new Gtk::Button(N("Remove Selected")), clicked => \&list_remove, $list_other), ), - 0, gtkset_sensitive(my $check_what_other_versions = new Gtk::CheckButton(_("Use Incremental Backups (do not replace old backups)") ), 0), + 0, gtkset_sensitive(my $check_what_other_versions = new Gtk::CheckButton(N("Use Incremental Backups (do not replace old backups)") ), 0), ), ); check_list([$check_what_other_versions, \$backup_other_versions]); @@ -1701,12 +1701,12 @@ sub advanced_what_entire_sys{ ); $button_what_other->add(gtkpack(new Gtk::HBox(0,10), new Gtk::Pixmap($pix_sys_map, $pix_sys_mask), - new Gtk::Label(_("Linux")), + new Gtk::Label(N("Linux")), new Gtk::HBox(0, 5) )); $button_what_all->add(gtkpack(new Gtk::HBox(0,10), new Gtk::Pixmap($pix_user_map, $pix_user_mask), - new Gtk::Label(_("Windows (FAT32)")), + new Gtk::Label(N("Windows (FAT32)")), new Gtk::HBox(0, 5) )); fonction_env(\$box_what, \&advanced_what_entire_sys, \&advanced_what, ""); @@ -1740,22 +1740,22 @@ sub advanced_what{ ); $button_what_sys->add(gtkpack(new Gtk::HBox(0,10), new Gtk::Pixmap($pix_sys_map, $pix_sys_mask), - new Gtk::Label(_("System")), + new Gtk::Label(N("System")), new Gtk::HBox(0, 5) )); $button_what_user->add(gtkpack(new Gtk::HBox(0,10), new Gtk::Pixmap($pix_user_map, $pix_user_mask), - new Gtk::Label(_("Users")), + new Gtk::Label(N("Users")), new Gtk::HBox(0, 5) )); $button_what_other->add(gtkpack(new Gtk::HBox(0,10), new Gtk::Pixmap($pix_other_map, $pix_other_mask), - new Gtk::Label(_("Other")), + new Gtk::Label(N("Other")), new Gtk::HBox(0, 5) )); # $button_what_all->add(gtkpack(new Gtk::HBox(0,10), # new Gtk::Pixmap($pix_sysp_map, $pix_sysp_mask), -# new Gtk::Label(_("An Entire System")), +# new Gtk::Label(N("An Entire System")), # new Gtk::HBox(0, 5) # )); @@ -1771,41 +1771,41 @@ sub advanced_where_net_types { $box_where_net = gtkpack_(new Gtk::VBox(0, 10), 0, new Gtk::HSeparator, 0, gtkpack_(new Gtk::HBox(0,10), - 0, my $check_where_use_net = new Gtk::CheckButton(_("Use network connection to backup") ), + 0, my $check_where_use_net = new Gtk::CheckButton(N("Use network connection to backup") ), 1, new Gtk::HBox(0,10), - 0, new Gtk::Label(_("Net Method:")), + 0, new Gtk::Label(N("Net Method:")), 0, gtkset_sensitive(my $entry_net_type = new Gtk::Combo(), $where_net), ), 0, gtkpack_(new Gtk::HBox(0,5), - 0, gtkset_sensitive(my $check_use_expect = new Gtk::CheckButton(_("Use Expect for SSH")), ($where_net && ($net_proto eq 'ssh'))), - 0, gtkset_sensitive(my $check_xfer_keys = new Gtk::CheckButton(_("Create/Transfer\nbackup keys for SSH")), ($where_net && ($net_proto eq 'ssh'))), - 0, gtkset_sensitive(my $button_xfer_keys = new Gtk::Button(_(" Transfer \nNow")), $xfer_keys), - 0, gtkset_sensitive(my $check_user_keys = new Gtk::CheckButton(_("Other (not drakbackup)\nkeys in place already")), ($where_net && ($net_proto eq 'ssh'))), + 0, gtkset_sensitive(my $check_use_expect = new Gtk::CheckButton(N("Use Expect for SSH")), ($where_net && ($net_proto eq 'ssh'))), + 0, gtkset_sensitive(my $check_xfer_keys = new Gtk::CheckButton(N("Create/Transfer\nbackup keys for SSH")), ($where_net && ($net_proto eq 'ssh'))), + 0, gtkset_sensitive(my $button_xfer_keys = new Gtk::Button(N(" Transfer \nNow")), $xfer_keys), + 0, gtkset_sensitive(my $check_user_keys = new Gtk::CheckButton(N("Other (not drakbackup)\nkeys in place already")), ($where_net && ($net_proto eq 'ssh'))), ), 0, new Gtk::HSeparator, 0, gtkpack_(new Gtk::HBox(0,10), - 0, gtkset_sensitive(new Gtk::Label(_("Please enter the host name or IP.")), $where_net), + 0, gtkset_sensitive(new Gtk::Label(N("Please enter the host name or IP.")), $where_net), 1, new Gtk::HBox(0,10), 0, gtkset_sensitive(my $host_name_entry = new Gtk::Entry(), $where_net), ), 0, gtkpack_(new Gtk::HBox(0,10), - 0, gtkset_sensitive(new Gtk::Label(_("Please enter the directory (or module) to\n put the backup on this host.")), $where_net), + 0, gtkset_sensitive(new Gtk::Label(N("Please enter the directory (or module) to\n put the backup on this host.")), $where_net), 1, new Gtk::HBox(0,10), 0, gtkset_sensitive(my $host_path_entry = new Gtk::Entry(), $where_net), ), 0, gtkpack_(new Gtk::HBox(0,10), - 0, gtkset_sensitive(new Gtk::Label(_("Please enter your login")), $where_net), + 0, gtkset_sensitive(new Gtk::Label(N("Please enter your login")), $where_net), 1, new Gtk::HBox(0,10), 0, gtkset_sensitive(my $login_user_entry = new Gtk::Entry(), $where_net), ), 0, gtkpack_(new Gtk::HBox(0,10), - 0, gtkset_sensitive(new Gtk::Label(_("Please enter your password")), $where_net), + 0, gtkset_sensitive(new Gtk::Label(N("Please enter your password")), $where_net), 1, new Gtk::HBox(0,10), 0, gtkset_sensitive(my $passwd_user_entry = new Gtk::Entry(), $where_net), ), 0, gtkpack_(new Gtk::HBox(0,10), 1, new Gtk::HBox(0,10), - 0, gtkset_sensitive(my $check_remember_pass = new Gtk::CheckButton(_("Remember this password")), $where_net), + 0, gtkset_sensitive(my $check_remember_pass = new Gtk::CheckButton(N("Remember this password")), $where_net), ), ), ); @@ -1816,7 +1816,7 @@ sub advanced_where_net_types { if (($passwd_user ne '') && ($login_user ne '') && ($host_name ne '')) { do_expect("sendkey", $backup_key); } else { - $in->ask_warn('',_("Need hostname, username and password!")); + $in->ask_warn('',N("Need hostname, username and password!")); } }); $passwd_user_entry->set_visibility(0); @@ -1911,59 +1911,59 @@ sub advanced_where_cd { gtkpack($advanced_box, $box_where_cd = gtkpack_(new Gtk::VBox(0, 6), - 0, my $check_where_cd = new Gtk::CheckButton(_("Use CD/DVDROM to backup")), + 0, my $check_where_cd = new Gtk::CheckButton(N("Use CD/DVDROM to backup")), 0, new Gtk::HSeparator, 0, gtkpack_(new Gtk::HBox(0,10), - 0, gtkset_sensitive(new Gtk::Label(_("Please choose your CD/DVD device\n(Press Enter to propogate settings to other fields.\nThis field isn't necessary, only a tool to fill in the form.)")), $where_cd), + 0, gtkset_sensitive(new Gtk::Label(N("Please choose your CD/DVD device\n(Press Enter to propogate settings to other fields.\nThis field isn't necessary, only a tool to fill in the form.)")), $where_cd), 1, new Gtk::VBox(0, 5), 0, gtkset_sensitive(gtkset_usize ($combo_where_cd_device, 200, 20), $where_cd), ), 0, gtkpack_(new Gtk::HBox(0,10), - 0, gtkset_sensitive(new Gtk::Label(_("Please choose your CD/DVD media size (Mb)")), $where_cd), + 0, gtkset_sensitive(new Gtk::Label(N("Please choose your CD/DVD media size (Mb)")), $where_cd), 1, new Gtk::VBox(0, 5), 0, gtkset_sensitive(gtkset_usize ($combo_where_cd_time, 200, 20), $where_cd), ), 0, new Gtk::VBox(0, 5), 0, gtkpack_(new Gtk::HBox(0,10), - 0, gtkset_sensitive(new Gtk::Label(_("Please check for multisession CD")), $where_cd), + 0, gtkset_sensitive(new Gtk::Label(N("Please check for multisession CD")), $where_cd), 1, new Gtk::VBox(0, 5), 0, gtkset_sensitive(my $check_multisession = new Gtk::CheckButton(), $where_cd), ), 0, new Gtk::VBox(0, 5), 0, gtkpack_(new Gtk::HBox(0,10), - 0, gtkset_sensitive(new Gtk::Label(_("Please check if you are using CDRW media")), $where_cd), + 0, gtkset_sensitive(new Gtk::Label(N("Please check if you are using CDRW media")), $where_cd), 1, new Gtk::VBox(0, 5), 0, gtkset_sensitive(my $check_cdrw = new Gtk::CheckButton(), $where_cd), ), 0, new Gtk::VBox(0, 5), 0, gtkpack_(new Gtk::HBox(0,10), - 0, gtkset_sensitive(new Gtk::Label(_("Please check if you want to erase your RW media (1st Session)")), $cdrw && $where_cd), - 0, gtkset_sensitive(my $button_erase_now = new Gtk::Button(_(" Erase Now ")), $cdrw), + 0, gtkset_sensitive(new Gtk::Label(N("Please check if you want to erase your RW media (1st Session)")), $cdrw && $where_cd), + 0, gtkset_sensitive(my $button_erase_now = new Gtk::Button(N(" Erase Now ")), $cdrw), 1, new Gtk::VBox(0, 5), 0, gtkset_sensitive(my $check_cdrw_erase = new Gtk::CheckButton(), $cdrw && $where_cd), ), 0, new Gtk::VBox(0, 5), 0, gtkpack_(new Gtk::HBox(0,10), - 0, gtkset_sensitive(new Gtk::Label(_("Please check if you are using a DVDR device")), $where_cd), + 0, gtkset_sensitive(new Gtk::Label(N("Please check if you are using a DVDR device")), $where_cd), 1, new Gtk::VBox(0, 5), 0, gtkset_sensitive(my $check_dvdr = new Gtk::CheckButton(), $where_cd), ), 0, new Gtk::VBox(0, 5), 0, gtkpack_(new Gtk::HBox(0,10), - 0, gtkset_sensitive(new Gtk::Label(_("Please check if you are using a DVDRAM device")), $where_cd), + 0, gtkset_sensitive(new Gtk::Label(N("Please check if you are using a DVDRAM device")), $where_cd), 1, new Gtk::VBox(0, 5), 0, gtkset_sensitive(my $check_dvdram = new Gtk::CheckButton(), $where_cd), ), # don't know what this is about - hold off for now (SB) # 0, new Gtk::VBox(0, 5), # 0, gtkpack_(new Gtk::HBox(0,10), -# 0, gtkset_sensitive(new Gtk::Label(_("Please check if you want to include\n install boot on your CD.")), $where_cd), +# 0, gtkset_sensitive(new Gtk::Label(N("Please check if you want to include\n install boot on your CD.")), $where_cd), # 1, new Gtk::VBox(0, 5), # 0, gtkset_sensitive(my $check_cd_with_install_boot = new Gtk::CheckButton(), $where_cd), # ), 0, new Gtk::VBox(0, 5), 0, gtkpack_(new Gtk::HBox(0,10), - 0, gtkset_sensitive(new Gtk::Label(_("Please enter your CD Writer device name\n ex: 0,1,0")), $where_cd), + 0, gtkset_sensitive(new Gtk::Label(N("Please enter your CD Writer device name\n ex: 0,1,0")), $where_cd), 1, new Gtk::VBox(0, 5), # 0, gtkset_usize (gtkset_sensitive($cd_device_entry = new Gtk::Entry(), $where_cd), 200, 20), 0, gtkset_sensitive(gtkset_usize ($combo_where_cdrecord_device, 200, 20), $where_cd), @@ -1996,7 +1996,7 @@ sub advanced_where_cd { if ($cd_device ne '') { erase_cdrw(); } else { - $in->ask_warn('',_("No CD device defined!")); + $in->ask_warn('',N("No CD device defined!")); } }); $combo_where_cdrecord_device->entry->set_text($cd_device); @@ -2044,34 +2044,34 @@ sub advanced_where_tape { gtkpack($advanced_box, $box_where_tape = gtkpack_(new Gtk::VBox(0, 6), 0, new Gtk::HSeparator, - 0, my $check_where_tape = new Gtk::CheckButton(_("Use tape to backup") ), + 0, my $check_where_tape = new Gtk::CheckButton(N("Use tape to backup") ), 0, new Gtk::HSeparator, 0, gtkpack_(new Gtk::HBox(0,10), - 0, gtkset_sensitive(new Gtk::Label(_("Please enter the device name to use for backup")), $where_tape), + 0, gtkset_sensitive(new Gtk::Label(N("Please enter the device name to use for backup")), $where_tape), 1, new Gtk::VBox(0, 6), 0, gtkset_sensitive(gtkset_usize ($combo_where_tape_device, 200, 20), $where_tape), ), 0, new Gtk::VBox(0, 5), 0, gtkpack_(new Gtk::HBox(0,10), - 0, gtkset_sensitive(new Gtk::Label(_("Please check if you want to use the non-rewinding device.")), $where_tape), + 0, gtkset_sensitive(new Gtk::Label(N("Please check if you want to use the non-rewinding device.")), $where_tape), 1, new Gtk::VBox(0, 5), 0, gtkset_sensitive(my $check_tape_rewind = new Gtk::CheckButton(), $where_tape), ), 0, new Gtk::VBox(0, 5), 0, gtkpack_(new Gtk::HBox(0,10), - 0, gtkset_sensitive(new Gtk::Label(_("Please check if you want to erase your tape before the backup.")), $where_tape), + 0, gtkset_sensitive(new Gtk::Label(N("Please check if you want to erase your tape before the backup.")), $where_tape), 1, new Gtk::VBox(0, 5), 0, gtkset_sensitive(my $check_tape_erase = new Gtk::CheckButton(), $where_tape), ), 0, new Gtk::VBox(0, 5), 0, gtkpack_(new Gtk::HBox(0,10), - 0, gtkset_sensitive(new Gtk::Label(_("Please check if you want to eject your tape after the backup.")), $where_tape), + 0, gtkset_sensitive(new Gtk::Label(N("Please check if you want to eject your tape after the backup.")), $where_tape), 1, new Gtk::VBox(0, 5), 0, gtkset_sensitive(my $check_tape_eject = new Gtk::CheckButton(), $where_tape), ), 0, new Gtk::VBox(0, 6), 0, gtkpack_(new Gtk::HBox(0,10), - 0, gtkset_sensitive(new Gtk::Label(_("Please enter the maximum size\n allowed for Drakbackup")), $where_tape), + 0, gtkset_sensitive(new Gtk::Label(N("Please enter the maximum size\n allowed for Drakbackup")), $where_tape), 1, new Gtk::VBox(0, 6), 0, gtkset_usize (gtkset_sensitive(my $spinner = new Gtk::SpinButton($adj, 0, 0), $where_tape), 200, 20), ), @@ -2133,10 +2133,10 @@ sub advanced_where_hd { gtkpack($advanced_box, $box_where_hd = gtkpack_(new Gtk::VBox(0, 6), 0, new Gtk::HSeparator, -# 0, my $check_where_hd = new Gtk::CheckButton( _("Use Hard Disk to backup") ), +# 0, my $check_where_hd = new Gtk::CheckButton( N("Use Hard Disk to backup") ), # 0, new Gtk::HSeparator, 0, gtkpack_(new Gtk::HBox(0,10), - 0, gtkset_sensitive(new Gtk::Label(_("Please enter the directory to save to:")), $where_hd), + 0, gtkset_sensitive(new Gtk::Label(N("Please enter the directory to save to:")), $where_hd), 1, new Gtk::VBox(0, 6), 0, gtkset_usize (gtkset_sensitive($save_path_entry = new Gtk::Entry(), $where_hd), 152, 20), 0, gtkset_sensitive($button = gtksignal_connect(new Gtk::Button(), clicked => sub { @@ -2145,13 +2145,13 @@ sub advanced_where_hd { ), 0, new Gtk::VBox(0, 6), 0, gtkpack_(new Gtk::HBox(0,10), - 0, gtkset_sensitive(new Gtk::Label(_("Please enter the maximum size\n allowed for Drakbackup")), $where_hd), + 0, gtkset_sensitive(new Gtk::Label(N("Please enter the maximum size\n allowed for Drakbackup")), $where_hd), 1, new Gtk::VBox(0, 6), 0, gtkset_usize (gtkset_sensitive(my $spinner = new Gtk::SpinButton($adj, 0, 0), $where_hd), 200, 20), ), 0, gtkpack_(new Gtk::HBox(0,10), 1, new Gtk::VBox(0, 6), - 0, gtkset_sensitive(my $check_where_hd_quota = new Gtk::CheckButton(_("Use quota for backup files.")), $where_hd), + 0, gtkset_sensitive(my $check_where_hd_quota = new Gtk::CheckButton(N("Use quota for backup files.")), $where_hd), 0, new Gtk::VBox(0, 6), ), ), @@ -2217,22 +2217,22 @@ sub advanced_where{ ); $button_where_net->add(gtkpack(new Gtk::HBox(0,10), new Gtk::Pixmap($pix_net_map, $pix_net_mask), - new Gtk::Label(_("Network")), + new Gtk::Label(N("Network")), new Gtk::HBox(0, 5) )); $button_where_cd->add(gtkpack(new Gtk::HBox(0,10), new Gtk::Pixmap($pix_cd_map, $pix_cd_mask), - new Gtk::Label(_("CDROM / DVDROM")), + new Gtk::Label(N("CDROM / DVDROM")), new Gtk::HBox(0, 5) )); $button_where_hd->add(gtkpack(new Gtk::HBox(0,10), new Gtk::Pixmap($pix_hd_map, $pix_hd_mask), - new Gtk::Label(_("HardDrive / NFS")), + new Gtk::Label(N("HardDrive / NFS")), new Gtk::HBox(0, 5) )); $button_where_tape->add(gtkpack(new Gtk::HBox(0,10), new Gtk::Pixmap($pix_tape_map, $pix_tape_mask), - new Gtk::Label(_("Tape")), + new Gtk::Label(N("Tape")), new Gtk::HBox(0, 5) )); fonction_env(\$box_where, \&advanced_where, \&advanced_box, ""); @@ -2246,15 +2246,15 @@ sub advanced_when{ # $daemon_media = ''; my ($pix_time_map, $pix_time_mask) = gtkcreate_png("ic82-when-40"); my $combo_when_space = new Gtk::Combo(); - my %trans = (_("hourly") => 'hourly', - _("daily") => 'daily', - _("weekly") => 'weekly', - _("monthly") => 'monthly'); - my %trans2 = ('hourly' => _("hourly"), - 'daily' => _("daily"), - 'weekly' => _("weekly"), - 'monthly' => _("monthly")); - $combo_when_space->set_popdown_strings (_("hourly"),_("daily"),_("weekly"),_("monthly")); + my %trans = (N("hourly") => 'hourly', + N("daily") => 'daily', + N("weekly") => 'weekly', + N("monthly") => 'monthly'); + my %trans2 = ('hourly' => N("hourly"), + 'daily' => N("daily"), + 'weekly' => N("weekly"), + 'monthly' => N("monthly")); + $combo_when_space->set_popdown_strings (N("hourly"),N("daily"),N("weekly"),N("monthly")); #- drop down list of possible medias - default to config value my $entry_media_type = new Gtk::Combo(); @@ -2267,25 +2267,25 @@ sub advanced_when{ 0, gtkpack_(new Gtk::HBox(0,10), 1, new Gtk::HBox(0,10), 1, new Gtk::Pixmap($pix_time_map, $pix_time_mask), - 0, my $check_when_daemon = new Gtk::CheckButton(_("Use daemon") ), + 0, my $check_when_daemon = new Gtk::CheckButton(N("Use daemon") ), 1, new Gtk::HBox(0,10), ), 0, new Gtk::HSeparator, 0, gtkpack_(new Gtk::HBox(0,10), - 0, gtkset_sensitive(new Gtk::Label(_("Please choose the time \ninterval between each backup")), $backup_daemon), + 0, gtkset_sensitive(new Gtk::Label(N("Please choose the time \ninterval between each backup")), $backup_daemon), 1, new Gtk::HBox(0,10), 0, gtkset_sensitive($combo_when_space, $backup_daemon), ), 0, new Gtk::HBox(0,10), 0, gtkpack_(new Gtk::HBox(0,10), - 0, gtkset_sensitive(new Gtk::Label(_("Please choose the\nmedia for backup.")), $backup_daemon), + 0, gtkset_sensitive(new Gtk::Label(N("Please choose the\nmedia for backup.")), $backup_daemon), 1, new Gtk::HBox(0,10), 0, gtkpack_(new Gtk::VBox(0,10), 0, gtkset_sensitive($entry_media_type, $backup_daemon), ), ), 0, new Gtk::HSeparator, - 1, gtkset_sensitive(new Gtk::Label(_("Please be sure that the cron daemon is included in your services. + 1, gtkset_sensitive(new Gtk::Label(N("Please be sure that the cron daemon is included in your services. \nNote that currently all 'net' medias also use the hard drive.")), $backup_daemon), ), ); @@ -2313,22 +2313,22 @@ sub advanced_options{ # 0, gtkpack_(new Gtk::HBox(0,10), # 1, new Gtk::VBox(0,10), # 1, new Gtk::Pixmap($pix_options_map, $pix_options_mask), -# 1, _("Please choose correct options to backup."), +# 1, N("Please choose correct options to backup."), # 1, new Gtk::VBox(0,10), # ), # 0, new Gtk::HSeparator, # 0, gtkpack_(new Gtk::VBox(0,10), -# 0, gtkset_sensitive(my $check_tar_bz2 = new Gtk::CheckButton( _("Use Tar and bzip2 (very slow) [Please be careful if you\n (un)select this option, as all your old backups will be deleted.]") ), 0), -# 0, gtkset_sensitive(my $check_backupignore = new Gtk::CheckButton( _("Use .backupignore files")), 0), +# 0, gtkset_sensitive(my $check_tar_bz2 = new Gtk::CheckButton( N("Use Tar and bzip2 (very slow) [Please be careful if you\n (un)select this option, as all your old backups will be deleted.]") ), 0), +# 0, gtkset_sensitive(my $check_backupignore = new Gtk::CheckButton( N("Use .backupignore files")), 0), 0, new Gtk::VBox(0,10), 0, gtkpack_(new Gtk::HBox(0,10), - 0, my $check_mail = new Gtk::CheckButton(_("Send mail report after each backup to:")), + 0, my $check_mail = new Gtk::CheckButton(N("Send mail report after each backup to:")), 1, new Gtk::HBox(0,10), 0, my $mail_entry = new Gtk::Entry(), ), # ), 0, gtkpack_(new Gtk::HBox(0,10), - 0, my $check_del_hd_files = new Gtk::CheckButton(_("Delete Hard Drive tar files after backup to other media.")), + 0, my $check_del_hd_files = new Gtk::CheckButton(N("Delete Hard Drive tar files after backup to other media.")), ), ), ); @@ -2367,22 +2367,22 @@ sub advanced_box{ ); $button_what->add(gtkpack(new Gtk::HBox(0,10), new Gtk::Pixmap($pix_hd_map, $pix_hd_mask), - new Gtk::Label(_("What")), + new Gtk::Label(N("What")), new Gtk::HBox(0, 5) )); $button_where->add(gtkpack(new Gtk::HBox(0,10), new Gtk::Pixmap($pix_net_map, $pix_net_mask), - new Gtk::Label(_("Where")), + new Gtk::Label(N("Where")), new Gtk::HBox(0, 5) )); $button_when->add(gtkpack(new Gtk::HBox(0,10), new Gtk::Pixmap($pix_time_map, $pix_time_mask), - new Gtk::Label(_("When")), + new Gtk::Label(N("When")), new Gtk::HBox(0, 5) )); $button_options->add(gtkpack(new Gtk::HBox(0,10), new Gtk::Pixmap($pix_options_map, $pix_options_mask), - new Gtk::Label(_("More Options")), + new Gtk::Label(N("More Options")), new Gtk::HBox(0, 5) )); fonction_env(\$box_adv, \&advanced_box, \&interactive_mode_box, ""); @@ -2401,7 +2401,7 @@ sub wizard_step3 { gtkpack($advanced_box, $box2 = gtkpack_(new Gtk::HBox(0, 15), 1, gtkpack_(new Gtk::VBox(0,10), - 0, _("Drakbackup Configuration"), + 0, N("Drakbackup Configuration"), 1, createScrolledWindow($text), ), ), @@ -2419,11 +2419,11 @@ sub wizard_step2 { 1, new Gtk::VBox(0, 5), 1, gtkpack_(new Gtk::VBox(0, 15), 1, new Gtk::VBox(0, 5), - 0, _("Please choose where you want to backup"), + 0, N("Please choose where you want to backup"), 0, gtkpack_(new Gtk::HBox(0, 15), - 0, my $check_wizard_hd = new Gtk::CheckButton(_("on Hard Drive")), + 0, my $check_wizard_hd = new Gtk::CheckButton(N("on Hard Drive")), 1, new Gtk::VBox(0, 5), - 0, gtkset_sensitive(gtksignal_connect(new Gtk::Button(_("Configure")), clicked => sub { + 0, gtkset_sensitive(gtksignal_connect(new Gtk::Button(N("Configure")), clicked => sub { ${$central_widget}->destroy(); to_ok(); advanced_where_hd(\&wizard_step2); @@ -2431,9 +2431,9 @@ sub wizard_step2 { }), $where_hd), ), 0, gtkpack_(new Gtk::HBox(0, 15), - 0, my $check_wizard_net = new Gtk::CheckButton(_("across Network")), + 0, my $check_wizard_net = new Gtk::CheckButton(N("across Network")), 1, new Gtk::VBox(0, 5), - 0, gtkset_sensitive(gtksignal_connect(new Gtk::Button(_("Configure")), clicked => sub { + 0, gtkset_sensitive(gtksignal_connect(new Gtk::Button(N("Configure")), clicked => sub { ${$central_widget}->destroy(); to_ok(); advanced_where_net_types(\&wizard_step2); @@ -2441,17 +2441,17 @@ sub wizard_step2 { }), $where_net), ), 0, gtkpack_(new Gtk::HBox(0, 15), - 0, my $check_wizard_cd = new Gtk::CheckButton(_("on CDROM")), + 0, my $check_wizard_cd = new Gtk::CheckButton(N("on CDROM")), 1, new Gtk::VBox(0, 5), - 0, gtkset_sensitive(gtksignal_connect(new Gtk::Button(_("Configure")), clicked => sub { + 0, gtkset_sensitive(gtksignal_connect(new Gtk::Button(N("Configure")), clicked => sub { ${$central_widget}->destroy(); advanced_where_cd(\&wizard_step2); }), $where_cd), ), 0, gtkpack_(new Gtk::HBox(0, 15), - 0, my $check_wizard_tape = new Gtk::CheckButton(_("on Tape Device")), + 0, my $check_wizard_tape = new Gtk::CheckButton(N("on Tape Device")), 1, new Gtk::VBox(0, 5), - 0, gtkset_sensitive(gtksignal_connect(new Gtk::Button(_("Configure")), clicked => sub { + 0, gtkset_sensitive(gtksignal_connect(new Gtk::Button(N("Configure")), clicked => sub { ${$central_widget}->destroy(); advanced_where_tape(\&wizard_step2); }), $where_tape), @@ -2492,12 +2492,12 @@ sub wizard { 1, new Gtk::VBox(0, 5), 1, gtkpack_(new Gtk::VBox(0, 15), 1, new Gtk::VBox(0, 5), - 0, _("Please choose what you want to backup"), - 0, my $check_wizard_sys = new Gtk::CheckButton(_("Backup system")), - 0, my $check_wizard_user = new Gtk::CheckButton(_("Backup Users")), + 0, N("Please choose what you want to backup"), + 0, my $check_wizard_sys = new Gtk::CheckButton(N("Backup system")), + 0, my $check_wizard_user = new Gtk::CheckButton(N("Backup Users")), 0, gtkpack_(new Gtk::HBox(0, 15), 1, new Gtk::VBox(0, 5), - 0, gtksignal_connect(new Gtk::Button(_("Select user manually")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Select user manually")), clicked => sub { ${$central_widget}->destroy(); advanced_what_user(\&wizard); }), @@ -2580,57 +2580,57 @@ sub system_state { $system_state = (); if ($cfg_file_exist) { - $system_state .= _("\nBackup Sources: \n"); - $backup_sys and $system_state .= _("\n- System Files:\n"); + $system_state .= N("\nBackup Sources: \n"); + $backup_sys and $system_state .= N("\n- System Files:\n"); $backup_sys and $system_state .= "\t\t$_\n" foreach @sys_files; - $backup_user and $system_state .= _("\n- User Files:\n"); + $backup_user and $system_state .= N("\n- User Files:\n"); $backup_user and $system_state .= "\t\t$_\n" foreach @user_list; - @list_other and $system_state .= _("\n- Other Files:\n"); + @list_other and $system_state .= N("\n- Other Files:\n"); @list_other and $system_state .= "\t\t$_\n" foreach @list_other; - $where_hd and $system_state .= _("\n- Save on Hard drive on path: %s\n", $save_path); + $where_hd and $system_state .= N("\n- Save on Hard drive on path: %s\n", $save_path); if (($del_hd_files) && (($where_cd) || ($where_tape) || ($where_net)) && ($daemon_media ne 'hd')) { - $system_state .= _("\n- Delete hard drive tar files after backup.\n"); + $system_state .= N("\n- Delete hard drive tar files after backup.\n"); } #- tape and CDRW share some features my $erase_media = 'NO'; $erase_media = 'YES' if (($media_erase) && ($where_cd || $where_tape)); - $where_cd and $system_state .= _("\n- Burn to CD"); - $where_cd and $cdrw and $system_state .= _("RW"); - $where_cd and $system_state .= _(" on device: %s", $cd_device); - $where_cd and $multi_session and $system_state .= _(" (multi-session)"); - $where_tape and $system_state .= _("\n- Save to Tape on device: %s", $tape_device); - (($where_cd || $where_tape) && $media_erase) and $system_state .= _("\t\tErase=%s", $erase_media); + $where_cd and $system_state .= N("\n- Burn to CD"); + $where_cd and $cdrw and $system_state .= N("RW"); + $where_cd and $system_state .= N(" on device: %s", $cd_device); + $where_cd and $multi_session and $system_state .= N(" (multi-session)"); + $where_tape and $system_state .= N("\n- Save to Tape on device: %s", $tape_device); + (($where_cd || $where_tape) && $media_erase) and $system_state .= N("\t\tErase=%s", $erase_media); ($where_cd || $where_tape) and $system_state .= "\n"; - $where_net and $system_state .= _("\n- Save via %s on host: %s\n", $net_proto, $host_name); - $where_net and $system_state .= _("\t\t user name: %s\n\t\t on path: %s \n", $login_user, $host_path); - $system_state .= _("\n- Options:\n"); - $backup_sys or $system_state .= _("\tDo not include System Files\n"); + $where_net and $system_state .= N("\n- Save via %s on host: %s\n", $net_proto, $host_name); + $where_net and $system_state .= N("\t\t user name: %s\n\t\t on path: %s \n", $login_user, $host_path); + $system_state .= N("\n- Options:\n"); + $backup_sys or $system_state .= N("\tDo not include System Files\n"); if ($comp_mode) { - $system_state .= _("\tBackups use tar and bzip2\n"); + $system_state .= N("\tBackups use tar and bzip2\n"); } else { - $system_state .= _("\tBackups use tar and gzip\n"); + $system_state .= N("\tBackups use tar and gzip\n"); } - $daemon_media and $system_state .= _("\n- Daemon (%s) include:\n", $when_space); - ($daemon_media eq 'hd') and $system_state .= _("\t-Hard drive.\n"); - ($daemon_media eq 'cd') and $system_state .= _("\t-CDROM.\n"); - ($daemon_media eq 'tape') and $system_state .= _("\t-Tape \n"); - ($daemon_media eq 'ftp') and $system_state .= _("\t-Network by FTP.\n"); - ($daemon_media eq 'ssh') and $system_state .= _("\t-Network by SSH.\n"); - ($daemon_media eq 'rsync') and $system_state .= _("\t-Network by rsync.\n"); - ($daemon_media eq 'webdav') and $system_state .= _("\t-Network by webdav.\n"); + $daemon_media and $system_state .= N("\n- Daemon (%s) include:\n", $when_space); + ($daemon_media eq 'hd') and $system_state .= N("\t-Hard drive.\n"); + ($daemon_media eq 'cd') and $system_state .= N("\t-CDROM.\n"); + ($daemon_media eq 'tape') and $system_state .= N("\t-Tape \n"); + ($daemon_media eq 'ftp') and $system_state .= N("\t-Network by FTP.\n"); + ($daemon_media eq 'ssh') and $system_state .= N("\t-Network by SSH.\n"); + ($daemon_media eq 'rsync') and $system_state .= N("\t-Network by rsync.\n"); + ($daemon_media eq 'webdav') and $system_state .= N("\t-Network by webdav.\n"); } else { - $system_state = _("No configuration, please click Wizard or Advanced.\n"); + $system_state = N("No configuration, please click Wizard or Advanced.\n"); } } sub restore_state { my @tmp = split(' ', $restore_step_sys_date); - $restore_state = _("List of data to restore:\n\n"); + $restore_state = N("List of data to restore:\n\n"); if ($restore_sys) { $restore_state .= "- Restore System Files.\n"; $restore_state .= " - from date: $tmp[0] $tmp[1]\n"; } @@ -2768,7 +2768,7 @@ sub show_backup_details { 0, new Gtk::VScrollbar($text->vadj), ), 0, gtkadd(gtkset_layout(new Gtk::HButtonBox, -spread), - gtksignal_connect(new Gtk::Button(_("Done")), clicked => sub { + gtksignal_connect(new Gtk::Button(N("Done")), clicked => sub { ${$central_widget}->destroy(); $function->() }), ), @@ -2797,9 +2797,9 @@ sub restore_aff_backup_problems { my $button_restore; my $text = new Gtk::Text(undef, undef); my ($pix_warn_map, $pix_warn_mask) = gtkcreate_png('warning'); - my $restore_pbs_state = _("List of data corrupted:\n\n"); + my $restore_pbs_state = N("List of data corrupted:\n\n"); $restore_pbs_state .= "\t\t$_\n" foreach @files_corrupted ; - $restore_pbs_state .= _("Please uncheck or remove it on next time."); + $restore_pbs_state .= N("Please uncheck or remove it on next time."); gtktext_insert($text, $restore_pbs_state); button_box_restore_main(); @@ -2809,7 +2809,7 @@ sub restore_aff_backup_problems { 1, gtkpack_(new Gtk::HBox(0, 15), 1, new Gtk::VBox(0, 5), 0, new Gtk::Pixmap($pix_warn_map, $pix_warn_mask), - 0, _("Backup files are corrupted"), + 0, N("Backup files are corrupted"), 1, new Gtk::VBox(0, 5), ), 0, new Gtk::VBox(0,10), @@ -2830,8 +2830,8 @@ sub restore_aff_result { gtkpack($advanced_box, $do_restore = gtkpack_(new Gtk::VBox(0,10), 1, new Gtk::VBox(0,10), - 0, _(" All of your selected data have been "), - 0, _(" Successfuly Restored on %s ", $restore_path), + 0, N(" All of your selected data have been "), + 0, N(" Successfuly Restored on %s ", $restore_path), 1, new Gtk::VBox(0,10), ), ); @@ -2949,7 +2949,7 @@ sub restore_do2 { gtkpack($advanced_box, $do_restore = gtkpack_(new Gtk::VBox(0,10), - 0, _(" Restore Configuration "), + 0, N(" Restore Configuration "), 1, createScrolledWindow($text), ), ); @@ -2967,7 +2967,7 @@ sub restore_step_other { $retore_step_other = gtkpack_(new Gtk::VBox(0,10), 1, new Gtk::VBox(0,10), 1, createScrolledWindow($text), - 0, my $check_restore_other_sure = new Gtk::CheckButton(_("OK to restore the other files.")), + 0, my $check_restore_other_sure = new Gtk::CheckButton(N("OK to restore the other files.")), 1, new Gtk::VBox(0,10), ), ); @@ -2984,7 +2984,7 @@ sub restore_step_user { gtkpack($advanced_box, $retore_step_user = gtkpack_(new Gtk::VBox(0,10), 0, new Gtk::VBox(0,10), - 0, _("User list to restore (only the most recent date per user is important)"), + 0, N("User list to restore (only the most recent date per user is important)"), 1, createScrolledWindow(gtkpack__(new Gtk::VBox(0,0), map { my $name; my $var2; @@ -3062,9 +3062,9 @@ sub restore_step_sys { gtkpack($advanced_box, $restore_step_sys = gtkpack_(new Gtk::VBox(0,10), 1, new Gtk::VBox(0,10), - 0, my $check_backup_before = new Gtk::CheckButton(_("Backup the system files before:")), + 0, my $check_backup_before = new Gtk::CheckButton(N("Backup the system files before:")), 0, gtkpack_(new Gtk::HBox(0,10), - 1, _("please choose the date to restore"), + 1, N("please choose the date to restore"), 0, $combo_restore_step_sys, 0, my $details = new Gtk::Button(" Details "), 0, new Gtk::HBox(0,10), @@ -3101,10 +3101,10 @@ sub restore_other_media_hd { gtkpack($advanced_box, $box_where_hd = gtkpack_(new Gtk::VBox(0, 6), 0, new Gtk::HSeparator, - 0, my $check_where_hd = new Gtk::CheckButton(_("Use Hard Disk to backup") ), + 0, my $check_where_hd = new Gtk::CheckButton(N("Use Hard Disk to backup") ), 0, new Gtk::HSeparator, 0, gtkpack_(new Gtk::HBox(0,10), - 0, gtkset_sensitive(new Gtk::Label(_("Please enter the directory to save:")), $where_hd), + 0, gtkset_sensitive(new Gtk::Label(N("Please enter the directory to save:")), $where_hd), 1, new Gtk::VBox(0, 6), 0, gtkset_usize (gtkset_sensitive($save_path_entry = new Gtk::Entry(), $where_hd), 152, 20), 0, gtkset_sensitive($button = gtksignal_connect(new Gtk::Button(), clicked => sub { @@ -3112,13 +3112,13 @@ sub restore_other_media_hd { ), 0, new Gtk::VBox(0, 6), 0, gtkpack_(new Gtk::HBox(0,10), - 0, gtkset_sensitive(new Gtk::Label(_("Please enter the maximum size\n allowed for Drakbackup")), $where_hd), + 0, gtkset_sensitive(new Gtk::Label(N("Please enter the maximum size\n allowed for Drakbackup")), $where_hd), 1, new Gtk::VBox(0, 6), 0, gtkset_usize (gtkset_sensitive(my $spinner = new Gtk::SpinButton($adj, 0, 0), $where_hd), 200, 20), ), 0, gtkpack_(new Gtk::HBox(0,10), 1, new Gtk::VBox(0, 6), - 0, gtkset_sensitive(my $check_where_hd_quota = new Gtk::CheckButton(_("Use quota for backup files.")), $where_hd), + 0, gtkset_sensitive(my $check_where_hd_quota = new Gtk::CheckButton(N("Use quota for backup files.")), $where_hd), 0, new Gtk::VBox(0, 6), ), ), @@ -3147,14 +3147,14 @@ sub restore_find_net { 1, gtkpack_(new Gtk::VBox(0, 15), 1, new Gtk::VBox(0, 5), 1, new Gtk::VBox(0,10), - 1, gtksignal_connect(new Gtk::Button(_("FTP Connection")), clicked => sub { + 1, gtksignal_connect(new Gtk::Button(N("FTP Connection")), clicked => sub { $box_where_net->destroy(); if ($previous_function) { message_underdevel(); } else { } }), - 1, gtksignal_connect(new Gtk::Button(_("Secure Connection")), clicked => sub { + 1, gtksignal_connect(new Gtk::Button(N("Secure Connection")), clicked => sub { $box_where_net->destroy(); if ($previous_function) { } else { @@ -3180,9 +3180,9 @@ sub restore_other_media { gtkpack($advanced_box, $box_find_restore = gtkpack_(new Gtk::VBox(0, 6), 0, new Gtk::HSeparator, - 0, my $check_other_media_hd = new Gtk::CheckButton(_("Restore from Hard Disk.") ), + 0, my $check_other_media_hd = new Gtk::CheckButton(N("Restore from Hard Disk.") ), 0, gtkpack_(new Gtk::HBox(0,10), - 0, gtkset_sensitive(new Gtk::Label(_("Please enter the directory where backups are stored")), $other_media_hd), + 0, gtkset_sensitive(new Gtk::Label(N("Please enter the directory where backups are stored")), $other_media_hd), 1, new Gtk::VBox(0, 6), 0, gtkset_usize (gtkset_sensitive($restore_find_path_entry = new Gtk::Entry(), $other_media_hd), 152, 20), 0, gtkset_sensitive($button = gtksignal_connect(new Gtk::Button(), clicked => sub { @@ -3191,7 +3191,7 @@ sub restore_other_media { ), 1, new Gtk::VBox(0, 6), # 0, new Gtk::HSeparator, -# 0, my $check_other_media_net = new Gtk::CheckButton( _("Restore from Network") ), +# 0, my $check_other_media_net = new Gtk::CheckButton( N("Restore from Network") ), # 0, new Gtk::VBox(0, 6), # 1, gtkpack(new Gtk::HBox(0,10), # new Gtk::VBox(0, 6), @@ -3250,24 +3250,24 @@ sub restore_step2 { 1, new Gtk::VBox(0,10), 1, new Gtk::VBox(0,10), 0, gtkpack_(new Gtk::HBox(0,10), - 0, my $check_restore_other_src = new Gtk::CheckButton(_("Select another media to restore from")), + 0, my $check_restore_other_src = new Gtk::CheckButton(N("Select another media to restore from")), 1, new Gtk::HBox(0,10), - 0, gtkset_sensitive(gtksignal_connect(new Gtk::Button(_("Other Media")), clicked => sub { + 0, gtkset_sensitive(gtksignal_connect(new Gtk::Button(N("Other Media")), clicked => sub { ${$central_widget}->destroy(); restore_other_media(); }), $restore_other_src), ), - 0, gtkset_sensitive(my $check_restore_sys = new Gtk::CheckButton(_("Restore system")), $sys_exist), - 0, gtkset_sensitive(my $check_restore_user = new Gtk::CheckButton(_("Restore Users")), $user_exist), - 0, gtkset_sensitive(my $check_restore_other = new Gtk::CheckButton(_("Restore Other")), $other_exist), + 0, gtkset_sensitive(my $check_restore_sys = new Gtk::CheckButton(N("Restore system")), $sys_exist), + 0, gtkset_sensitive(my $check_restore_user = new Gtk::CheckButton(N("Restore Users")), $user_exist), + 0, gtkset_sensitive(my $check_restore_other = new Gtk::CheckButton(N("Restore Other")), $other_exist), 0, gtkpack_(new Gtk::HBox(0,10), - 0, my $check_restore_other_path = new Gtk::CheckButton(_("select path to restore (instead of /)")), + 0, my $check_restore_other_path = new Gtk::CheckButton(N("select path to restore (instead of /)")), 1, new Gtk::HBox(0,10), 0, gtkset_sensitive(my $restore_path_entry = new Gtk::Entry(), $restore_other_path), ), - 0, gtkset_sensitive(my $check_backup_bef_restore = new Gtk::CheckButton(_("Do new backup before restore (only for incremental backups.)")), + 0, gtkset_sensitive(my $check_backup_bef_restore = new Gtk::CheckButton(N("Do new backup before restore (only for incremental backups.)")), $backup_sys_versions || $backup_user_versions), - 0, gtkset_sensitive(my $check_remove_user_dir = new Gtk::CheckButton(_("Remove user directories before restore.")), $user_exist), + 0, gtkset_sensitive(my $check_remove_user_dir = new Gtk::CheckButton(N("Remove user directories before restore.")), $user_exist), 1, new Gtk::VBox(0,10), ), ); @@ -3380,7 +3380,7 @@ sub catalog_restore { 1, createScrolledWindow($list_bu_files), ), 0, gtkpack_(new Gtk::HBox(1, 10), - 1, gtksignal_connect(new Gtk::Button(_("Restore Selected\nCatalog Entry")), clicked => sub { + 1, gtksignal_connect(new Gtk::Button(N("Restore Selected\nCatalog Entry")), clicked => sub { if ($cat_entry ne '') { my $media_check = restore_catalog_entry($cat_entry, ()); if ($media_check) { @@ -3390,7 +3390,7 @@ sub catalog_restore { } } }), - 1, gtksignal_connect(new Gtk::Button(_("Restore Selected\nFiles")), clicked => sub { + 1, gtksignal_connect(new Gtk::Button(N("Restore Selected\nFiles")), clicked => sub { my $files = @restore_files; #- grab the array before the widget clears it my @passed_files = @restore_files; @@ -3407,7 +3407,7 @@ sub catalog_restore { 0, new Gtk::Label("Restore To Path"), 0, $restore_path_entry = new Gtk::Entry(), ), - 1, gtksignal_connect(new Gtk::Button(_("Change\nRestore Path")), clicked => sub { + 1, gtksignal_connect(new Gtk::Button(N("Change\nRestore Path")), clicked => sub { filedialog_generic(0, "Path To Restore To", \$restore_path_entry, \$restore_path); }), ), @@ -3473,7 +3473,7 @@ sub restore_catalog_entry { my @restore_tar_files = glob("$dev_path/*$backup_time*$tar_ext"); my $matches = @restore_tar_files; if ($matches eq 0) { - show_warning("f", _("Backup files not found at %s.", $dev_path)); + show_warning("f", N("Backup files not found at %s.", $dev_path)); return(0); } else { my $save_path_org = $save_path; @@ -3486,9 +3486,9 @@ sub restore_catalog_entry { if ($media eq 'CD') { #- we know the cdrecord device, and the label #- prompt the user for the right CD - $in->ask_okcancel(_("Restore From CD"),_("Insert the CD with volume label %s\n in the CD drive under mount point /mnt/cdrom", $vol_host) ,1) ? $vol_name = get_cd_volname() : return(0); + $in->ask_okcancel(N("Restore From CD"),N("Insert the CD with volume label %s\n in the CD drive under mount point /mnt/cdrom", $vol_host) ,1) ? $vol_name = get_cd_volname() : return(0); if ($vol_name ne $vol_host) { - show_warning("f", _("Not the correct CD label. Disk is labelled %s.", $vol_name)); + show_warning("f", N("Not the correct CD label. Disk is labelled %s.", $vol_name)); return(0); } else { $restore_result = restore_hd_or_cd($cat_entry, '/mnt/cdrom', @restore_files); @@ -3498,9 +3498,9 @@ sub restore_catalog_entry { if ($media eq 'Tape') { #- a little more complicated, we need to check if other backups #- were done on this tape, and try to find the offset to this one - $in->ask_okcancel(_("Restore From Tape"),_("Insert the tape with volume label %s\n in the tape drive device %s", $vol_host, $dev_path) ,1) ? $vol_name = get_tape_label($dev_path) : return(0); + $in->ask_okcancel(N("Restore From Tape"),N("Insert the tape with volume label %s\n in the tape drive device %s", $vol_host, $dev_path) ,1) ? $vol_name = get_tape_label($dev_path) : return(0); if ($vol_name ne $vol_host) { - show_warning("f", _("Not the correct tape label. Tape is labelled %s.", $vol_name)); + show_warning("f", N("Not the correct tape label. Tape is labelled %s.", $vol_name)); return(0); } else { $restore_result = restore_tape($cat_entry, $dev_path, @restore_files); @@ -3520,30 +3520,30 @@ sub restore_catalog_entry { #- rsync - uses a config file with username - rsync.user #- ftp needs all parameters entered - $in->ask_from(_("Restore Via Network"), _("Restore Via Network Protocol: %s", $media), - [ { label => _("Host Name"), val => \$vol_host }, - { label => _("Host Path or Module"), val => \$dev_path }, - { label => _("Username"), val => \$username }, - { label => _("Password"), val => \$userpass, hidden => 1 }, + $in->ask_from(N("Restore Via Network"), N("Restore Via Network Protocol: %s", $media), + [ { label => N("Host Name"), val => \$vol_host }, + { label => N("Host Path or Module"), val => \$dev_path }, + { label => N("Username"), val => \$username }, + { label => N("Password"), val => \$userpass, hidden => 1 }, ]) or goto return(0); if (($media eq 'ftp') || ($media eq 'rsync')) { if ($userpass eq '') { - show_warning("f", __("Password required")); + show_warning("f", N_("Password required")); return(0); } } if (($media eq 'ftp') || ($media eq 'rsync') || ($media eq 'ssh')) { if ($username eq '') { - show_warning("f", __("Username required")); + show_warning("f", N_("Username required")); return(0); } elsif ($vol_host eq '') { - show_warning("f", __("Hostname required")); + show_warning("f", N_("Hostname required")); return(0); } } if ($dev_path eq '') { - show_warning("f", __("Path or Module required")); + show_warning("f", N_("Path or Module required")); return(0); } @@ -3556,10 +3556,10 @@ sub restore_catalog_entry { system("rm -f $cfg_dir/restores/*"); if (!$restore_result) { - show_warning("i", __("Files Restored...")); + show_warning("i", N_("Files Restored...")); return(0); } else { - show_warning("f", __("Restore Failed...")); + show_warning("f", N_("Restore Failed...")); return(1); } @@ -3797,7 +3797,7 @@ sub restore_box { 1, gtkpack_(new Gtk::VBox(0,10), 1, new Gtk::VBox(0,10), 1, new Gtk::VBox(0,10), - 1, gtksignal_connect(new Gtk::Button(_("Restore all backups")), clicked => sub { + 1, gtksignal_connect(new Gtk::Button(N("Restore all backups")), clicked => sub { $retore_box->destroy(); button_box_restore(); @user_list_to_restore2 = sort @user_backuped; @@ -3806,7 +3806,7 @@ sub restore_box { $restore_user = 1; restore_do() }), - 1, gtksignal_connect(new Gtk::Button(_("Custom Restore")), clicked => sub { + 1, gtksignal_connect(new Gtk::Button(N("Custom Restore")), clicked => sub { $retore_box->destroy(); button_box_restore(); restore_step2(); @@ -3846,22 +3846,22 @@ sub restore_find_media_box { 1, gtkpack(new Gtk::HBox(0, 15), new Gtk::VBox(0, 5), new Gtk::Pixmap($pix_warn_map, $pix_warn_mask), - _($message), + translate($message), new Gtk::VBox(0, 5), ), 1, gtkpack(new Gtk::HBox(0, 15), new Gtk::VBox(0, 5), gtkpack(new Gtk::VBox(0, 10), - gtkset_sensitive(gtksignal_connect(new Gtk::Button(_("CD in place - continue.")), clicked => sub { + gtkset_sensitive(gtksignal_connect(new Gtk::Button(N("CD in place - continue.")), clicked => sub { $good_restore_path = 1; $box2->destroy(); interactive_mode_box("restore"); }), $mount_media), $new_path_entry = gtkset_sensitive(new Gtk::Entry(), $mount_media), - gtkset_sensitive(gtksignal_connect(new Gtk::Button(_("Browse to new restore repository.")), clicked => sub { + gtkset_sensitive(gtksignal_connect(new Gtk::Button(N("Browse to new restore repository.")), clicked => sub { filedialog_generic(0, "Directory To Restore From", \$new_path_entry, \$path_to_find_restore); }), $mount_media), - gtksignal_connect(new Gtk::Button(_("Restore From Catalog")), clicked => sub { + gtksignal_connect(new Gtk::Button(N("Restore From Catalog")), clicked => sub { $box2->destroy(); catalog_restore(); }), @@ -3889,7 +3889,7 @@ sub restore_status { [""], [""], [""], - [_("Restore Progress")], + [N("Restore Progress")], [""], [""], [$pbar3], @@ -3922,20 +3922,20 @@ sub button_box_adv { $button_box_tmp->destroy(); gtkpack($button_box, $button_box_tmp = gtkpack_(new Gtk::HButtonBox, - 0, gtksignal_connect(new Gtk::Button(_("Cancel")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Cancel")), clicked => sub { ${$central_widget}->destroy(); interactive_mode_box(); }), - 0, gtksignal_connect(new Gtk::Button(_("Help")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Help")), clicked => sub { ${$central_widget}->destroy(); adv_help(\&$current_widget,$custom_help); }), 1, new Gtk::HBox(0, 1), - 0, gtksignal_connect(new Gtk::Button(_("Previous")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Previous")), clicked => sub { ${$central_widget}->destroy(); $previous_widget->(); }), - 0, gtksignal_connect(new Gtk::Button(_("Save")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Save")), clicked => sub { ${$central_widget}->destroy(); if (!check_pkg_needs()) { save_conf_file(); @@ -3955,20 +3955,20 @@ sub button_box_restore_main { gtkpack($button_box, $button_box_tmp = gtkpack_(gtkpack_(new Gtk::HButtonBox, - 0, gtksignal_connect(new Gtk::Button(_("Cancel")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Cancel")), clicked => sub { ${$central_widget}->destroy(); interactive_mode_box() }), - 0, gtksignal_connect(new Gtk::Button(_("Help")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Help")), clicked => sub { ${$central_widget}->destroy(); adv_help(\&$current_widget, $custom_help); }), 1, new Gtk::HBox(0, 1), - 0, gtksignal_connect(new Gtk::Button(_("Previous")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Previous")), clicked => sub { ${$central_widget}->destroy(); interactive_mode_box() }), - 0, gtksignal_connect(new Gtk::Button(_("Ok")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Ok")), clicked => sub { ${$central_widget}->destroy(); interactive_mode_box() }), ), @@ -3981,20 +3981,20 @@ sub button_box_backup_end { gtkpack($button_box, $button_box_tmp = gtkpack_(new Gtk::HButtonBox, - 0, gtksignal_connect(new Gtk::Button(_("Cancel")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Cancel")), clicked => sub { ${$central_widget}->destroy(); interactive_mode_box() }), - 0, gtksignal_connect(new Gtk::Button(_("Help")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Help")), clicked => sub { ${$central_widget}->destroy(); adv_help(\&$current_widget,$custom_help) }), 1, new Gtk::HBox(0, 1), - 0, gtksignal_connect(new Gtk::Button(_("Previous")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Previous")), clicked => sub { ${$central_widget}->destroy(); $previous_widget->() }), - 0, gtksignal_connect(new Gtk::Button(_("Build Backup")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Build Backup")), clicked => sub { ${$central_widget}->destroy(); build_backup_status(); build_backup_files(); @@ -4008,20 +4008,20 @@ sub button_box_wizard_end { gtkpack($button_box, $button_box_tmp = gtkpack_(new Gtk::HButtonBox, - 0, gtksignal_connect(new Gtk::Button(_("Cancel")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Cancel")), clicked => sub { ${$central_widget}->destroy(); interactive_mode_box(); }), - 0, gtksignal_connect(new Gtk::Button(_("Help")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Help")), clicked => sub { ${$central_widget}->destroy(); adv_help(\&$current_widget,$custom_help); }), 1, new Gtk::HBox(0, 1), - 0, gtksignal_connect(new Gtk::Button(_("Previous")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Previous")), clicked => sub { ${$central_widget}->destroy(); $previous_widget->(); }), - 0, gtksignal_connect(new Gtk::Button(_("Save")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Save")), clicked => sub { ${$central_widget}->destroy(); save_conf_file(); interactive_mode_box(); @@ -4035,20 +4035,20 @@ sub button_box_restore_end { gtkpack($button_box, $button_box_tmp = gtkpack_(new Gtk::HButtonBox, - 0, gtksignal_connect(new Gtk::Button(_("Cancel")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Cancel")), clicked => sub { ${$central_widget}->destroy(); interactive_mode_box(); }), - 0, gtksignal_connect(new Gtk::Button(_("Help")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Help")), clicked => sub { ${$central_widget}->destroy(); adv_help(\&$current_widget,$custom_help); }), 1, new Gtk::HBox(0, 1), - 0, gtksignal_connect(new Gtk::Button(_("Previous")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Previous")), clicked => sub { ${$central_widget}->destroy(); $previous_widget->(); }), - 0, gtksignal_connect(new Gtk::Button(_("Restore")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Restore")), clicked => sub { ${$central_widget}->destroy(); restore_backend(); }), @@ -4063,7 +4063,7 @@ sub button_box_build_backup_end { $button_box_tmp = gtkpack_(new Gtk::HButtonBox, 1, new Gtk::HBox(0, 5), 1, new Gtk::HBox(0, 5), - 0, gtksignal_connect(new Gtk::Button(_("Ok")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Ok")), clicked => sub { ${$central_widget}->destroy(); interactive_mode_box(); }), @@ -4078,11 +4078,11 @@ sub button_box_restore_pbs_end { $button_box_tmp = gtkpack_(new Gtk::HButtonBox, 1, new Gtk::HBox(0, 5), 1, new Gtk::HBox(0, 5), - 1, gtksignal_connect(new Gtk::Button(_("Help")), clicked => sub { + 1, gtksignal_connect(new Gtk::Button(N("Help")), clicked => sub { ${$central_widget}->destroy(); adv_help(\&$current_widget,$custom_help); }), - 0, gtksignal_connect(new Gtk::Button(_("Ok")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Ok")), clicked => sub { ${$central_widget}->destroy(); interactive_mode_box(); }), @@ -4095,20 +4095,20 @@ sub button_box_build_backup { gtkpack($button_box, $button_box_tmp = gtkpack_(new Gtk::HButtonBox, - 1, gtksignal_connect(new Gtk::Button(_("Cancel")), clicked => sub { + 1, gtksignal_connect(new Gtk::Button(N("Cancel")), clicked => sub { ${$central_widget}->destroy(); interactive_mode_box(); }), - 1, gtksignal_connect(new Gtk::Button(_("Help")), clicked => sub { + 1, gtksignal_connect(new Gtk::Button(N("Help")), clicked => sub { ${$central_widget}->destroy(); adv_help(\&$current_widget,$custom_help); }), 1, new Gtk::HBox(0, 0), - 0, gtksignal_connect(new Gtk::Button(_("Previous")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Previous")), clicked => sub { ${$central_widget}->destroy(); $previous_widget->(); }), - 1, gtksignal_connect(new Gtk::Button(_("Next")), clicked => sub { + 1, gtksignal_connect(new Gtk::Button(N("Next")), clicked => sub { ${$central_widget}->destroy(); $next_widget->(); }), @@ -4122,20 +4122,20 @@ sub button_box_restore { gtkpack($button_box, $button_box_tmp = gtkpack_(new Gtk::HButtonBox, - 1, gtksignal_connect(new Gtk::Button(_("Cancel")), clicked => sub { + 1, gtksignal_connect(new Gtk::Button(N("Cancel")), clicked => sub { ${$central_widget}->destroy(); interactive_mode_box(); }), - 1, gtksignal_connect(new Gtk::Button(_("Help")), clicked => sub { + 1, gtksignal_connect(new Gtk::Button(N("Help")), clicked => sub { ${$central_widget}->destroy(); adv_help(\&$current_widget,$custom_help); }), 1, new Gtk::HBox(0, 0), - 0, gtksignal_connect(new Gtk::Button(_("Previous")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Previous")), clicked => sub { ${$central_widget}->destroy(); $previous_widget->(); }), - 1, gtksignal_connect(new Gtk::Button(_("Next")), clicked => sub { + 1, gtksignal_connect(new Gtk::Button(N("Next")), clicked => sub { ${$central_widget}->destroy(); $next_widget->(); }), @@ -4152,20 +4152,20 @@ sub button_box_find_media { gtkpack($button_box, $button_box_tmp = gtkpack_(new Gtk::HButtonBox, - 1, gtksignal_connect(new Gtk::Button(_("Cancel")), clicked => sub { + 1, gtksignal_connect(new Gtk::Button(N("Cancel")), clicked => sub { $box2->destroy(); interactive_mode_box(); }), - 1, gtksignal_connect(new Gtk::Button(_("Help")), clicked => sub { + 1, gtksignal_connect(new Gtk::Button(N("Help")), clicked => sub { $box2->destroy(); adv_help(\&$current_widget,$custom_help); }), 1, new Gtk::HBox(0, 0), - 0, gtksignal_connect(new Gtk::Button(_("Previous")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Previous")), clicked => sub { $box2->destroy(); interactive_mode_box(); }), - 1, gtkset_sensitive(gtksignal_connect(new Gtk::Button(_("Next")), clicked => sub { + 1, gtkset_sensitive(gtksignal_connect(new Gtk::Button(N("Next")), clicked => sub { $box2->destroy(); interactive_mode_box("restore"); }), $mount_media), @@ -4178,20 +4178,20 @@ sub button_box_wizard { gtkpack($button_box, $button_box_tmp = gtkpack_(new Gtk::HButtonBox, - 1, gtksignal_connect(new Gtk::Button(_("Cancel")), clicked => sub { + 1, gtksignal_connect(new Gtk::Button(N("Cancel")), clicked => sub { ${$central_widget}->destroy(); interactive_mode_box() }), - 1, gtksignal_connect(new Gtk::Button(_("Help")), clicked => sub { + 1, gtksignal_connect(new Gtk::Button(N("Help")), clicked => sub { ${$central_widget}->destroy(); adv_help(\&$current_widget,$custom_help) }), 1, new Gtk::HBox(0, 0), - 0, gtksignal_connect(new Gtk::Button($next_widget ? _("Previous") : _("OK")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button($next_widget ? N("Previous") : N("OK")), clicked => sub { ${$central_widget}->destroy(); $previous_widget ? $previous_widget->() : $next_widget->(); }), - if_($next_widget, 1, gtksignal_connect(new Gtk::Button(_("Next")), clicked => sub { + if_($next_widget, 1, gtksignal_connect(new Gtk::Button(N("Next")), clicked => sub { ${$central_widget}->destroy(); $next_widget ? $next_widget->() : $previous_widget->(); })), @@ -4204,10 +4204,10 @@ sub button_box_main { gtkpack($button_box, $button_box_tmp = gtkpack(gtkset_layout(new Gtk::HButtonBox, -start), - gtksignal_connect(new Gtk::Button(_("Close")), clicked => sub { + gtksignal_connect(new Gtk::Button(N("Close")), clicked => sub { Gtk->main_quit() }), - gtksignal_connect(new Gtk::Button(_("Help")), clicked => sub { + gtksignal_connect(new Gtk::Button(N("Help")), clicked => sub { ${$central_widget}->destroy(); adv_help(\&interactive_mode_box,$custom_help) }), @@ -4227,7 +4227,7 @@ sub send_mail_pb { 0, gtkpack_(new Gtk::HBox(0, 15), 0, new Gtk::VBox(0, 5), 0, new Gtk::Pixmap($pix_warn_map, $pix_warn_mask), - 0, _("Error during sendmail. + 0, N("Error during sendmail. Your report mail was not sent. Please configure sendmail"), ), @@ -4251,9 +4251,9 @@ sub install_rpm { my $box_what_user; gtkpack($advanced_box, $box_what_user = gtkpack_(new Gtk::VBox(0, 15), - 0, _("The following packages need to be installed:\n @list_of_rpm_to_install"), + 0, N("The following packages need to be installed:\n @list_of_rpm_to_install"), 0, new Gtk::HSeparator, - 0, gtksignal_connect(new Gtk::Button(_("Install")), clicked => sub { + 0, gtksignal_connect(new Gtk::Button(N("Install")), clicked => sub { system("/usr/sbin/urpmi --X @list_of_rpm_to_install"); ${$central_widget}->destroy(); $previous_widget->(); @@ -4274,7 +4274,7 @@ sub client_ftp_pb { 0, gtkpack_(new Gtk::HBox(0, 15), 0, new Gtk::VBox(0, 5), 0, new Gtk::Pixmap($pix_warn_map, $pix_warn_mask), - 0, _("Error during sending file via FTP. + 0, N("Error during sending file via FTP. Please correct your FTP configuration."), ), 0, new Gtk::VBox(0, 5), @@ -4297,7 +4297,7 @@ sub message_norestore_box { 1, gtkpack(new Gtk::HBox(0, 15), new Gtk::VBox(0, 5), new Gtk::Pixmap($pix_warn_map, $pix_warn_mask), - _("Please select data to restore..."), + N("Please select data to restore..."), new Gtk::VBox(0, 5), ), 1, new Gtk::VBox(0, 5), @@ -4318,7 +4318,7 @@ sub message_noselect_box { 1, gtkpack(new Gtk::HBox(0, 15), new Gtk::VBox(0, 5), new Gtk::Pixmap($pix_warn_map, $pix_warn_mask), - _("Please select media for backup..."), + N("Please select media for backup..."), new Gtk::VBox(0, 5), ), 1, new Gtk::VBox(0, 5), @@ -4340,7 +4340,7 @@ sub message_noselect_what_box { 1, gtkpack(new Gtk::HBox(0, 15), new Gtk::VBox(0, 5), new Gtk::Pixmap($pix_warn_map, $pix_warn_mask), - _("Please select data to backup..."), + N("Please select data to backup..."), new Gtk::VBox(0, 5), ), 1, new Gtk::VBox(0, 5), @@ -4362,7 +4362,7 @@ sub message_noconf_box { 1, gtkpack(new Gtk::HBox(0, 15), new Gtk::VBox(0, 5), new Gtk::Pixmap($pix_warn_map, $pix_warn_mask), - _("No configuration file found \nplease click Wizard or Advanced."), + N("No configuration file found \nplease click Wizard or Advanced."), new Gtk::VBox(0, 5), ), 1, new Gtk::VBox(0, 5), @@ -4383,7 +4383,7 @@ sub message_underdevel { 1, gtkpack(new Gtk::HBox(0, 15), new Gtk::VBox(0, 5), new Gtk::Pixmap($pix_warn_map, $pix_warn_mask), - _("Under Devel ... please wait."), + N("Under Devel ... please wait."), new Gtk::VBox(0, 5), ), 1, new Gtk::VBox(0, 5), @@ -4464,13 +4464,13 @@ sub build_backup_status { [""], [""], [""], - [_("Backup system files")], + [N("Backup system files")], [ $pbar, $pbar->{label} = new Gtk::Label(' ') ], - [_("Backup user files") ], + [N("Backup user files") ], [$pbar1,$pbar1->{label} = new Gtk::Label(' ') ], - [_("Backup other files")], + [N("Backup other files")], [ $pbar2, $pbar2->{label} = new Gtk::Label(' ') ], - [_("Total Progress")], + [N("Total Progress")], [$pbar3,$pbar3->{label} = new Gtk::Label(' ') ], ), $stext, @@ -4494,16 +4494,16 @@ sub build_backup_ftp_status { gtkpack($advanced_box, $table = gtkpack_(new Gtk::VBox(0, 15), - 1, _("files sending by FTP"), + 1, N("files sending by FTP"), 1, new Gtk::VBox(0, 15), 1, create_packtable ({ col_spacings => 10, row_spacings => 5 }, # [ $pbar->set_show_text( $show_text ); - [_("Sending files...")], + [N("Sending files...")], [""], [ $pbar->{label} = new Gtk::Label(' ') ], [ $pbar], [""], - [_("Total Progress")], + [N("Total Progress")], [ $pbar3->{label} = new Gtk::Label(' ') ], [$pbar3], ), @@ -4526,7 +4526,7 @@ sub build_backup_box_see_conf { gtkpack($advanced_box, $box2 = gtkpack_(new Gtk::HBox(0, 15), 1, gtkpack_(new Gtk::VBox(0,10), - 0, _("Drakbackup Configuration"), + 0, N("Drakbackup Configuration"), 1, createScrolledWindow($text), ), ), @@ -4584,12 +4584,12 @@ sub build_backup_box { $button_from_conf_file->add(gtkpack(new Gtk::HBox(0,10), new Gtk::Pixmap($pix_hd_map, $pix_hd_mask), - new Gtk::Label(_("Backup Now from configuration file")), + new Gtk::Label(N("Backup Now from configuration file")), new Gtk::HBox(0, 5) )); $button_see_conf->add(gtkpack(new Gtk::HBox(0,10), new Gtk::Pixmap($pix_options_map, $pix_options_mask), - new Gtk::Label(_("View Backup Configuration.")), + new Gtk::Label(N("View Backup Configuration.")), new Gtk::HBox(0, 5) )); @@ -4610,17 +4610,17 @@ sub interactive_mode_box { 1, new Gtk::VBox(0, 5), 1, gtkpack_(new Gtk::VBox(0, 15), 1, new Gtk::VBox(0, 5), - 1, gtksignal_connect(new Gtk::Button(_("Wizard Configuration")), clicked => sub { + 1, gtksignal_connect(new Gtk::Button(N("Wizard Configuration")), clicked => sub { ${$central_widget}->destroy(); read_conf_file(); wizard(); }), - 1, gtksignal_connect(new Gtk::Button(_("Advanced Configuration")), clicked => sub { + 1, gtksignal_connect(new Gtk::Button(N("Advanced Configuration")), clicked => sub { button_box_adv(); ${$central_widget}->destroy(); advanced_box(); }), - 1, gtksignal_connect(new Gtk::Button(_("Backup Now")), clicked => sub { + 1, gtksignal_connect(new Gtk::Button(N("Backup Now")), clicked => sub { ${$central_widget}->destroy(); if ($cfg_file_exist) { build_backup_box(); @@ -4628,7 +4628,7 @@ sub interactive_mode_box { message_noconf_box(); } }), - 1, gtksignal_connect(new Gtk::Button(_("Restore")), clicked => sub { + 1, gtksignal_connect(new Gtk::Button(N("Restore")), clicked => sub { ${$central_widget}->destroy(); restore_box(); }), @@ -4662,7 +4662,7 @@ sub interactive_mode { $window1 = $my_win->{window}; unless ($::isEmbedded) { $my_win->{rwindow}->set_position(1); - $my_win->{rwindow}->set_title(_("Drakbackup")); + $my_win->{rwindow}->set_title(N("Drakbackup")); } $my_win->{rwindow}->signal_connect (delete_event => sub { Gtk->exit(0) }); my ($pix_u_map, $pix_u_mask) = gtkcreate_png("drakbackup.540x57"); @@ -4713,7 +4713,7 @@ sub adv_help { my %custom_helps = ( "options" => - _("options description: + N("options description: In this step Drakbackup allow you to change: @@ -4743,7 +4743,7 @@ sub adv_help { "), "mail_pb" => - _(" + N(" Some errors during sendmail are caused by a bad configuration of postfix. To solve it you have to set myhostname or mydomain in /etc/postfix/main.cf @@ -4751,7 +4751,7 @@ sub adv_help { "), "what" => - _("options description: + N("options description: - Backup system files: @@ -4790,7 +4790,7 @@ sub adv_help { "), "restore" => - _("restore description: + N("restore description: Only the most recent date will be used, because with incremental backups it is necessary to restore one by one each older backup. @@ -4816,11 +4816,11 @@ Otherwise, you are able to select only one of these. "), "main" => - _(" Copyright (C) 2001 MandrakeSoft by DUPONT Sebastien ") . + N(" Copyright (C) 2001 MandrakeSoft by DUPONT Sebastien ") . "\n" . -_(" updates 2002 MandrakeSoft by Stew Benedict ") . +N(" updates 2002 MandrakeSoft by Stew Benedict ") . "\n\n" . -_(" This program is free software; you can redistribute it and/or modify +N(" This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. @@ -4834,7 +4834,7 @@ _(" This program is free software; you can redistribute it and/or modify along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.") . "\n\n _____________________\n" . -_("Description: +N("Description: Drakbackup is used to backup your system. During the configuration you can select: @@ -4872,7 +4872,7 @@ Restore Step: "), "ftp" => - _("options description: + N("options description: Please be careful when you are using ftp backup, because only backups that are already built are sent to the server. @@ -4881,7 +4881,7 @@ drive before sending it to the server. "), "restore_pbs" => - _(" + N(" Restore Backup Problems: During the restore step, Drakbackup will verify all your @@ -4893,11 +4893,11 @@ backup data files by hand. ") ); - my $default_help = _(" Copyright (C) 2001 MandrakeSoft by DUPONT Sebastien ") . + my $default_help = N(" Copyright (C) 2001 MandrakeSoft by DUPONT Sebastien ") . "\n" . -_(" updates 2002 MandrakeSoft by Stew Benedict ") . +N(" updates 2002 MandrakeSoft by Stew Benedict ") . "\n\n" . -_(" This program is free software; you can redistribute it and/or modify +N(" This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. @@ -4911,7 +4911,7 @@ _(" This program is free software; you can redistribute it and/or modify along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.") . "\n\n _____________________\n" . -_("Description: +N("Description: Drakbackup is used to backup your system. During the configuration you can select @@ -4958,7 +4958,7 @@ Restore Step: 0, new Gtk::VScrollbar($text->vadj), ), 0, gtkadd(gtkset_layout(new Gtk::HButtonBox, -spread), - gtksignal_connect(new Gtk::Button(_("OK")), clicked => sub { + gtksignal_connect(new Gtk::Button(N("OK")), clicked => sub { ${$central_widget}->destroy(); $function->() }), ), ) diff --git a/perl-install/standalone/drakboot b/perl-install/standalone/drakboot index ade6207de..1aa1855e7 100755 --- a/perl-install/standalone/drakboot +++ b/perl-install/standalone/drakboot @@ -54,7 +54,7 @@ sub lilo_choice my $loader = arch() =~ /ppc/ ? "Yaboot" : "LILO"; if ($@) { $in->ask_warn('', - [ _("Installation of %s failed. The following error occured:", $loader), + [ N("Installation of %s failed. The following error occured:", $loader), grep { !/^Warning:/ } cat_("/tmp/.error") ]); unlink "/tmp/.error"; goto ask; diff --git a/perl-install/standalone/drakbug b/perl-install/standalone/drakbug index 5957a07b3..59bd74c0f 100755 --- a/perl-install/standalone/drakbug +++ b/perl-install/standalone/drakbug @@ -37,16 +37,16 @@ my $prog; my $incident=0; sub usage { - print STDERR _("drakbug version %s + print STDERR N("drakbug version %s Copyright (C) 2002 MandrakeSoft. This is free software and may be redistributed under the terms of the GNU GPL. usage: drakbug [OPTIONS] [PROGRAM_NAME] OPTIONS: -", $version) . _(" --help - print this help message. -") . "\n" . _(" --report - program should be one of mandrake tools -") . "\n" . _(" --incident - program should be one of mandrake tools +", $version) . N(" --help - print this help message. +") . "\n" . N(" --report - program should be one of mandrake tools +") . "\n" . N(" --incident - program should be one of mandrake tools "); exit(0); } @@ -61,29 +61,29 @@ my $window_g = new Gtk::Window -toplevel; $window_g->set_policy($false,$false,$true); $window_g->set_position(1); $window_g->border_width(5); -$window_g->set_title(_("Mandrake Bug Report Tool")); +$window_g->set_title(N("Mandrake Bug Report Tool")); #$window_g->set_usize(540, 350); $window_g->signal_connect("delete_event", \&quit_global); my $mdk_app = { - _("Mandrake Control Center") => 'drakconf', - _("First Time Wizard") => 'drakfw', - _("Synchronization tool") => 'draksync', - _("Standalone Tools") => ['adduserdrake','diskdrake','drakautoinst','drakbackup','drakboot','drakbug','drakfloppy','drakfont','drakgw','drakconnect','drakxservices','drakxtv','keyboardrake','logdrake','mousedrake','net_monitor','printerdrake','scannerdrake','drakfirewall','XFdrake'], - _("HardDrake") => 'harddrake2', - _("Mandrake Online") => 'mdkonline', - _("Menudrake") => 'menudrake', - _("Msec") => 'msec', - _("Remote Control") => 'rfbdrake', - _("Software Manager") => 'rpmdrake', - _("Urpmi") => 'urpmi', - _("Windows Migration tool") => 'transfugdrake', - _("Userdrake") => 'userdrake', - _("Configuration Wizards") => 'wizdrake', + N("Mandrake Control Center") => 'drakconf', + N("First Time Wizard") => 'drakfw', + N("Synchronization tool") => 'draksync', + N("Standalone Tools") => ['adduserdrake','diskdrake','drakautoinst','drakbackup','drakboot','drakbug','drakfloppy','drakfont','drakgw','drakconnect','drakxservices','drakxtv','keyboardrake','logdrake','mousedrake','net_monitor','printerdrake','scannerdrake','drakfirewall','XFdrake'], + N("HardDrake") => 'harddrake2', + N("Mandrake Online") => 'mdkonline', + N("Menudrake") => 'menudrake', + N("Msec") => 'msec', + N("Remote Control") => 'rfbdrake', + N("Software Manager") => 'rpmdrake', + N("Urpmi") => 'urpmi', + N("Windows Migration tool") => 'transfugdrake', + N("Userdrake") => 'userdrake', + N("Configuration Wizards") => 'wizdrake', }; my @generic_tool = keys %{$mdk_app}; -my @all_drakxtools = @ { $mdk_app->{_("Standalone Tools")} }; +my @all_drakxtools = @ { $mdk_app->{N("Standalone Tools")} }; push(@generic_tool,@all_drakxtools); my $kernel_release = chomp_(`uname -r`); @@ -94,10 +94,10 @@ my $table = new Gtk::Table(4,2,'TRUE'); #$table->set_border_width(5); $table->set_row_spacings(10); $table->set_col_spacings(5); -$table->attach(new Gtk::Label(_("Application:")), 0, 1, 0, 1,'fill', 'fill',20,0); -$table->attach(new Gtk::Label(_("Package: ")), 0, 1, 1, 2, 'fill', 'fill',0,0); -$table->attach(new Gtk::Label(_("Kernel:")), 0, 1, 2, 3, 'fill', 'fill',0,0); -$table->attach(new Gtk::Label(_("Release: ")), 0, 1, 3, 4, 'fill', 'fill',0,0); +$table->attach(new Gtk::Label(N("Application:")), 0, 1, 0, 1,'fill', 'fill',20,0); +$table->attach(new Gtk::Label(N("Package: ")), 0, 1, 1, 2, 'fill', 'fill',0,0); +$table->attach(new Gtk::Label(N("Kernel:")), 0, 1, 2, 3, 'fill', 'fill',0,0); +$table->attach(new Gtk::Label(N("Release: ")), 0, 1, 3, 4, 'fill', 'fill',0,0); $table->attach(my $comb_app = new Gtk::Combo(), 1, 2, 0, 1, 'fill', 'fill',0,0); $comb_app->set_usize(270,undef); $comb_app->set_popdown_strings("",sort(@generic_tool)); @@ -112,7 +112,7 @@ gtkpack2__( gtkpack2__(my $vbx = new Gtk::VBox(0,5), gtkadd($table), gtkpack(new Gtk::HBox(0,0), - gtkpack(gtkset_justify(new Gtk::Label(_("\n\nTo submit a bug report, click on the button report.\nThis will open a web browser window on https://drakbug.mandrakesoft.com\n where you'll find a form to fill in.The information displayed above will be \ntransferred to that server\n\n")),"left")), + gtkpack(gtkset_justify(new Gtk::Label(N("\n\nTo submit a bug report, click on the button report.\nThis will open a web browser window on https://drakbug.mandrakesoft.com\n where you'll find a form to fill in.The information displayed above will be \ntransferred to that server\n\n")),"left")), ), gtkpack(new Gtk::HSeparator), @@ -127,11 +127,11 @@ if (defined $prog) { $comb_app->entry->signal_connect('changed', sub { update_app($comb_app->entry->get_text()) }); my $kernel = $kernel_rel->get_chars(0,-1); my $hbx = new Gtk::HBox(0,0); -my $Close_Button = new Gtk::Button(_("Close")); +my $Close_Button = new Gtk::Button(N("Close")); $Close_Button->signal_connect(clicked => sub { Gtk->exit(0) }); $hbx->pack_start($Close_Button,0,0,0); -my $Report_Button = new Gtk::Button(_("Report")); +my $Report_Button = new Gtk::Button(N("Report")); $Report_Button->signal_connect(clicked => sub { my $options = "mdkbugreport=1"; $options.="&incident=1" if $incident; $p = $package->get_text(); $k=$kernel_rel->get_text(); ($r =parse_release()) =~ s/\s//; @@ -153,13 +153,13 @@ sub update_app { my ($text) = @_; my $app_choice; $ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}"; - if (member($text,@all_drakxtools) || $text eq _("Standalone Tools")) { + if (member($text,@all_drakxtools) || $text eq N("Standalone Tools")) { $app_choice = chomp_(`rpm -q drakxtools`) ; - } elsif (member($text,keys %{$mdk_app}) && $text ne _("Standalone Tools")) { + } elsif (member($text,keys %{$mdk_app}) && $text ne N("Standalone Tools")) { $app_choice = get_package($mdk_app->{$text}); } else { LOOP: while (($key,$value) = each %{$mdk_app}) { - next if $key eq _("Standalone Tools"); + next if $key eq N("Standalone Tools"); if ($value eq $text) { $app_choice = get_package($text); $prog = $key; @@ -168,7 +168,7 @@ sub update_app { } } - $app_choice ne '' ? $package->set_text("$app_choice") : $package->set_text(_("Not installed")); + $app_choice ne '' ? $package->set_text("$app_choice") : $package->set_text(N("Not installed")); } my %packages; @@ -180,7 +180,7 @@ sub get_package { if (!defined $rpm_package) { $which_app = chomp_(`which '$executable' 2> /dev/null`); # deush, rpm can takes some time aka it'll sleeps if something has opened rpm db ! - $rpm_package = $which_app eq "" ? _("Package not installed") : chomp_(`rpm -qf '$which_app' 2>&1`); + $rpm_package = $which_app eq "" ? N("Package not installed") : chomp_(`rpm -qf '$which_app' 2>&1`); $packages{$executable} = $rpm_package; } $rpm_package; @@ -193,14 +193,14 @@ sub parse_release { sub connect_bugzilla { my($url) = @_; - my $w = $in->wait_message('',_("connecting to Bugzilla wizard ...")); + my $w = $in->wait_message('',N("connecting to Bugzilla wizard ...")); sleep(3); exec $ENV{BROWSER},$url if exists $ENV{BROWSER} ; my @browser = qw (mozilla konqueror galeon); foreach (@browser) { if (-e "/usr/bin/$_") { standalone::explanations("Contacting $url with $_\n "); exec $_,$url } } - $in->ask_warn('', _("No browser available! Please install one")); + $in->ask_warn('', N("No browser available! Please install one")); } sub read_app_context { diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect index 903d9d0b3..a4930e616 100755 --- a/perl-install/standalone/drakconnect +++ b/perl-install/standalone/drakconnect @@ -76,14 +76,14 @@ network::netconnect::load_conf($netcnx, $netc, $intf); my $window1 = $::isEmbedded ? new Gtk::Plug ($::XID) : new Gtk::Window -toplevel; $window1->signal_connect (delete_event => sub { Gtk->exit(0) }); $window1->set_position(1); -$window1->set_title(_("Network configuration (%d adapters)", @all_cards)); +$window1->set_title(N("Network configuration (%d adapters)", @all_cards)); $window1->border_width(10); $::isEmbedded or $window1->set_usize(500, 400); my $vbox1 = new Gtk::VBox(0,10); $window1->add($vbox1); my $hbox1 = new Gtk::HBox(0,0); $vbox1->pack_start($hbox1,0,0,0); -$hbox1->pack_start(new Gtk::Label(_("Profile: ")),0,0,0); +$hbox1->pack_start(new Gtk::Label(N("Profile: ")),0,0,0); my $combo1 = new Gtk::Combo; $combo1->set_popdown_strings (network::netconnect::get_profiles()); @@ -91,13 +91,13 @@ my $old_profile = $netcnx->{PROFILE}; $combo1->entry->set_text($netcnx->{PROFILE} ? $netcnx->{PROFILE} : "default"); $combo1->entry->set_editable(0); $hbox1->pack_start($combo1,0,0,0); -my $button_del = new Gtk::Button(_("Del profile...")); +my $button_del = new Gtk::Button(N("Del profile...")); $button_del->signal_connect(clicked => sub { my $dialog = new Gtk::Dialog(); $dialog->set_position(1); $dialog->vbox->set_border_width(10); $dialog->signal_connect (delete_event => sub { Gtk->main_quit() }); - $dialog->vbox->pack_start(new Gtk::Label(_("Profile to delete:")),1,1,0); + $dialog->vbox->pack_start(new Gtk::Label(N("Profile to delete:")),1,1,0); my $combo_dialog = new Gtk::Combo; $combo_dialog->set_popdown_strings (grep { ! /default/ } network::netconnect::get_profiles()); $combo_dialog->entry->set_editable(0); @@ -105,14 +105,14 @@ $button_del->signal_connect(clicked => sub { my $bbox_dialog = new Gtk::HButtonBox; $dialog->action_area->add($bbox_dialog); $bbox_dialog->set_layout(-end); - my $button_ok = new Gtk::Button _("OK"); + my $button_ok = new Gtk::Button N("OK"); $button_ok->signal_connect (clicked => sub { network::netconnect::del_profile($netcnx, $combo_dialog->entry->get_text()); $netcnx->{PROFILE} eq $combo_dialog->entry->get_text() and $netcnx->{PROFILE} = "default"; Gtk->main_quit(); }); $bbox_dialog->add($button_ok); - my $button_cancel = new Gtk::Button _("Cancel"); + my $button_cancel = new Gtk::Button N("Cancel"); $button_cancel->signal_connect (clicked => sub { Gtk->main_quit() }); $bbox_dialog->add($button_cancel); $dialog->show_all; @@ -125,26 +125,26 @@ $button_del->signal_connect(clicked => sub { }); $hbox1->pack_start($button_del,0,0,5); $button_del->set_sensitive(network::netconnect::get_profiles() > 1); -my $button_new = new Gtk::Button(_("New profile...")); +my $button_new = new Gtk::Button(N("New profile...")); $button_new->signal_connect(clicked => sub { my $dialog = new Gtk::Dialog(); $dialog->set_position(1); $dialog->vbox->set_border_width(10); $dialog->signal_connect (delete_event => sub { Gtk->main_quit() }); - $dialog->vbox->pack_start(new Gtk::Label(_("Name of the profile to create (the new profile is created as a copy of the current one) :")),1,1,0); + $dialog->vbox->pack_start(new Gtk::Label(N("Name of the profile to create (the new profile is created as a copy of the current one) :")),1,1,0); my $entry_dialog = new Gtk::Entry; $dialog->vbox->pack_start($entry_dialog,1,1,0); my $bbox_dialog = new Gtk::HButtonBox; $dialog->action_area->add($bbox_dialog); $bbox_dialog->set_layout(-end); - my $button_ok = new Gtk::Button _("OK"); + my $button_ok = new Gtk::Button N("OK"); $button_ok->signal_connect (clicked => sub { network::netconnect::add_profile($netcnx, $entry_dialog->get_text()); $netcnx->{PROFILE} = $entry_dialog->get_text(); Gtk->main_quit(); }); $bbox_dialog->add($button_ok); - my $button_cancel = new Gtk::Button _("Cancel"); + my $button_cancel = new Gtk::Button N("Cancel"); $button_cancel->signal_connect (clicked => sub { Gtk->main_quit() }); $bbox_dialog->add($button_cancel); $dialog->show_all; @@ -157,14 +157,14 @@ $button_new->signal_connect(clicked => sub { $hbox1->pack_start($button_new,0,0,5); my $hbox2 = new Gtk::HBox(0,0); $vbox1->pack_start($hbox2,0,0,0); -$hbox2->pack_start(new Gtk::Label(_("Hostname: ")),0,0,0); +$hbox2->pack_start(new Gtk::Label(N("Hostname: ")),0,0,0); my $hostname = chomp_(`hostname`); my $label_host = new Gtk::Label($hostname); $hbox2->pack_start($label_host,0,0,0); #$vbox1->pack_start(new Gtk::HSeparator,1,1,5); -my $frame1 = new Gtk::Frame (_("Internet access")); +my $frame1 = new Gtk::Frame (N("Internet access")); $vbox1->pack_start($frame1,1,1,0); my $vbox_frame1 = new Gtk::VBox(0,0); $vbox_frame1->set_border_width(5); @@ -177,28 +177,28 @@ $table1->set_col_spacings(5); $vbox_frame1->pack_start($table1,1,1,0); #attach (table, child, left_attach, right_attach, top_attach, bottom_attach, xoptions, yoptions, xpadding, ypadding) #$table->attach($button[0], 0, 1, 0, 1, {expand=>1,fill=>1}, {expand=>1,fill=>1},0,0); -$table1->attach(new Gtk::Label(_("Type:")), 0, 1, 0, 1, 'fill', 'fill',0,0); +$table1->attach(new Gtk::Label(N("Type:")), 0, 1, 0, 1, 'fill', 'fill',0,0); my $label4 = new Gtk::Label($netcnx->{type}); $table1->attach($label4, 1, 2, 0, 1, 'fill', 'fill',0,0); -my $label5 = new Gtk::Label($netcnx->{type} eq 'lan' ? _("Gateway:") : _("Interface:")); +my $label5 = new Gtk::Label($netcnx->{type} eq 'lan' ? N("Gateway:") : N("Interface:")); $table1->attach($label5, 0, 1, 1, 2, 'fill', 'fill',0,0); my $label6 = new Gtk::Label($netcnx->{type} eq 'lan' ? $netc->{GATEWAY} : $netcnx->{NET_INTERFACE}); $table1->attach($label6, 1, 2, 1, 2, 'fill', 'fill',0,0); my $isconnected = -1; #-sub connected_local { #- print "in connected local\n"; -#- my $w = $in->wait_message('', _("Testing your connection..."), 1); +#- my $w = $in->wait_message('', N("Testing your connection..."), 1); #- Gtk->main_iteration while Gtk->events_pending; #- $isconnected = connected(); #-} -my $label7 = new Gtk::Label(_("Status:")); +my $label7 = new Gtk::Label(N("Status:")); $table1->attach($label7, 0, 1, 2, 3, 'fill', 'fill',0,0); -my $label8 = new Gtk::Label(_("Testing your connection...")); +my $label8 = new Gtk::Label(N("Testing your connection...")); $table1->attach($label8, 1, 2, 2, 3, 'fill', 'fill',0,0); my $warning_label1 = new Gtk::Label(""); $vbox_frame1->pack_start($warning_label1,0,0,0); -my $button2 = new Gtk::Button(_("Wait please")); +my $button2 = new Gtk::Button(N("Wait please")); $button2->set_sensitive(0); $button2->signal_connect(clicked => sub { if (!$isconnected && cat_($connect_prog) =~ m|/usr/bin/kppp| && -e '/usr/bin/kppp') { @@ -216,19 +216,19 @@ $table1->attach($button2, 2, 3, 2, 3, 'fill', 'fill',0,0); #$table1->attach($button1, 2, 3, 1, 2, 'fill', 'fill',0,0); my $hbox_frame1_button = new Gtk::HBox(0,0); -my $button1 = new Gtk::Button(_("Configure Internet Access...")); +my $button1 = new Gtk::Button(N("Configure Internet Access...")); $button1->signal_connect(clicked => [ \&configure_net, '', $netcnx, $netc, $intf]); $hbox_frame1_button->pack_start($button1, 0, 0, 0); $vbox_frame1->pack_start($hbox_frame1_button,0,0,0); #$vbox1->pack_start(new Gtk::HSeparator,1,1,5); -my $frame2 = new Gtk::Frame (_("LAN configuration")); +my $frame2 = new Gtk::Frame (N("LAN configuration")); $vbox1->pack_start($frame2,1,1,0); my $vbox2 = new Gtk::VBox(0,0); $vbox2->set_border_width(5); $frame2->add($vbox2); -my $clist1 = new_with_titles Gtk::CList("", _("Interface"), _("IP address"), _("Protocol"), _("Driver"), _("State")); +my $clist1 = new_with_titles Gtk::CList("", N("Interface"), N("IP address"), N("Protocol"), N("Driver"), N("State")); $clist1->set_column_auto_resize($_,1) foreach (0..4); $clist1->column_titles_passive(); $clist1->set_shadow_type('etched_out'); @@ -240,7 +240,7 @@ my $ip_regexp = qr/(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/; build_clist(); my $hbox3 = new Gtk::HBox(0,0); -my $button3 = new Gtk::Button(_("Configure Local Area Network...")); +my $button3 = new Gtk::Button(N("Configure Local Area Network...")); $button3->signal_connect(clicked => [ \&configure_lan, '', $netcnx, $netc, $intf]); $hbox3->pack_start($button3, 0, 0, 0); $vbox2->pack_start($hbox3, 0, 0, 0); @@ -252,8 +252,8 @@ $vbox1->pack_start($bbox0,0,0,0); $bbox0->set_layout(-end); -$bbox0->add(new Gtk::Label(_("Click here to launch the wizard ->"))); -my $button_wizard = new Gtk::Button _("Wizard..."); +$bbox0->add(new Gtk::Label(N("Click here to launch the wizard ->"))); +my $button_wizard = new Gtk::Button N("Wizard..."); $button_wizard->signal_connect(clicked => sub { $::isWizard = 1; system("drakconnect --wizard"); @@ -271,34 +271,34 @@ $vbox1->pack_start($bbox1,0,0,0); $bbox1->set_layout(-end); #$bbox1->set_border_width(5); -my $button_expert = new Gtk::Button _("Expert Mode"); +my $button_expert = new Gtk::Button N("Expert Mode"); $button_expert->signal_connect (clicked => sub { foreach ($button1, $button3) { $expert_mode ? $_->hide() : $_->show() } - $button_expert->child->set($expert_mode ? _("Expert Mode") : _("Normal Mode")); + $button_expert->child->set($expert_mode ? N("Expert Mode") : N("Normal Mode")); $expert_mode = !$expert_mode; }); $bbox1->add($button_expert); -my $button_apply = new Gtk::Button _("Apply"); +my $button_apply = new Gtk::Button N("Apply"); $button_apply->signal_connect (clicked => sub { apply(); }); $button_apply->set_sensitive(0); $bbox1->add($button_apply); -my $button_cancel = new Gtk::Button _("Cancel"); +my $button_cancel = new Gtk::Button N("Cancel"); $button_cancel->signal_connect (clicked => sub { $combo1->entry->set_text($old_profile); update(); quit_global(); }); $bbox1->add($button_cancel); -my $button_ok = new Gtk::Button _("OK"); +my $button_ok = new Gtk::Button N("OK"); $button_ok->signal_connect (clicked => sub { my $dialog = new Gtk::Dialog(); $dialog->set_position(1); $dialog->vbox->set_border_width(10); - my $label = new Gtk::Label(_("Please Wait... Applying the configuration")); + my $label = new Gtk::Label(N("Please Wait... Applying the configuration")); $dialog->signal_connect (delete_event => sub { Gtk->main_quit() }); $dialog->vbox->pack_start($label,1,1,20); $dialog->show_all; @@ -372,7 +372,7 @@ sub update { my $h = chomp_(`hostname`); $label_host->set ($h); $label4->set($netcnx->{type}); - $label5->set($netcnx->{type} eq 'lan' ? _("Gateway:") : _("Interface:")); + $label5->set($netcnx->{type} eq 'lan' ? N("Gateway:") : N("Interface:")); $label6->set($netcnx->{type} eq 'lan' ? $netc->{GATEWAY} : $netcnx->{NET_INTERFACE}); $clist1->freeze(); $clist1->clear(); @@ -380,8 +380,8 @@ sub update { $clist1->thaw(); $button_del->set_sensitive(network::netconnect::get_profiles() > 1); $isconnected !=-1 or return 1; - $label8->set($isconnected ? _("Connected") : _("Not connected")); - $button2->child->set($isconnected ? _("Disconnect...") : _("Connect...")); + $label8->set($isconnected ? N("Connected") : N("Not connected")); + $button2->child->set($isconnected ? N("Disconnect...") : N("Connect...")); $button2->set_sensitive(1); 1; } @@ -400,11 +400,11 @@ sub update2 { $isconnected = $to_update; if ($isconnected != -1) { if ($isconnected && !in_ifconfig($netcnx->{NET_INTERFACE})) { - $warning_label1->set(_("Warning, another Internet connection has been detected, maybe using your network")); + $warning_label1->set(N("Warning, another Internet connection has been detected, maybe using your network")); $isconnected = 0; } else { $warning_label1->set("") } - $label8->set($isconnected ? _("Connected") : _("Not connected")); - $button2->child->set($isconnected ? _("Disconnect...") : _("Connect...")); + $label8->set($isconnected ? N("Connected") : N("Not connected")); + $button2->child->set($isconnected ? N("Disconnect...") : N("Connect...")); $button2->set_sensitive(1); } } @@ -427,12 +427,12 @@ sub configure_lan { $dialog->set_position(1); $dialog->vbox->set_border_width(10); $dialog->signal_connect (delete_event => sub { Gtk->main_quit() }); - $dialog->vbox->pack_start(new Gtk::Label(_("You don't have any configured interface. + $dialog->vbox->pack_start(new Gtk::Label(N("You don't have any configured interface. Configure them first by clicking on 'Configure'")),1,1,0); my $bbox_dialog = new Gtk::HButtonBox; $dialog->action_area->add($bbox_dialog); $bbox_dialog->set_layout(-end); - my $button_ok = new Gtk::Button _("OK"); + my $button_ok = new Gtk::Button N("OK"); $button_ok->signal_connect (clicked => sub { Gtk->main_quit() }); $bbox_dialog->add($button_ok); $dialog->show_all; @@ -445,11 +445,11 @@ Configure them first by clicking on 'Configure'")),1,1,0); $window->set_policy (1, 1, 1); $window->signal_connect (delete_event => sub { Gtk->main_quit }); $window->set_position(1); - $window->set_title(_("LAN configuration")); + $window->set_title(N("LAN configuration")); $window->border_width(10); my $vbox1 = new Gtk::VBox(0,0); $window->add($vbox1); - $vbox1->pack_start(new Gtk::Label(_("LAN Configuration")),0,1,0); + $vbox1->pack_start(new Gtk::Label(N("LAN Configuration")),0,1,0); my $notebook = new Gtk::Notebook; $vbox1->pack_start($notebook,0,1,0); my @eth_data; @@ -460,15 +460,15 @@ Configure them first by clicking on 'Configure'")),1,1,0); $card_tab[2*$_+1] = \@conf_data; my $vbox_local = new Gtk::VBox(0,0); $vbox_local->set_border_width(10); - $vbox_local->pack_start(new Gtk::Label(_("Adapter %s: %s", $_+1 , "eth$_")),1,1,0); + $vbox_local->pack_start(new Gtk::Label(N("Adapter %s: %s", $_+1 , "eth$_")),1,1,0); # Eth${_}Hostname = $netc->{HOSTNAME} # Eth${_}HostAlias = " . do { $netc->{HOSTNAME} =~ /([^\.]*)\./; $1 } . " # Eth${_}Driver = $all_cards[$_]->[1] - @conf_data = ([_("IP address"), \$intf->{"eth$_"}{IPADDR}], - [_("Netmask"), \$intf->{"eth$_"}{NETMASK}], - [_("Boot Protocol"), \$intf->{"eth$_"}{BOOTPROTO}, ["static", "dhcp", "bootp"]], - [_("Started on boot"), \$intf->{"eth$_"}{ONBOOT} , ["yes", "no"]], - [_("DHCP client"), \$netcnx->{dhcp_client}] + @conf_data = ([N("IP address"), \$intf->{"eth$_"}{IPADDR}], + [N("Netmask"), \$intf->{"eth$_"}{NETMASK}], + [N("Boot Protocol"), \$intf->{"eth$_"}{BOOTPROTO}, ["static", "dhcp", "bootp"]], + [N("Started on boot"), \$intf->{"eth$_"}{ONBOOT} , ["yes", "no"]], + [N("DHCP client"), \$netcnx->{dhcp_client}] ); my $i = 0; foreach my $j (@conf_data) { @@ -493,13 +493,13 @@ Configure them first by clicking on 'Configure'")),1,1,0); my $c = $_; my $widget_temp; if (-e "$prefix/etc/sysconfig/network-scripts/ifcfg-eth$c") { - $widget_temp = gtksignal_connect(new Gtk::Button(ethisup($c) ? _("deactivate now") : _("activate now")), + $widget_temp = gtksignal_connect(new Gtk::Button(ethisup($c) ? N("deactivate now") : N("activate now")), clicked => sub { system("/sbin/if".(ethisup($c)?"down" : "up")." eth$c"); - gtkbuttonset($_[0], ethisup($c)? _("deactivate now") : _("activate now")); + gtkbuttonset($_[0], ethisup($c)? N("deactivate now") : N("activate now")); }); } else { - $widget_temp = _("This interface has not been configured yet.\nLaunch the configuration wizard in the main window"); + $widget_temp = N("This interface has not been configured yet.\nLaunch the configuration wizard in the main window"); } $vbox_local->pack_start(gtkpack__(new Gtk::HBox(0,0), $widget_temp @@ -518,7 +518,7 @@ Configure them first by clicking on 'Configure'")),1,1,0); my $bbox1 = new Gtk::HButtonBox; $vbox1->pack_start($bbox1,0,0,10); $bbox1->set_layout(-end); - my $button_ok = new Gtk::Button(_("OK")); + my $button_ok = new Gtk::Button(N("OK")); $button_ok->signal_connect (clicked => sub { foreach (0..$#all_cards) { my $i = 0; @@ -534,7 +534,7 @@ Configure them first by clicking on 'Configure'")),1,1,0); $window->destroy(); Gtk->main_quit; }); $bbox1->add($button_ok); - my $button_cancel = new Gtk::Button(_("Cancel")); + my $button_cancel = new Gtk::Button(N("Cancel")); $button_cancel->signal_connect (clicked => sub { $window->destroy(); Gtk->main_quit }); $bbox1->add($button_cancel); @@ -556,12 +556,12 @@ sub configure_net { $dialog->set_position(1); $dialog->vbox->set_border_width(10); $dialog->signal_connect (delete_event => sub { Gtk->main_quit() }); - $dialog->vbox->pack_start(new Gtk::Label(_("You don't have any internet connection. + $dialog->vbox->pack_start(new Gtk::Label(N("You don't have any internet connection. Create one first by clicking on 'Configure'")),1,1,0); my $bbox_dialog = new Gtk::HButtonBox; $dialog->action_area->add($bbox_dialog); $bbox_dialog->set_layout(-end); - my $button_ok = new Gtk::Button _("OK"); + my $button_ok = new Gtk::Button N("OK"); $button_ok->signal_connect (clicked => sub { Gtk->main_quit(); }); @@ -580,56 +580,56 @@ Create one first by clicking on 'Configure'")),1,1,0); $window->set_policy (1, 1, 1); $window->signal_connect (delete_event => sub { Gtk->main_quit }); $window->set_position(1); - $window->set_title(_("Internet connection configuration")); + $window->set_title(N("Internet connection configuration")); $window->border_width(10); my $vbox1 = new Gtk::VBox(0,0); $window->add($vbox1); - $vbox1->pack_start(new Gtk::Label(_("Internet Connection Configuration")),0,1,0); + $vbox1->pack_start(new Gtk::Label(N("Internet Connection Configuration")),0,1,0); $vbox1->pack_start(new Gtk::HSeparator,0,0,5); my $table1 = new Gtk::Table (2, 4, 0); $table1->set_row_spacings(5); $table1->set_col_spacings(5); $vbox1->pack_start($table1,0,0,0); - $table1->attach(new Gtk::Label(_("Profile: ")), 0, 1, 0, 1, 'fill', 'fill',0,0); - $table1->attach(new Gtk::Label(_($netcnx->{PROFILE})), 1, 2, 0, 1, 'fill', 'fill',0,0); - $table1->attach(new Gtk::Label(_("Connection type: ")), 0, 1, 1, 2, 'fill', 'fill',0,0); - $table1->attach(new Gtk::Label(_($netcnx->{type})), 1, 2, 1, 2, 'fill', 'fill',0,0); -# my $button1 = new Gtk::Button(_("Reconfigure using wizard...")); + $table1->attach(new Gtk::Label(N("Profile: ")), 0, 1, 0, 1, 'fill', 'fill',0,0); + $table1->attach(new Gtk::Label(translate($netcnx->{PROFILE})), 1, 2, 0, 1, 'fill', 'fill',0,0); + $table1->attach(new Gtk::Label(N("Connection type: ")), 0, 1, 1, 2, 'fill', 'fill',0,0); + $table1->attach(new Gtk::Label(translate($netcnx->{type})), 1, 2, 1, 2, 'fill', 'fill',0,0); +# my $button1 = new Gtk::Button(N("Reconfigure using wizard...")); # $table1->attach($button1, 2, 4, 0, 2, 'fill', 'fill',0,0); $vbox1->pack_start(new Gtk::HSeparator,0,0,5); - my $frame1 = new Gtk::Frame (_("Parameters")); + my $frame1 = new Gtk::Frame (N("Parameters")); $vbox1->pack_start($frame1,1,1,0); my $vbox2 = new Gtk::VBox(0,0); $frame1->add($vbox2); my $i = 0; - my @conf_data = ([_("Card IRQ"), \$cnx->{irq} ], - [_("Card mem (DMA)"), \$cnx->{mem} ], - [_("Card IO"), \$cnx->{io} ], - [_("Card IO_0"), \$cnx->{io0} ], - [_("Card IO_1"), \$cnx->{io1} ], - [_("Your personal phone number"), \$cnx->{phone_in} ], - [_("Provider name (ex provider.net)"), \$netc->{DOMAINNAME2}], - [_("Provider phone number"), \$cnx->{phone_out} ], - [_("Provider dns 1 (optional)"), \$netc->{dnsServer2}], - [_("Provider dns 2 (optional)"), \$netc->{dnsServer3}], - [_("Account Login (user name)"), \$cnx->{login} ], - [_("Account Password"), \$cnx->{passwd} ], - [_("Dialing mode"), \$cnx->{dialing_mode}, [ "auto", "manual"] ], - [_("Gateway"), \$netc->{GATEWAY}], - [_("Connection name"), \$cnx->{connection} ], - [_("Phone number"), \$cnx->{phone} ], - [_("Login ID"), \$cnx->{login} ], - [_("Password"), \$cnx->{passwd} ], - [_("Authentication"), \$cnx->{auth}, [ _("PAP"), _("Terminal-based"), _("Script-based"), __("CHAP") ] ], - [_("Domain name"), \$cnx->{domain} ], - [_("First DNS Server (optional)"), \$cnx->{dns1} ], - [_("Second DNS Server (optional)"), \$cnx->{dns2} ], - [_("Ethernet Card"), \$netc->{NET_DEVICE}, [ 'eth0', 'eth1', 'eth2', 'eth3', 'eth4', 'eth5','eth6', 'eth7', 'eth8', 'eth9' ]], - [_("DHCP Client"), \$netcnx->{dhcp_client}, ["dhcpcd", "dhcpxd", "dhcp-client"] ], - [_("Connection speed"), \$cnx->{speed}, ["64 Kb/s", "128 Kb/s"]], - [_("Connection timeout (in sec)"), \$cnx->{huptimeout} ] + my @conf_data = ([N("Card IRQ"), \$cnx->{irq} ], + [N("Card mem (DMA)"), \$cnx->{mem} ], + [N("Card IO"), \$cnx->{io} ], + [N("Card IO_0"), \$cnx->{io0} ], + [N("Card IO_1"), \$cnx->{io1} ], + [N("Your personal phone number"), \$cnx->{phone_in} ], + [N("Provider name (ex provider.net)"), \$netc->{DOMAINNAME2}], + [N("Provider phone number"), \$cnx->{phone_out} ], + [N("Provider dns 1 (optional)"), \$netc->{dnsServer2}], + [N("Provider dns 2 (optional)"), \$netc->{dnsServer3}], + [N("Account Login (user name)"), \$cnx->{login} ], + [N("Account Password"), \$cnx->{passwd} ], + [N("Dialing mode"), \$cnx->{dialing_mode}, [ "auto", "manual"] ], + [N("Gateway"), \$netc->{GATEWAY}], + [N("Connection name"), \$cnx->{connection} ], + [N("Phone number"), \$cnx->{phone} ], + [N("Login ID"), \$cnx->{login} ], + [N("Password"), \$cnx->{passwd} ], + [N("Authentication"), \$cnx->{auth}, [ N("PAP"), N("Terminal-based"), N("Script-based"), N_("CHAP") ] ], + [N("Domain name"), \$cnx->{domain} ], + [N("First DNS Server (optional)"), \$cnx->{dns1} ], + [N("Second DNS Server (optional)"), \$cnx->{dns2} ], + [N("Ethernet Card"), \$netc->{NET_DEVICE}, [ 'eth0', 'eth1', 'eth2', 'eth3', 'eth4', 'eth5','eth6', 'eth7', 'eth8', 'eth9' ]], + [N("DHCP Client"), \$netcnx->{dhcp_client}, ["dhcpcd", "dhcpxd", "dhcp-client"] ], + [N("Connection speed"), \$cnx->{speed}, ["64 Kb/s", "128 Kb/s"]], + [N("Connection timeout (in sec)"), \$cnx->{huptimeout} ] ); foreach (@conf_data) { $infos[2*$i] = new Gtk::HBox(0,0); @@ -646,7 +646,7 @@ Create one first by clicking on 'Configure'")),1,1,0); $infos[2*$i+1] = new Gtk::Entry(); $infos[2*$i]->pack_start($infos[2*$i+1],0,0,0); #hide password if Entry Password - if ($_->[0] eq _("Account Password") || $_->[0] eq _("Password")) { $infos[2*$i+1]->set_visibility(0) }; + if ($_->[0] eq N("Account Password") || $_->[0] eq N("Password")) { $infos[2*$i+1]->set_visibility(0) }; } $infos[2*$i+1]->set_text(${$_->[1]}); $i++; @@ -664,7 +664,7 @@ Create one first by clicking on 'Configure'")),1,1,0); my $bbox1 = new Gtk::HButtonBox; $vbox1->pack_start($bbox1,0,0,0); $bbox1->set_layout(-end); - my $button_ok = new Gtk::Button _("OK"); + my $button_ok = new Gtk::Button N("OK"); $button_ok->signal_connect (clicked => sub { $i = 0; foreach (@mask) { @@ -676,7 +676,7 @@ Create one first by clicking on 'Configure'")),1,1,0); $window->destroy(); Gtk->main_quit; }); $bbox1->add($button_ok); - my $button_cancel = new Gtk::Button _("Cancel"); + my $button_cancel = new Gtk::Button N("Cancel"); $button_cancel->signal_connect (clicked => sub { $window->destroy(); Gtk->main_quit }); $bbox1->add($button_cancel); diff --git a/perl-install/standalone/drakfloppy b/perl-install/standalone/drakfloppy index d5ece3c48..d5d4e3e51 100755 --- a/perl-install/standalone/drakfloppy +++ b/perl-install/standalone/drakfloppy @@ -61,17 +61,17 @@ if ($::isEmbedded) { $in = 'interactive'->vnew('su', 'default'); local $_ = join '', @ARGV; -/-h/ and die _("usage: drakfloppy\n"); +/-h/ and die N("usage: drakfloppy\n"); $expert_mode = 0; # we have put here the list in order to do $list->clear() when we have to do -$fixed_font = Gtk::Gdk::Font->fontset_load(_("-misc-Fixed-Medium-r-*-*-*-140-*-*-*-*-*-*,*")); -my @titles = ( _("Module name"), _("Size") ); +$fixed_font = Gtk::Gdk::Font->fontset_load(N("-misc-Fixed-Medium-r-*-*-*-140-*-*-*-*-*-*,*")); +my @titles = ( N("Module name"), N("Size") ); my $list = new_with_titles Gtk::CList( @titles ); my $window = $::isEmbedded ? new Gtk::Plug ($::XID) : new Gtk::Window -toplevel; $window->signal_connect( 'delete_event', sub { $::isEmbedded ? kill('USR1', $::CCPID) : Gtk->exit(0) }); -$window->set_title( _("drakfloppy") ); +$window->set_title( N("drakfloppy") ); $window->set_policy(1, 1, 1); $window->border_width (5); @@ -79,8 +79,8 @@ $window->border_width (5); # the menus are not shown # but they provides shiny shortcut like C-q my @menu_items = ( - { path => _("/_File"), type => '' }, - { path => _("/File/_Quit"), accelerator => _("Q"), callback => sub { $::isEmbedded ? kill('USR1', $::CCPID) : Gtk->exit(0) } }, + { path => N("/_File"), type => '' }, + { path => N("/File/_Quit"), accelerator => N("Q"), callback => sub { $::isEmbedded ? kill('USR1', $::CCPID) : Gtk->exit(0) } }, ); my $menubar = ugtk::create_factory_menu($window, @menu_items); @@ -88,7 +88,7 @@ my $menubar = ugtk::create_factory_menu($window, @menu_items); my $global_vbox = new Gtk::VBox(); -$::isEmbedded or $global_vbox->pack_start (new Gtk::Label(_("boot disk creation")), 0, 0, 0); +$::isEmbedded or $global_vbox->pack_start (new Gtk::Label(N("boot disk creation")), 0, 0, 0); ######## up part my $up_vbox = new Gtk::VBox (0, 0); @@ -96,12 +96,12 @@ my $up_vbox = new Gtk::VBox (0, 0); # device part my $dev_hbox = new Gtk::HBox (1, 0); my $device_combo = new Gtk::Combo(); -my $device_button = new Gtk::Button( _("default") ); +my $device_button = new Gtk::Button( N("default") ); $device_combo->set_popdown_strings( "/dev/fd0", "/dev/fd1", ); $device_button->signal_connect( 'clicked', sub { $device_combo->entry->set_text("/dev/fd0");}); -$dev_hbox->pack_start (new Gtk::Label( _("device") ), 0, 0, 0); +$dev_hbox->pack_start (new Gtk::Label( N("device") ), 0, 0, 0); $dev_hbox->pack_start ($device_combo, 0, 0, 0); $dev_hbox->pack_start ($device_button, 0, 0, 0); $up_vbox->pack_start ($dev_hbox, 0, 0, 0); @@ -109,10 +109,10 @@ $up_vbox->pack_start ($dev_hbox, 0, 0, 0); # kernel part my $ker_hbox = new Gtk::HBox (1, 0); my $kernel_combo = new Gtk::Combo(); -my $kernel_button = new Gtk::Button( _("default") ); +my $kernel_button = new Gtk::Button( N("default") ); $kernel_combo->disable_activate(); $kernel_combo->set_popdown_strings( do { - opendir YREP, "/lib/modules" or die _("DrakFloppy Error: %s", $!); + opendir YREP, "/lib/modules" or die N("DrakFloppy Error: %s", $!); my @files_modules = grep !/^\.\.?$/, readdir YREP; closedir YREP; @files_modules; @@ -123,27 +123,27 @@ $aaaa= `uname -r`; chomp ($aaaa); $kernel_button->signal_connect( 'clicked', sub { $kernel_combo->entry->set_text($aaaa); $list->clear(); }); -$ker_hbox->pack_start (new Gtk::Label( _("kernel version") ), 0, 0, 0); +$ker_hbox->pack_start (new Gtk::Label( N("kernel version") ), 0, 0, 0); $ker_hbox->pack_start ($kernel_combo, 0, 0, 0); $ker_hbox->pack_start ($kernel_button, 0, 0, 0); $up_vbox->pack_start ($ker_hbox, 0, 0, 5); # vbox part -my $up_frame = new Gtk::Frame( _("General") ); +my $up_frame = new Gtk::Frame( N("General") ); $up_frame->add($up_vbox); $global_vbox->pack_start ($up_frame, 1, 1, 0); ### expert mode -my $expert_main_frame = new Gtk::Frame( _("Expert Area") ); +my $expert_main_frame = new Gtk::Frame( N("Expert Area") ); my $expert_dedans = new Gtk::VBox( 0, 5 ); $expert_dedans->border_width (5); -my $expert_button_frame = new Gtk::Frame( _("mkinitrd optional arguments") ); -my $expert_mod_frame = new Gtk::Frame( _("Add a module") ); +my $expert_button_frame = new Gtk::Frame( N("mkinitrd optional arguments") ); +my $expert_mod_frame = new Gtk::Frame( N("Add a module") ); my $expert_pane = new Gtk::HPaned(); $expert_pane->set_handle_size( 10 ); $expert_pane->set_gutter_size( 8 ); -my $expert_button = new Gtk::Button( _("Expert Mode") ); +my $expert_button = new Gtk::Button( N("Expert Mode") ); $expert_button->signal_connect( "clicked", sub { if ($expert_mode) { $expert_mod_frame->hide(); @@ -158,10 +158,10 @@ $expert_button->signal_connect( "clicked", sub { my $expert_button_vbox = new Gtk::VBox(0, 5); my $expert_button_hbox = new Gtk::HBox(0, 5); my $expert_button_hbox2 = new Gtk::HBox(0, 5); -my $force_button = new Gtk::ToggleButton( _("force") ); -my $needed_button = new Gtk::ToggleButton( _("if needed") ); -my $scsi_button = new Gtk::ToggleButton( _("omit scsi modules") ); -my $raid_button = new Gtk::ToggleButton( _("omit raid modules") ); +my $force_button = new Gtk::ToggleButton( N("force") ); +my $needed_button = new Gtk::ToggleButton( N("if needed") ); +my $scsi_button = new Gtk::ToggleButton( N("omit scsi modules") ); +my $raid_button = new Gtk::ToggleButton( N("omit raid modules") ); $expert_button_hbox->pack_start( $force_button, 0, 0, 0 ); $expert_button_hbox->pack_start( $raid_button, 0, 0, 0 ); @@ -197,7 +197,7 @@ fill_tree ($kernel_combo->entry->get_text()); # Create a ScrolledWindow for the list my $list_scrolled_win = new Gtk::ScrolledWindow( undef, undef ); -my $rmmod_button = new Gtk::Button( _("Remove a module") ); +my $rmmod_button = new Gtk::Button( N("Remove a module") ); my $expert_inside_pane2 = new Gtk::VBox (0, 0); my $list_selected_row; @@ -219,7 +219,7 @@ $list->set_shadow_type( 'none' ); $list->show(); ### output -my $output_frame = new Gtk::Frame( _("Output") ); +my $output_frame = new Gtk::Frame( N("Output") ); my $output = new Gtk::Text( undef, undef ); my $vscrollbar = new Gtk::VScrollbar( $output->vadj ); my $output_hbox = new Gtk::HBox (0, 0); @@ -231,8 +231,8 @@ $output_frame->add ($output_hbox); $global_vbox->pack_start ($output_frame, 0, 0, 0); ### final buttons -my $build_button = new Gtk::Button( _("Build the disk") ); -my $cancel_button = new Gtk::Button( _("Cancel") ); +my $build_button = new Gtk::Button( N("Build the disk") ); +my $cancel_button = new Gtk::Button( N("Cancel") ); my $fin_hbox = new Gtk::HBox( 0, 0 ); $cancel_button->signal_connect( clicked=> sub {$::isEmbedded ? kill('USR1', $::CCPID) : Gtk->exit(0)}); $build_button->signal_connect('clicked', \&build_it); @@ -374,18 +374,18 @@ sub build_it { } $co .= " " . $kernel_combo->entry->get_text(); $co .= " 2>&1 |"; - create_dialog(_("Be sure a media is present for the device %s", $device_combo->entry->get_text()), 1) or return; + create_dialog(N("Be sure a media is present for the device %s", $device_combo->entry->get_text()), 1) or return; # we test if the media is present test: my $a = "dd count=1 if=/dev/null of=". $device_combo->entry->get_text() ." 2>&1"; my $b= `$a`; - if ($b =~ "dd") {create_dialog(_("There is no medium or it is write-protected for device %s.\nPlease insert one.", $device_combo->entry->get_text()), 1) ? goto test : return 0; } + if ($b =~ "dd") {create_dialog(N("There is no medium or it is write-protected for device %s.\nPlease insert one.", $device_combo->entry->get_text()), 1) ? goto test : return 0; } - open STATUS, $co or do { create_dialog(_("Unable to fork: %s", $!), 0); return; }; + open STATUS, $co or do { create_dialog(N("Unable to fork: %s", $!), 0); return; }; while () { $output->insert( $fixed_font, undef, undef, $_ ); } - close STATUS or create_dialog(_("Unable to close properly mkbootdisk: \n %s \n %s", $!, $?), 0); + close STATUS or create_dialog(N("Unable to close properly mkbootdisk: \n %s \n %s", $!, $?), 0); return (0); } diff --git a/perl-install/standalone/drakfont b/perl-install/standalone/drakfont index 8253fc10d..b0a5d07e8 100755 --- a/perl-install/standalone/drakfont +++ b/perl-install/standalone/drakfont @@ -229,9 +229,9 @@ sub chk_empty_xfs_path { sub search_installed_fonts { list_fontpath(); - $interactive and progress( $pbar, 0.1, _("Search installed fonts") ); + $interactive and progress( $pbar, 0.1, N("Search installed fonts") ); push @installed_fonts, all($_) foreach @installed_fonts_path; - $interactive and progress( $pbar, 0.1, _("Unselect fonts installed") ); + $interactive and progress( $pbar, 0.1, N("Unselect fonts installed") ); } sub search_installed_fonts_full_path { @@ -255,10 +255,10 @@ sub search_windows_font { foreach my $i ( @{ $_->[0] } ) { if ($interactive) { if ($nb_dir) { - progress( $pbar, 0.25 / $nb_dir, _("parse all fonts") ); + progress( $pbar, 0.25 / $nb_dir, N("parse all fonts") ); } else { - display_error( _("no fonts found") ); + display_error( N("no fonts found") ); return 0; } } @@ -267,13 +267,13 @@ sub search_windows_font { or push @font_list, "$win_dir/$_->[1]/fonts/$i"; } } - $interactive && $nb_dir and progress( $pbar, 1, _("done") ); + $interactive && $nb_dir and progress( $pbar, 1, N("done") ); } if ( !@font_list ) { print "drakfont:: could not find any font in /win*/fonts \n"; $interactive and display_error( - _("could not find any font in your mounted partitions") ); + N("could not find any font in your mounted partitions") ); return 0; } 1; @@ -319,11 +319,11 @@ sub search_dir_font { } } $interactive - and progress( $pbar, 0.50 / @install, _("Reselect correct fonts") ); + and progress( $pbar, 0.50 / @install, N("Reselect correct fonts") ); } - $interactive and progress( $pbar, 1, _("done") ); + $interactive and progress( $pbar, 1, N("done") ); !@font_list && $interactive - and display_error( _("could not find any font.\n") ); + and display_error( N("could not find any font.\n") ); } sub search_dir_font_uninstall { @@ -347,7 +347,7 @@ sub search_dir_font_uninstall { sub search_dir_font_uninstall_gi { @font_list = @uninstall; - $interactive and progress( $pbar, 1, _("Search fonts in installed list") ); + $interactive and progress( $pbar, 1, N("Search fonts in installed list") ); } sub print_list { @@ -375,11 +375,11 @@ sub put_font_dir { foreach my $i (@font_list) { cp_af( $i, $drakfont_dir . "/tmp/tmp" ); $interactive - and progress( $pbar1, 1 / @font_list, _("Fonts copy") ); + and progress( $pbar1, 1 / @font_list, N("Fonts copy") ); } - $interactive and progress( $pbar1, 0.01, _("done") ); + $interactive and progress( $pbar1, 0.01, N("done") ); $interactive - and progress( $pbar2, 0.10, _("True Type fonts installation") ); + and progress( $pbar2, 0.10, N("True Type fonts installation") ); glob("$drakfont_dir/tmp/tmp/*.TTF") and system( 'cd ' . $drakfont_dir @@ -387,12 +387,12 @@ sub put_font_dir { ); system( 'cd ' . $drakfont_dir . '/tmp/tmp && cp *.ttf ../../ttf' ); $interactive - and progress( $pbar2, 0.20, _("please wait during ttmkfdir...") ); + and progress( $pbar2, 0.20, N("please wait during ttmkfdir...") ); # system ('cd '.$drakfont_dir.'/ttf && $ttmkfdir > fonts.dir' ); my $ttfdir = $drakfont_dir . "/ttf"; `$mkttfdir $ttfdir`; - $interactive and progress( $pbar2, 0.10, _("True Type install done") ); + $interactive and progress( $pbar2, 0.10, N("True Type install done") ); my $update_chkfontpath = "$chkfontpath -a $drakfont_dir/ttf"; if ( $so && $gs ) { @@ -401,13 +401,13 @@ sub put_font_dir { system("cd $drakfont_dir/tmp/tmp && $ttf2pt1 -b $fontname"); $interactive and - progress( $pbar2, 0.50 / @glob_drak, _("Fonts conversion") ); + progress( $pbar2, 0.50 / @glob_drak, N("Fonts conversion") ); } system( "cd $drakfont_dir/tmp/tmp && mv *.gsf *.pfb *.pfm *.afm ../Type1" ); system("cd $drakfont_dir/tmp/Type1 && $type1inst"); - $interactive and progress( $pbar2, 0.10, _("type1inst building") ); + $interactive and progress( $pbar2, 0.10, N("type1inst building") ); -e "$drakfont_dir/tmp/Type1/Fontmap" and system( "cd $drakfont_dir/tmp/Type1 && cat Fontmap >> `rpm -ql ghostscript | grep Fontmap.GS` " @@ -417,7 +417,7 @@ sub put_font_dir { ); system("cd $drakfont_dir/Type1 && $type1inst"); $interactive - and progress( $pbar2, 0.05, _("Ghostscript referencing") ); + and progress( $pbar2, 0.05, N("Ghostscript referencing") ); $update_chkfontpath .= "; $chkfontpath -a $drakfont_dir/Type1"; } @@ -427,11 +427,11 @@ sub put_font_dir { { system("cd $/drakfont_dir/tmp/tmp && $ttf2pt1 -b $fontname"); $interactive - and progress( $pbar2, 0.50 / @tmpl, _("Fonts conversion") ); + and progress( $pbar2, 0.50 / @tmpl, N("Fonts conversion") ); } system("cd $drakfont_dir/tmp/tmp && mv *.gsf *.pfb *.pfm ../Type1"); system("cd $drakfont_dir/tmp/Type1 && $type1inst"); - $interactive and progress( $pbar2, 0.1, _("type1inst building") ); + $interactive and progress( $pbar2, 0.1, N("type1inst building") ); system( "cd $drakfont_dir/tmp/Type1 && cat Fontmap >> `rpm -ql ghostscript | grep Fontmap.GS` " ); @@ -440,7 +440,7 @@ sub put_font_dir { ); system("cd $drakfont_dir/Type1 && $type1inst"); $interactive - and progress( $pbar2, 0.05, _("Ghostscript referencing") ); + and progress( $pbar2, 0.05, N("Ghostscript referencing") ); $update_chkfontpath .= "; $chkfontpath -a $drakfont_dir/Type1"; } @@ -450,34 +450,34 @@ sub put_font_dir { system("cd $drakfont_dir/tmp/tmp && $ttf2pt1 $fontname"); $interactive and - progress( $pbar2, 0.25 / @tmpl, _("ttf fonts conversion") ); + progress( $pbar2, 0.25 / @tmpl, N("ttf fonts conversion") ); } foreach my $fontname ( @tmpl = glob("$drakfont_dir/tmp/tmp/*.pfm") ) { system("cd $drakfont_dir/tmp/tmp && $pfm2afm $fontname"); $interactive and - progress( $pbar2, 0.25 / @tmpl, _("pfm fonts conversion") ); + progress( $pbar2, 0.25 / @tmpl, N("pfm fonts conversion") ); } system("cd $drakfont_dir/tmp/tmp && mv *.afm ../Type1"); system("cd $drakfont_dir/tmp/Type1 && mv *.afm ../../Type1 "); system("cd $drakfont_dir/Type1 && $type1inst"); - $interactive and progress( $pbar2, 0.14, _("type1inst building") ); + $interactive and progress( $pbar2, 0.14, N("type1inst building") ); $update_chkfontpath .= "; $chkfontpath -a $drakfont_dir/Type1"; } - $interactive and progress( $pbar2, 0.01, _("done") ); + $interactive and progress( $pbar2, 0.01, N("done") ); $interactive - and progress( $pbar3, 0.25, _("Suppress temporary Files") ); + and progress( $pbar3, 0.25, N("Suppress temporary Files") ); rm_rf("$drakfont_dir/tmp/"); print "\n\nretarting xfs......\n"; - $interactive and progress( $pbar3, 0.5, _("Restart XFS") ); + $interactive and progress( $pbar3, 0.5, N("Restart XFS") ); system($update_chkfontpath); # system ($restart_xfs); # system('kill -USR1 `/sbin/pidof xfs` 2&1>/dev/null'); system('/etc/rc.d/init.d/xfs restart'); - $interactive and progress( $pbar3, 0.30, _("done") ); + $interactive and progress( $pbar3, 0.30, N("done") ); } } @@ -504,7 +504,7 @@ sub remove_gs_fonts { sub remove_fonts { my @list_dir; -e $drakfont_dir . "/remove" || mkdir_p( $drakfont_dir . "/remove" ); - $interactive and progress( $pbar, 1, _("done") ); + $interactive and progress( $pbar, 1, N("done") ); foreach my $i (@font_list) { $_ = $i; if ( /.pfb$/ || /.gsf$/ || /.pfm$/ || /.pfa$/ ) { @@ -516,9 +516,9 @@ sub remove_fonts { $i =~ s/\/\w*\.\w*//gi; grep ( $i, (@list_dir) ) or push @list_dir, $i; $interactive - and progress( $pbar1, 1 / @font_list, _("Suppress Fonts Files") ); + and progress( $pbar1, 1 / @font_list, N("Suppress Fonts Files") ); } - $interactive and progress( $pbar1, 0.01, _("done") ); + $interactive and progress( $pbar1, 0.01, N("done") ); -e "/usr/share/ghostscript" and remove_gs_fonts(); foreach my $i (@list_dir) { if ( listlength all("$i") < 3 ) { @@ -530,19 +530,16 @@ sub remove_fonts { or print "PERL::system command failed during cd or type1inst\n"; } $interactive - and progress( $pbar2, 1 / @list_dir, _("Suppress Fonts Files") ); + and progress( $pbar2, 1 / @list_dir, N("Suppress Fonts Files") ); } - $interactive and progress( $pbar2, 0.01, _("xfs restart") ); + $interactive and progress( $pbar2, 0.01, N("xfs restart") ); system("/etc/rc.d/init.d/xfs restart"); -e "/usr/share/ghostscript" and rm_rf("$drakfont_dir/remove"); - $interactive and progress( $pbar2, 0.01, _("done") ); + $interactive and progress( $pbar2, 0.01, N("done") ); } sub license_msg { - print _( -"Before installing any fonts, be sure that you have the right to use and install them on your system.\n\n-You can install the fonts using the normal way. In rare cases, bogus fonts may hang up your X Server." - ) - . "\n"; + print N("Before installing any fonts, be sure that you have the right to use and install them on your system.\n\n-You can install the fonts using the normal way. In rare cases, bogus fonts may hang up your X Server.") . "\n"; } $list_all_font_path @@ -610,7 +607,7 @@ sub display_error { gtkadd( gtkset_layout( new Gtk::HButtonBox, -spread ), gtksignal_connect( - new Gtk::Button( _("OK") ), + new Gtk::Button( N("OK") ), clicked => sub { ${$central_widget}->destroy(); create_fontsel() } ), @@ -628,7 +625,7 @@ sub interactive_mode { $::isEmbedded ? new Gtk::Plug($::XID) : new Gtk::Window -toplevel; $window1->signal_connect( delete_event => sub { Gtk->exit(0) } ); $window1->set_position(1); - $window1->set_title( _("Fonts Importation") ); + $window1->set_title( N("Fonts Importation") ); $window1->set_border_width(5); my ( $pix_user_map, $pix_user_mask ) = gtkcreate_png("ic-drakfont-48"); my ( $pix_u_map, $pix_u_mask ) = gtkcreate_png("drakfont.620x57"); @@ -658,7 +655,7 @@ sub interactive_mode { gtkadd( gtkset_layout( new Gtk::VButtonBox, -end ), gtksignal_connect( - new Gtk::Button( _("Get Windows Fonts") ), + new Gtk::Button( N("Get Windows Fonts") ), clicked => sub { ${$central_widget}->destroy(); $windows = 1; @@ -666,7 +663,7 @@ sub interactive_mode { } ), gtksignal_connect( - new Gtk::Button( _("Uninstall Fonts") ), + new Gtk::Button( N("Uninstall Fonts") ), clicked => sub { ${$central_widget}->destroy(); uninstall(); @@ -677,7 +674,7 @@ sub interactive_mode { gtkadd( gtkset_layout( new Gtk::VButtonBox, -end ), gtksignal_connect( - new Gtk::Button( _("Advanced Options") ), + new Gtk::Button( N("Advanced Options") ), clicked => sub { ${$central_widget}->destroy(); $windows = 0; @@ -685,7 +682,7 @@ sub interactive_mode { } ), gtksignal_connect( - new Gtk::Button( _("Font List") ), + new Gtk::Button( N("Font List") ), clicked => sub { ${$central_widget}->destroy(); create_fontsel(); @@ -698,12 +695,12 @@ sub interactive_mode { gtkadd( gtkset_layout( new Gtk::VButtonBox, -end ), gtksignal_connect( - new Gtk::Button( _("Help") ), + new Gtk::Button( N("Help") ), clicked => sub { ${$central_widget}->destroy(); help() } ), gtksignal_connect( - new Gtk::Button( _("Close") ), + new Gtk::Button( N("Close") ), clicked => sub { $::isEmbedded and kill 'USR1', $::CCPID; Gtk->main_quit(); @@ -718,11 +715,11 @@ sub interactive_mode { # 0, new Gtk::Pixmap($pix_user_map, $pix_user_mask), # 1, new Gtk::VBox(0,0), # 1, gtkadd(gtkset_layout(new Gtk::VButtonBox, -end), - # gtksignal_connect(new Gtk::Button(_("About")), clicked => sub { + # gtksignal_connect(new Gtk::Button(N("About")), clicked => sub { # ${$central_widget}->destroy(); about() }), - # gtksignal_connect(new Gtk::Button(_(" Help ")), clicked => sub { + # gtksignal_connect(new Gtk::Button(N(" Help ")), clicked => sub { # ${$central_widget}->destroy(); help() }), - # gtksignal_connect(new Gtk::Button(_("Close")), clicked => sub { + # gtksignal_connect(new Gtk::Button(N("Close")), clicked => sub { # $::isEmbedded and kill 'USR1', $::CCPID; # Gtk->main_quit() }), # ), @@ -797,7 +794,7 @@ sub about { gtkadd( gtkset_layout( new Gtk::HButtonBox, -spread ), gtksignal_connect( - new Gtk::Button( _("OK") ), + new Gtk::Button( N("OK") ), clicked => sub { ${$central_widget}->destroy(); create_fontsel() } ), @@ -874,7 +871,7 @@ Visual Interface: gtkadd( gtkset_layout( new Gtk::HButtonBox, -spread ), gtksignal_connect( - new Gtk::Button( _("OK") ), + new Gtk::Button( N("OK") ), clicked => sub { ${$central_widget}->destroy(); create_fontsel() } ), @@ -906,9 +903,7 @@ sub appli_choice { gtkpack( new Gtk::HBox( 0, 10 ), new Gtk::HBox( 0, 10 ), - _( -"Choose the applications that will support the fonts:" - ), + N("Choose the applications that will support the fonts:"), new Gtk::HBox( 0, 10 ), ), 0, @@ -916,28 +911,28 @@ sub appli_choice { 0, gtkpack_( new Gtk::HBox( 0, 10 ), 0, - _("Ghostscript"), 1, + N("Ghostscript"), 1, new Gtk::HBox( 0, 10 ), 0, my $check11 = new Gtk::CheckButton(), ), 0, gtkpack_( new Gtk::HBox( 0, 10 ), 0, - _("StarOffice"), 1, + N("StarOffice"), 1, new Gtk::HBox( 0, 10 ), 0, my $check22 = new Gtk::CheckButton(), ), 0, gtkpack_( new Gtk::HBox( 0, 10 ), 0, - _("Abiword"), 1, + N("Abiword"), 1, new Gtk::HBox( 0, 10 ), 0, my $check33 = new Gtk::CheckButton(), ), 0, gtkpack_( new Gtk::HBox( 0, 10 ), 0, - _("Generic Printers"), 1, + N("Generic Printers"), 1, new Gtk::HBox( 0, 10 ), 0, my $check44 = new Gtk::CheckButton(), ), @@ -948,9 +943,7 @@ sub appli_choice { 1, gtktext_insert( gtkset_editable( $text, 0 ), - _( -"Before installing any fonts, be sure that you have the right to use and install them on your system.\n\n-You can install the fonts using the normal way. In rare cases, bogus fonts may hang up your X Server." - ) + N("Before installing any fonts, be sure that you have the right to use and install them on your system.\n\n-You can install the fonts using the normal way. In rare cases, bogus fonts may hang up your X Server.") ), 0, new Gtk::VScrollbar( $text->vadj ), @@ -961,14 +954,14 @@ sub appli_choice { gtkadd( gtkset_layout( new Gtk::HButtonBox, -spread ), gtksignal_connect( - new Gtk::Button( _("OK") ), + new Gtk::Button( N("OK") ), clicked => sub { ${$central_widget}->destroy(); import_status(); } ), gtksignal_connect( - new Gtk::Button( _("Cancel") ), + new Gtk::Button( N("Cancel") ), clicked => sub { ${$central_widget}->destroy(); create_fontsel(); @@ -1002,19 +995,19 @@ sub font_choice { my $file_dialog; $file_dialog = gtksignal_connect( - new Gtk::FileSelection( _("File Selection") ), + new Gtk::FileSelection( N("File Selection") ), destroy => sub { $file_dialog->destroy(); } ); $file_dialog->ok_button->signal_connect( clicked => \&file_ok_sel, $file_dialog ); - $file_dialog->ok_button->child->set( _("Add") ); + $file_dialog->ok_button->child->set( N("Add") ); $file_dialog->cancel_button->signal_connect( clicked => sub { $file_dialog->destroy() } ); - $file_dialog->cancel_button->child->set( _("Close") ); + $file_dialog->cancel_button->child->set( N("Close") ); $file_dialog->set_filename( - _("Select the font file or directory and click on 'Add'") ); + N("Select the font file or directory and click on 'Add'") ); $file_dialog->show(); } @@ -1052,16 +1045,16 @@ sub advanced_install { gtkadd( gtkset_layout( new Gtk::HButtonBox, -spread ), gtksignal_connect( - new Gtk::Button( _("Add") ), + new Gtk::Button( N("Add") ), clicked => sub { font_choice() } ), gtksignal_connect( - new Gtk::Button( _("Remove Selected") ), + new Gtk::Button( N("Remove Selected") ), clicked => \&list_remove, $list ), gtksignal_connect( - new Gtk::Button( _("Install List") ), + new Gtk::Button( N("Install List") ), clicked => sub { ${$central_widget}->destroy(); appli_choice(); @@ -1104,14 +1097,14 @@ sub show_list_to_remove { gtkadd( gtkset_layout( new Gtk::HButtonBox, -spread ), gtksignal_connect( - new Gtk::Button( _("click here if you are sure.") ), + new Gtk::Button( N("click here if you are sure.") ), clicked => sub { ${$central_widget}->destroy(); import_status_uninstall(); } ), gtksignal_connect( - new Gtk::Button( _("here if no.") ), + new Gtk::Button( N("here if no.") ), clicked => sub { ${$central_widget}->destroy(); create_fontsel() } ), @@ -1172,15 +1165,15 @@ sub uninstall { gtkadd( gtkset_layout( new Gtk::HButtonBox, -spread ), gtksignal_connect( - new Gtk::Button( _("Unselected All") ), + new Gtk::Button( N("Unselected All") ), clicked => sub { $path_list->unselect_all(); } ), gtksignal_connect( - new Gtk::Button( _("Selected All") ), + new Gtk::Button( N("Selected All") ), clicked => sub { $path_list->select_all(); } ), gtksignal_connect( - new Gtk::Button( _("Remove List") ), + new Gtk::Button( N("Remove List") ), clicked => sub { list_to_remove() } ), ), @@ -1202,18 +1195,18 @@ sub import_status { { col_spacings => 10, row_spacings => 50 }, [ "", "" ], [ - _("Initials tests"), $pbar, $pbar->{label} = new Gtk::Label(' ') + N("Initials tests"), $pbar, $pbar->{label} = new Gtk::Label(' ') ], [ - _("Copy fonts on your system"), $pbar1, + N("Copy fonts on your system"), $pbar1, $pbar1->{label} = new Gtk::Label(' ') ], [ - _("Install & convert Fonts"), $pbar2, + N("Install & convert Fonts"), $pbar2, $pbar2->{label} = new Gtk::Label(' ') ], [ - _("Post Install"), $pbar3, $pbar3->{label} = new Gtk::Label(' ') + N("Post Install"), $pbar3, $pbar3->{label} = new Gtk::Label(' ') ], ), ); @@ -1235,14 +1228,14 @@ sub import_status_uninstall { [ "", "" ], [ "", "" ], [ - _("Initials tests"), $pbar, $pbar->{label} = new Gtk::Label(' ') + N("Initials tests"), $pbar, $pbar->{label} = new Gtk::Label(' ') ], [ - _("Remove fonts on your system"), $pbar1, + N("Remove fonts on your system"), $pbar1, $pbar1->{label} = new Gtk::Label(' ') ], [ - _("Post Uninstall"), $pbar2, + N("Post Uninstall"), $pbar2, $pbar2->{label} = new Gtk::Label(' ') ], ), diff --git a/perl-install/standalone/drakgw b/perl-install/standalone/drakgw index 6cd4ecc62..ee1b2d828 100755 --- a/perl-install/standalone/drakgw +++ b/perl-install/standalone/drakgw @@ -40,7 +40,7 @@ local $_ = join '', @ARGV; /-h/ and die "usage: drakgw [--version]\n"; /-version/ and die 'version: $Id$ '."\n"; $::Wizard_pix_up = "wiz_drakgw.png"; -$::Wizard_title = _("Internet Connection Sharing"); +$::Wizard_title = N("Internet Connection Sharing"); $::direct = /-direct/; @@ -113,7 +113,7 @@ sub fatal_quit ($) my ($kernel_version) = c::kernel_version() =~ /(...)/; log::l("[drakgw] kernel_version $kernel_version"); -$kernel_version eq '2.4' or fatal_quit(_("Sorry, we support only 2.4 kernels.")); +$kernel_version eq '2.4' or fatal_quit(N("Sorry, we support only 2.4 kernels.")); begin: @@ -124,15 +124,15 @@ if ($shorewall && $shorewall->{masquerade}) { $::Wizard_no_previous = 1; if (!$shorewall->{disabled}) { - my $r = $in->ask_from_list_(_("Internet Connection Sharing currently enabled"), -_("The setup of Internet connection sharing has already been done. + my $r = $in->ask_from_list_(N("Internet Connection Sharing currently enabled"), +N("The setup of Internet connection sharing has already been done. It's currently enabled. What would you like to do?"), - [ __("disable"), __("reconfigure"), __("dismiss") ]) or quit_global($in, 0); + [ N_("disable"), N_("reconfigure"), N_("dismiss") ]) or quit_global($in, 0); if ($r eq "disable") { { - my $wait_disabl = $in->wait_message('', _("Disabling servers...")); + my $wait_disabl = $in->wait_message('', N("Disabling servers...")); stop_daemons(); } foreach ($dhcpd_conf, $masq_file) { @@ -141,7 +141,7 @@ What would you like to do?"), sys("/etc/init.d/shorewall restart >/dev/null"); log::l("[drakgw] Disabled"); $::Wizard_finished = 1; - $in->ask_okcancel('', _("Internet connection sharing is now disabled.")); + $in->ask_okcancel('', N("Internet connection sharing is now disabled.")); quit_global($in, 0); } if ($r eq "dismiss") { @@ -150,24 +150,24 @@ What would you like to do?"), } else { - my $r = $in->ask_from_list_(_("Internet Connection Sharing currently disabled"), -_("The setup of Internet connection sharing has already been done. + my $r = $in->ask_from_list_(N("Internet Connection Sharing currently disabled"), +N("The setup of Internet connection sharing has already been done. It's currently disabled. What would you like to do?"), - [ __("enable"), __("reconfigure"), __("dismiss") ]); + [ N_("enable"), N_("reconfigure"), N_("dismiss") ]); if ($r eq "enable") { foreach ($dhcpd_conf, $masq_file) { rename($_, "$_.old") if -f $_; rename("$_.drakgwdisable", $_) or die "Could not find configuration. Please reconfigure."; } { - my $wait_enabl = $in->wait_message('', _("Enabling servers...")); + my $wait_enabl = $in->wait_message('', N("Enabling servers...")); start_daemons(); } log::l("[drakgw] Enabled"); $::Wizard_finished = 1; - $in->ask_okcancel('', _("Internet connection sharing is now enabled.")); + $in->ask_okcancel('', N("Internet connection sharing is now enabled.")); quit_global($in, 0); } if ($r eq "dismiss") { @@ -183,8 +183,8 @@ step_ask_confirm: $::Wizard_no_previous = 1; -$::direct or $in->ask_okcancel(_("Internet Connection Sharing"), -_("You are about to configure your computer to share its Internet connection. +$::direct or $in->ask_okcancel(N("Internet Connection Sharing"), +N("You are about to configure your computer to share its Internet connection. With that feature, other computers on your local network will be able to use this computer's Internet connection. Make sure you have configured your Network/Internet access using drakconnect before going any further. @@ -212,8 +212,8 @@ log::l("[drakgw] Available network cards: ", join(", ", @cards)); my $format = sub { $aliased_devices{$_[0]} ? - _("Interface %s (using module %s)", $_[0], $aliased_devices{$_[0]}) : - _("Interface %s", $_[0]); + N("Interface %s (using module %s)", $_[0], $aliased_devices{$_[0]}) : + N("Interface %s", $_[0]); }; #- setup the network interface we shall use @@ -221,15 +221,15 @@ my $format = sub { my $device; if (!@cards) { - $in->ask_warn(_("No network adapter on your system!"), - _("No ethernet network adapter has been detected on your system. Please run the hardware configuration tool.")); + $in->ask_warn(N("No network adapter on your system!"), + N("No ethernet network adapter has been detected on your system. Please run the hardware configuration tool.")); quit_global($in, 0); } elsif (@cards == 1) { $device = $cards[0]; - $in->ask_okcancel(_("Network interface"), -_("There is only one configured network adapter on your system: + $in->ask_okcancel(N("Network interface"), +N("There is only one configured network adapter on your system: %s @@ -237,8 +237,8 @@ I am about to setup your Local Area Network with that adapter.", $format->($devi } else { - $device = $in->ask_from_listf(_("Choose the network interface"), - _("Please choose what network adapter will be connected to your Local Area Network."), + $device = $in->ask_from_listf(N("Choose the network interface"), + N("Please choose what network adapter will be connected to your Local Area Network."), $format, \@cards, ) or goto step_ask_confirm; @@ -261,63 +261,63 @@ my $reconf_dhcp_server_intf = 1; if (grep(/$device/, @configured_devices)) { step_warning_already_conf: - my $auto = _('Yes'); - my $dhcp_details = _('Yes'); + my $auto = N("Yes"); + my $dhcp_details = N("Yes"); my $conf = network::read_interface_conf("/etc/sysconfig/network-scripts/ifcfg-$device"); - $in->ask_from(_("Network interface already configured"), - _("Warning, the network adapter (%s) is already configured. + $in->ask_from(N("Network interface already configured"), + N("Warning, the network adapter (%s) is already configured. Do you want an automatic re-configuration? You can do it manually but you need to know what you're doing.", $device), - [ { label => _("Automatic reconfiguration"), val => \$auto, list => [ _('Yes'), _('No (experts only)') ] }, - { val => _("Show current interface configuration"), clicked => - sub { $in->ask_warn(_('Current interface configuration'), - _("Current configuration of `%s': + [ { label => N("Automatic reconfiguration"), val => \$auto, list => [ N("Yes"), N("No (experts only)") ] }, + { val => N("Show current interface configuration"), clicked => + sub { $in->ask_warn(N("Current interface configuration"), + N("Current configuration of `%s': Network: %s IP address: %s IP attribution: %s Driver: %s", $device, $conf->{NETWORK}, $conf->{IPADDR}, $conf->{BOOTPROTO}, $aliased_devices{$device} || '(unknown)')) } } ]) or goto step_detectsetup; - if ($auto ne _('Yes')) { + if ($auto ne N("Yes")) { $reconf_dhcp_server_intf = 0; $server_ip = $conf->{IPADDR}; $nameserver_ip = $conf->{IPADDR}; $lan_address = $conf->{NETWORK}; $in->ask_from('', - _("I can keep your current configuration and assume you already set up a DHCP server; in that case please verify I correctly read the Network that you use for your local network; I will not reconfigure it and I will not touch your DHCP server configuration. + N("I can keep your current configuration and assume you already set up a DHCP server; in that case please verify I correctly read the Network that you use for your local network; I will not reconfigure it and I will not touch your DHCP server configuration. The default DNS entry is the Caching Nameserver configured on the firewall. You can replace that with your ISP DNS IP, for example. Else, I can reconfigure your interface and (re)configure a DHCP server for you. ", $device), - [ { label => _("Local Network adress"), val => \$lan_address, type => 'entry' }, - { label => _("Netmask"), val => \$netmask, type => 'entry' } ]) + [ { label => N("Local Network adress"), val => \$lan_address, type => 'entry' }, + { label => N("Netmask"), val => \$netmask, type => 'entry' } ]) or goto step_warning_already_conf; $in->ask_from('', - _("DHCP Server Configuration. + N("DHCP Server Configuration. Here you can select different options for the DHCP server configuration. If you don't know the meaning of an option, simply leave it as it is. ", $device), - [ { label => _("(This) DHCP Server IP"), val => \$server_ip, type => 'entry' }, - { label => _("The DNS Server IP"), val => \$nameserver_ip, type => 'entry' }, - { label => _("The internal domain name"), val => \$internal_domain_name, type => 'entry' }, - { label => _("The DHCP start range"), val => \$start_range, type => 'entry' }, - { label => _("The DHCP end range"), val => \$end_range, type => 'entry' }, - { label => _("The default lease (in seconds)"), val => \$default_lease, type => 'entry' }, - { label => _("The maximum lease (in seconds)"), val => \$max_lease, type => 'entry' }, - { label => _("Re-configure interface and DHCP server"), val => \$reconf_dhcp_server_intf, type => 'bool' } ]) + [ { label => N("(This) DHCP Server IP"), val => \$server_ip, type => 'entry' }, + { label => N("The DNS Server IP"), val => \$nameserver_ip, type => 'entry' }, + { label => N("The internal domain name"), val => \$internal_domain_name, type => 'entry' }, + { label => N("The DHCP start range"), val => \$start_range, type => 'entry' }, + { label => N("The DHCP end range"), val => \$end_range, type => 'entry' }, + { label => N("The default lease (in seconds)"), val => \$default_lease, type => 'entry' }, + { label => N("The maximum lease (in seconds)"), val => \$max_lease, type => 'entry' }, + { label => N("Re-configure interface and DHCP server"), val => \$reconf_dhcp_server_intf, type => 'bool' } ]) or goto step_warning_already_conf; } } if (!($lan_address =~ s/\.0$//)) { $in->ask_warn('', - _("The Local Network did not finish with `.0', bailing out.")); + N("The Local Network did not finish with `.0', bailing out.")); quit_global($in, 0); } standalone::explanations("Using LAN address <$lan_address>"); @@ -328,7 +328,7 @@ standalone::explanations("Using LAN address <$lan_address>"); foreach (grep { $_ ne $device } @configured_devices) { grep(/$lan_address/, cat_("/etc/sysconfig/network-scripts/ifcfg-$_")) and - ($in->ask_warn('', _("Potential LAN address conflict found in current config of %s!\n", $_)) or goto step_detectsetup); + ($in->ask_warn('', N("Potential LAN address conflict found in current config of %s!\n", $_)) or goto step_detectsetup); } @@ -338,8 +338,8 @@ network::shorewall::check_iptables($in) or goto step_detectsetup; #- ********************************** #- * 2nd step: configure -$wait_configuring = $in->wait_message(_("Configuring..."), - _("Configuring scripts, installing software, starting servers...")); +$wait_configuring = $in->wait_message(N("Configuring..."), + N("Configuring scripts, installing software, starting servers...")); #- setup the /etc/sysconfig/network-script/ script @@ -375,7 +375,7 @@ my @needed_to_install = grep { !-e $rpm2file{$_} } keys %rpm2file; if (grep { !-e $rpm2file{$_} } keys %rpm2file) { foreach (keys %rpm2file) { -e $rpm2file{$_} or $in->do_pkgs->install($_); - -e $rpm2file{$_} or fatal_quit(_("Problems installing package %s", $_)); + -e $rpm2file{$_} or fatal_quit(N("Problems installing package %s", $_)); } } @@ -507,8 +507,8 @@ undef $wait_configuring; $::Wizard_no_previous = 1; $::Wizard_finished = 1; -$in->ask_okcancel(_("Congratulations!"), -_("Everything has been configured. +$in->ask_okcancel(N("Congratulations!"), +N("Everything has been configured. You may now share Internet connection with other computers on your Local Area Network, using automatic network configuration (DHCP).")); @@ -527,21 +527,21 @@ sub pur_gtk_mode init Gtk; my $setup_state = $shorewall && $shorewall->{masquerade} ? ($shorewall->{disabled} ? - _("The setup has already been done, but it's currently disabled.") : - _("The setup has already been done, and it's currently enabled.")) : - _("No Internet Connection Sharing has ever been configured."); + N("The setup has already been done, but it's currently disabled.") : + N("The setup has already been done, and it's currently enabled.")) : + N("No Internet Connection Sharing has ever been configured."); my $window1 = $::isEmbedded ? new Gtk::Plug ($::XID) : new Gtk::Window -toplevel; $window1->signal_connect(delete_event => sub { Gtk->exit(0) }); $window1->set_position(1); - $window1->set_title(_("Internet connection sharing configuration")); + $window1->set_title(N("Internet connection sharing configuration")); $window1->border_width(10); my $vbox1 = new Gtk::VBox(0,0); $window1->add($vbox1); my $hbox1 = new Gtk::HBox(0,0); $vbox1->pack_start($hbox1,1,1,0); my $label1 = new Gtk::Label( -_("Welcome to the Internet Connection Sharing utility! +N("Welcome to the Internet Connection Sharing utility! %s @@ -553,13 +553,13 @@ Click on Configure to launch the setup wizard.", $setup_state)); my $bbox1 = new Gtk::HButtonBox; $vbox1->pack_start($bbox1,0,0,0); $bbox1->set_layout(-end); - my $button_conf = new Gtk::Button _("Configure"); + my $button_conf = new Gtk::Button N("Configure"); $button_conf->signal_connect(clicked => sub { system("/usr/sbin/drakgw --wizard"); kill('USR1', $::CCPID); }); $bbox1->add($button_conf); - my $button_cancel = new Gtk::Button _("Cancel"); + my $button_cancel = new Gtk::Button N("Cancel"); $button_cancel->signal_connect(clicked => sub { kill('USR1', $::CCPID); }); diff --git a/perl-install/standalone/drakperm b/perl-install/standalone/drakperm index 84135b75e..a94d9d6b0 100755 --- a/perl-install/standalone/drakperm +++ b/perl-install/standalone/drakperm @@ -12,7 +12,7 @@ use interactive; my $in = 'interactive'->vnew('su', 'default'); local $_ = join '', @ARGV; -/-h/ and die _("no help implemented yet.\n"); +/-h/ and die N("no help implemented yet.\n"); /-version/ and die 'version: $Id$'."\n"; @@ -39,31 +39,31 @@ my $W = $w->{window}; #my $W = $::isEmbedded ? new Gtk::Plug ($::XID) : new Gtk::Window ("toplevel"); $W->signal_connect(delete_event => sub { my_gtk->exit }); my $scroll = new Gtk::ScrolledWindow; -my $Perm_list = new_with_titles Gtk::CList((_("path"),_("user"),_("group"),_("permissions"))); +my $Perm_list = new_with_titles Gtk::CList((N("path"),N("user"),N("group"),N("permissions"))); my $vb = new Gtk::VBox(0,5); my $select_box= new Gtk::HBox(0,5); my $action_box= new Gtk::HBox(0,5); my $up_down_box=new Gtk::HBox(0,5); my $B_quit = new Gtk::Button('quit'); my $B_sav = new Gtk::Button('save'); -my $B_up = new Gtk::Button(_("Up")); -my $B_del = new Gtk::Button(_("delete")); -my $B_edit = new Gtk::Button(_("edit")); -my $B_down = new Gtk::Button(_("Down")); -my $B_add = new Gtk::Button(_("add a rule")); -my $label_perm= new Gtk::Label(_("select perm file to see/edit")); +my $B_up = new Gtk::Button(N("Up")); +my $B_del = new Gtk::Button(N("delete")); +my $B_edit = new Gtk::Button(N("edit")); +my $B_down = new Gtk::Button(N("Down")); +my $B_add = new Gtk::Button(N("add a rule")); +my $label_perm= new Gtk::Label(N("select perm file to see/edit")); my $combo_perm= new Gtk::Combo; my $tips = new Gtk::Tooltips; -my $pres = new Gtk::Label(_("Drakperm is used to see files to use in order to fix permissions, owners, and groups via msec.\nYou can also edit your own rules which will owerwrite the default rules.")); +my $pres = new Gtk::Label(N("Drakperm is used to see files to use in order to fix permissions, owners, and groups via msec.\nYou can also edit your own rules which will owerwrite the default rules.")); my $F = new Gtk::Frame; #- widgets settings $combo_perm->set_popdown_strings(sort(keys %perm)); -$tips->set_tip($B_add,_("Add a new rule at the end")); -$tips->set_tip($B_edit,_("Edit curent rule")); -$tips->set_tip($B_up,_("Up selected rule one level")); -$tips->set_tip($B_down,_("Down selected rule one level")); -$tips->set_tip($B_del,_("Delete selected rule")); +$tips->set_tip($B_add,N("Add a new rule at the end")); +$tips->set_tip($B_edit,N("Edit curent rule")); +$tips->set_tip($B_up,N("Up selected rule one level")); +$tips->set_tip($B_down,N("Down selected rule one level")); +$tips->set_tip($B_del,N("Delete selected rule")); #- signal management $W->signal_connect(delete_event => sub { my_gtk->exit }); @@ -234,25 +234,25 @@ sub row_setting_dialog{ my $dlg = new Gtk::Dialog(); my $ok = new Gtk::Button('ok'); my $cancel = new Gtk::Button('cancel'); - my $browse = new Gtk::Button(_("browse")); + my $browse = new Gtk::Button(N("browse")); my $users = new Gtk::Combo; my $groups = new Gtk::Combo; my $file = new Gtk::Entry; my $file_hbox=new Gtk::HBox(0,5); my $usr_hbox= new Gtk::HBox(0,5); my $usr_vbox= new Gtk::VBox(0,5); - my $usr_check=new Gtk::CheckButton(_("Current user")); + my $usr_check=new Gtk::CheckButton(N("Current user")); local @rights = ('user','group','other'); local @check = ( '' , 'read','write','execute'); my $hb_rights = new Gtk::HBox(0,15); my $vb_rights = new Gtk::VBox(0,15); - my $F_rights = new Gtk::Frame(_("Permissions")); - my $F_path = new Gtk::Frame(_("Path")); - my $F_usr = new Gtk::Frame(_("Property")); + my $F_rights = new Gtk::Frame(N("Permissions")); + my $F_path = new Gtk::Frame(N("Path")); + my $F_usr = new Gtk::Frame(N("Property")); my $vb_specials = new Gtk::VBox(0,5); - my $sticky = new Gtk::CheckButton(_("sticky-bit")); - my $suid = new Gtk::CheckButton(_("Set-UID")); - my $gid = new Gtk::CheckButton(_("Set-GID")); + my $sticky = new Gtk::CheckButton(N("sticky-bit")); + my $suid = new Gtk::CheckButton(N("Set-UID")); + my $gid = new Gtk::CheckButton(N("Set-GID")); local $rght = ${$CURENT{'data'}}[3]; local $s = (length($rght) == 4)?substr($rght,0,1):0 ; local $user = ($s)?substr($rght,1,1):substr($rght,0,1); @@ -307,15 +307,15 @@ sub row_setting_dialog{ $users->set_sensitive(0); } - $tips->set_tip($sticky,_("Used for directory:\n only owner of directory or file in this directory can delete it")); - $tips->set_tip($suid,_("Use owner id for execution")); - $tips->set_tip($gid,_("Use group id for execution")); - $tips->set_tip($usr_check,_("when checked, owner and group won't be changed")); + $tips->set_tip($sticky,N("Used for directory:\n only owner of directory or file in this directory can delete it")); + $tips->set_tip($suid,N("Use owner id for execution")); + $tips->set_tip($gid,N("Use group id for execution")); + $tips->set_tip($usr_check,N("when checked, owner and group won't be changed")); #- event management $cancel->signal_connect( clicked =>sub{ $dlg->destroy } ); $browse->signal_connect( clicked => sub { - my $file_dlg = new Gtk::FileSelection(_("Path selection")); + my $file_dlg = new Gtk::FileSelection(N("Path selection")); $file_dlg->set_modal(1); $file_dlg->show; $file_dlg->set_filename( $file->get_text ); @@ -361,9 +361,9 @@ sub row_setting_dialog{ $usr_vbox->add($usr_check); $usr_vbox->add($usr_hbox); - $usr_hbox->add(new Gtk::Label(_("user :"))); + $usr_hbox->add(new Gtk::Label(N("user :"))); $usr_hbox->add($users); - $usr_hbox->add(new Gtk::Label(_("group :"))); + $usr_hbox->add(new Gtk::Label(N("group :"))); $usr_hbox->add($groups); $F_path->add($file_hbox); diff --git a/perl-install/standalone/draksound b/perl-install/standalone/draksound index 8af6154aa..b8b5c519c 100755 --- a/perl-install/standalone/draksound +++ b/perl-install/standalone/draksound @@ -44,15 +44,15 @@ if (@devices) { harddrake::sound::config($in, $_); } modules::probe_category('multimedia/sound'); } else { - $in->ask_warn(_("No Sound Card detected!"), - formatAlaTeX(_("No Sound Card has been detected on your machine. Please verify that a Linux-supported Sound Card is correctly plugged in. + $in->ask_warn(N("No Sound Card detected!"), + formatAlaTeX(N("No Sound Card has been detected on your machine. Please verify that a Linux-supported Sound Card is correctly plugged in. You can visit our hardware database at: http://www.linux-mandrake.com/en/hardware.php3"). -_("\n\n\nNote: if you've an ISA PnP sound card, you'll have to use the sndconfig program. Just type \"sndconfig\" in a console."))); +N("\n\n\nNote: if you've an ISA PnP sound card, you'll have to use the sndconfig program. Just type \"sndconfig\" in a console."))); } modules::write_conf; diff --git a/perl-install/standalone/draksplash b/perl-install/standalone/draksplash index b748bfcdc..3618ab6d0 100755 --- a/perl-install/standalone/draksplash +++ b/perl-install/standalone/draksplash @@ -23,7 +23,7 @@ if ($::isEmbedded) { my $in = 'interactive'->vnew('su', 'default'); local $_ = join '', @ARGV; -/-h/ and die _("no help implemented yet.\n"); +/-h/ and die N("no help implemented yet.\n"); /-version/ and die 'version: $Id$'."\n"; my $window = $::isEmbedded ? new Gtk::Plug ($::XID) : new Gtk::Window ("toplevel"); @@ -31,7 +31,7 @@ $window->signal_connect(delete_event => sub { $::isEmbedded ? kill(USR1, $::CCPI #- verification of package image magik if(!$in->do_pkgs->is_installed('ImageMagick')){ - $in->ask_okcancel(_("Error"),_("package 'ImageMagick' is required for correct working.\nClick \"Ok\" to install 'ImageMagick' or \"Cancel\" to quit")) + $in->ask_okcancel(N("Error"),N("package 'ImageMagick' is required for correct working.\nClick \"Ok\" to install 'ImageMagick' or \"Cancel\" to quit")) and $in->do_pkgs->install('ImageMagick') or $::isEmbedded ? kill(USR1, $::CCPID) : &CloseAppWindow ; } @@ -75,14 +75,14 @@ my %scale_size = ('tx'=> ($theme{'res'}{'w'} / $font_size{'w'}), 'ph'=> $theme{'res'}{'h'}, ); -my %first = ('frame'=>new Gtk::Frame(_("first step creation")), - 'widget'=>{ 'label'=> { 'res'=>_("final resolution"), - 'file'=>_("choose image file"), - 'name'=>_("Theme name") +my %first = ('frame'=>new Gtk::Frame(N("first step creation")), + 'widget'=>{ 'label'=> { 'res'=>N("final resolution"), + 'file'=>N("choose image file"), + 'name'=>N("Theme name") }, - 'button'=>{ #'boot_conf'=>_("Make bootsplash step 2"), - #'lilo_conf'=>_("Go to lilosplash configuration"), - 'file'=>_("Browse"), + 'button'=>{ #'boot_conf'=>N("Make bootsplash step 2"), + #'lilo_conf'=>N("Go to lilosplash configuration"), + 'file'=>N("Browse"), }, 'combo'=> {'res'=>['800x600', '1024x768', '1280x1024'], 'name'=>[ $theme{'name'} , &giv_exist_thm] @@ -96,16 +96,16 @@ my %first = ('frame'=>new Gtk::Frame(_("first step creation")), #'kill' ], ); -my %boot_conf_frame = ('frame' => new Gtk::Frame( _("Configure bootsplash picture") ), - 'widget'=> { 'label' => { 'tx'=> _("x coordinate of text box\nin number of character"), - 'ty'=> _("y coordinate of text box\nin number of character"), - 'tw'=> _("text width"), - 'th'=> _("text box height"), - 'px'=> _("the progress bar x coordinate\nof its upper left corner"), - 'py'=> _("the progress bar y coordinate\nof its upper left corner"), - 'pw'=> _("the width of the progress bar"), - 'ph'=> _("the heigth of the progress bar"), - 'pc'=> _("the color of the progress bar") +my %boot_conf_frame = ('frame' => new Gtk::Frame( N("Configure bootsplash picture") ), + 'widget'=> { 'label' => { 'tx'=> N("x coordinate of text box\nin number of character"), + 'ty'=> N("y coordinate of text box\nin number of character"), + 'tw'=> N("text width"), + 'th'=> N("text box height"), + 'px'=> N("the progress bar x coordinate\nof its upper left corner"), + 'py'=> N("the progress bar y coordinate\nof its upper left corner"), + 'pw'=> N("the width of the progress bar"), + 'ph'=> N("the heigth of the progress bar"), + 'pc'=> N("the color of the progress bar") }, #- must set scale values to true to get them created by mk_frame 'scale' => {'tx'=> 1, @@ -117,15 +117,15 @@ my %boot_conf_frame = ('frame' => new Gtk::Frame( _("Configure bootsplash pictur 'pw'=> 1, 'ph'=> 1, }, - 'button' => { #'annul'=> _("Go back"), - 'prev'=>_("Preview"), - 'kill'=>_("Quit"), - 'save'=>_("Save theme"), - 'pc'=> _("Choose color"), + 'button' => { #'annul'=> N("Go back"), + 'prev'=>N("Preview"), + 'kill'=>N("Quit"), + 'save'=>N("Save theme"), + 'pc'=> N("Choose color"), }, - 'check' => { 'logo' => _("Display logo on Console" ), - 'quiet'=> _("Make kernel message quiet by default"), + 'check' => { 'logo' => N("Display logo on Console" ), + 'quiet'=> N("Make kernel message quiet by default"), }, }, 'pos'=> [ 'tx 1' , @@ -159,17 +159,17 @@ $first{'widgets'}{'combo'}{'res'}->entry->signal_connect( changed => sub { ($theme{'res'}{'w'},$theme{'res'}{'h'}) = $theme{'res'}{'res'} =~ /([^x]+)x([^x]+)/; &set_scale_size; $boot_conf_frame{'frame'}->destroy ; - $boot_conf_frame{'frame'} = new Gtk::Frame(_("Configure bootsplash picture") ); + $boot_conf_frame{'frame'} = new Gtk::Frame(N("Configure bootsplash picture") ); &make_boot_frame; $first_vbox->add($boot_conf_frame{'frame'}); - member( $theme{'name'}, &giv_exist_thm) and &thm_in_this_res and &get_this_thm_res_conf or $in->ask_warn(_("Notice"),_("This theme haven't yet any bootsplash in %s !",$theme{'res'}{'res'})); + member( $theme{'name'}, &giv_exist_thm) and &thm_in_this_res and &get_this_thm_res_conf or $in->ask_warn(N("Notice"),N("This theme haven't yet any bootsplash in %s !",$theme{'res'}{'res'})); }); #- go to bootsplash configuration step 2 #$first{'widgets'}{'button'}{'boot_conf'}->signal_connect( clicked => sub{show_act(\%boot_conf_frame) } ); #- image file selection for new theme $first{'widgets'}{'button'}{'file'}->signal_connect( clicked =>sub{ my $file_dialog = new Gtk::FileSelection('choose image'); - $file_dialog->set_filename( ( $first{'widgets'}{'label'}{'file'}->get ne _("choose image file") )?$first{'widgets'}{'label'}{'file'}->get:'~/' ); + $file_dialog->set_filename( ( $first{'widgets'}{'label'}{'file'}->get ne N("choose image file") )?$first{'widgets'}{'label'}{'file'}->get:'~/' ); $file_dialog->cancel_button->signal_connect( clicked => sub{ $file_dialog->destroy} ); $file_dialog->ok_button->signal_connect( clicked => sub{ $first{'widgets'}{'label'}{'file'}->set_text($file_dialog->get_filename) ; $file_dialog->destroy ;}); $file_dialog->show; @@ -209,7 +209,7 @@ sub CloseAppWindow{ #- Desc => write config file for boot theme and copy image in the right location sub write_boot_thm{ - my $w = $in->wait_message('',_("saving Bootsplash theme...")); + my $w = $in->wait_message('',N("saving Bootsplash theme...")); &set_thm_values; my $logo = ($boot_conf_frame{'widgets'}{'check'}{'logo'}->get_active)?'yes':'no'; my $quiet = ($boot_conf_frame{'widgets'}{'check'}{'quiet'}->get_active)?'yes':'no'; @@ -326,7 +326,7 @@ sub which_res_exist{ and last; } - $is_ok == 1 or $in->ask_warn(_("Notice"),_("This theme haven't yet any bootsplash in %s !",$theme{'res'}{'res'})) and return 0; + $is_ok == 1 or $in->ask_warn(N("Notice"),N("This theme haven't yet any bootsplash in %s !",$theme{'res'}{'res'})) and return 0; return 1; } @@ -432,7 +432,7 @@ sub make_boot_frame{ &mk_frame(\$VB,\%boot_conf_frame); #- open a color choose box $boot_conf_frame{'widgets'}{'button'}{'pc'}->signal_connect( clicked => sub { - $color = new Gtk::ColorSelectionDialog(_("ProgressBar color selection")); + $color = new Gtk::ColorSelectionDialog(N("ProgressBar color selection")); $theme{'boot_conf'}{'pc'} =~ m/0x(.{2})(.{2})(.{2})/; my @rgb = map { hex($_)/255 } ($1 ,$2, $3); $color->colorsel->set_color(@rgb);#$theme{'boot_conf'}{'pc'}); @@ -453,7 +453,7 @@ sub make_boot_frame{ #- made a preview $boot_conf_frame{'widgets'}{'button'}{'prev'}->signal_connect( clicked => sub{ if(! -f $first{'widgets'}{'label'}{'file'}->get) { - $in->ask_warn(_("Notice"),_("You must choose an image file first!")); + $in->ask_warn(N("Notice"),N("You must choose an image file first!")); return 0; } #- calculation of the 2 angle of text box and progress bar @@ -462,7 +462,7 @@ sub make_boot_frame{ my $text_br = ($theme{'boot_conf'}{'tw'}*$font_size{'w'}+$theme{'boot_conf'}{'tx'}*$font_size{'w'}).','.($theme{'boot_conf'}{'th'}*$font_size{'h'}+$theme{'boot_conf'}{'ty'}*$font_size{'h'}); my $progress_tl = $theme{'boot_conf'}{'px'}.','.$theme{'boot_conf'}{'py'}; my $progress_br = ($theme{'boot_conf'}{'px'}+$theme{'boot_conf'}{'pw'}).','.($theme{'boot_conf'}{'py'}+$theme{'boot_conf'}{'ph'}); - my $w = $in->wait_message('', _("Generating preview ...")); + my $w = $in->wait_message('', N("Generating preview ...")); $x++; local $txt_tl_x = $theme{'boot_conf'}{'tx'}*$font_size{'w'}; local $txt_tl_y = $theme{'boot_conf'}{'ty'}*$font_size{'h'}; @@ -508,7 +508,7 @@ sub show_prev{ $prev_window or ($prev_window = new Gtk::Window('toplevel') and $prev_window->set_policy( 0, 1, 1 ) ); #-PO First %s is theme name, second %s (in parenthesis) is resolution - $prev_window->set_title(_("%s BootSplash (%s) preview",$theme{'name'},$theme{'res'}{'res'})); + $prev_window->set_title(N("%s BootSplash (%s) preview",$theme{'name'},$theme{'res'}{'res'})); $prev_pic = gtkcreate_png_pixbuf($file); $prev_pic->scale_simple($theme{'res'}{'w'},$theme{'res'}{'h'},0); $prev_pix = $prev_pic->render_pixmap_and_mask($prev_pic); diff --git a/perl-install/standalone/drakxtv b/perl-install/standalone/drakxtv index f3874a657..caeebcc59 100755 --- a/perl-install/standalone/drakxtv +++ b/perl-install/standalone/drakxtv @@ -41,12 +41,12 @@ sub scan4channels { # as we're just a, xawtv wraper # -x "/usr/bin/scantv" or $in->do_pkgs->install('xawtv'); # -x "/usr/bin/scantv" or { -#{ exec {'consolehelper'} $0, ("urpmi", "xawtv") or die _("consolehelper missing"); +#{ exec {'consolehelper'} $0, ("urpmi", "xawtv") or die N("consolehelper missing"); # }; if (! -x "/usr/bin/scantv") { # standalone::explanations("package xawtv isn't installed"); $in->ask_warn("XawTV isn't installed!", - formatAlaTeX(_("XawTV isn't installed! + formatAlaTeX(N("XawTV isn't installed! If you do have a TV card but DrakX has neither detected it (no bttv nor saa7134 @@ -63,14 +63,14 @@ You can install it by typing \"urpmi xawtv\" as root, in a console."))); # my %freqtables = map {$i=$_;$i =~ s/ (.*)/-\1/;_($_) => $i} (...) # this table must be checked on each xawtv release: my %freqtables = - ("us-bcast" => _("USA (broadcast)"), "us-cable" => _("USA (cable)"), "us-cable-hrc" => _("USA (cable-hrc)"), "canada-cable" => _("Canada (cable)"), - "japan-bcast" => _("Japan (broadcast)"), "japan-cable" => _("Japan (cable)"), "china-bcast" => _("China (broadcast)"), - "europe-west" => _("West Europe"), "europe-east" => _("East Europe"), "italy" => _("Italy"), "ireland" => _("Ireland"), "france" => _("France [SECAM]"), - "newzealand" => _("Newzealand"), "australia" => _("Australia"), - "southafrica" => _("South Africa"), - "argentina" => _("Argentina"), - "australia-optus" => _("Australian Optus cable TV"), - -1 =>_("All") + ("us-bcast" => N("USA (broadcast)"), "us-cable" => N("USA (cable)"), "us-cable-hrc" => N("USA (cable-hrc)"), "canada-cable" => N("Canada (cable)"), + "japan-bcast" => N("Japan (broadcast)"), "japan-cable" => N("Japan (cable)"), "china-bcast" => N("China (broadcast)"), + "europe-west" => N("West Europe"), "europe-east" => N("East Europe"), "italy" => N("Italy"), "ireland" => N("Ireland"), "france" => N("France [SECAM]"), + "newzealand" => N("Newzealand"), "australia" => N("Australia"), + "southafrica" => N("South Africa"), + "argentina" => N("Argentina"), + "australia-optus" => N("Australian Optus cable TV"), + -1 =>N("All") ); # Info: HRC means "Harmonically Related Carrier" @@ -104,30 +104,30 @@ You can install it by typing \"urpmi xawtv\" as root, in a console."))); log::l("[drakxtv] guess lang=>$_, norm=>$norm, area=>$ftable_id"); } - if ($in->ask_from("TVdrake", _("Please,\ntype in your tv norm and country"), + if ($in->ask_from("TVdrake", N("Please,\ntype in your tv norm and country"), [ - { label => _("TV norm:"), val => \$norm, list => ["NTSC", "NTSC-JP","PAL", "PAL-M", "PAL-N", "PAL-NC", "SECAM"], type => 'combo' }, - { label => _("Area:"), val => \$ftable_id, list => [keys %freqtables], format => sub { $freqtables{$_[0]} }, sort => 1}, + { label => N("TV norm:"), val => \$norm, list => ["NTSC", "NTSC-JP","PAL", "PAL-M", "PAL-N", "PAL-NC", "SECAM"], type => 'combo' }, + { label => N("Area:"), val => \$ftable_id, list => [keys %freqtables], format => sub { $freqtables{$_[0]} }, sort => 1}, ] )) - { my $wait = $in->wait_message(_('Please wait'), - _("Scanning for TV channels in progress ...")); + { my $wait = $in->wait_message(N("Please wait"), + N("Scanning for TV channels in progress ...")); # we provide scantv a bogus table (france) which will # will be ignored since "All" is selected (because of -a) $ftable_id = "france -a " if ($ftable_id eq -1); # Note that this'll be broken if/when we implement interactive::qt my $use_X = $in->isa('interactive::gtk') && -x "/usr/X11R6/bin/xvt"; my $home = $ENV{HOME}; - my $i = system ( (($use_X) ? - "xvt -T '"._("Scanning for TV channels")." ...' -e ":"") - . "scantv -n $norm -f $ftable_id -o $home/.xawtv".(($use_X)?"":" &>$home/tmp/scantv.log;")); + my $i = system(($use_X ? "xvt -T '" . N("Scanning for TV channels") . " ...' -e " : "") . + "scantv -n $norm -f $ftable_id -o $home/.xawtv". + ($use_X ? "" : " &>$home/tmp/scantv.log;")); if ($i) { - $in->ask_warn(_("There was an error while scanning for TV channels"), - _("XawTV isn't installed!")) } + $in->ask_warn(N("There was an error while scanning for TV channels"), + N("XawTV isn't installed!")) } else { standalone::explanations("created file $home/.xawtv"); - $in->ask_warn(_("Have a nice day!"), - _("Now, you can run xawtv (under X Window!) !\n")) if (! $use_X); + $in->ask_warn(N("Have a nice day!"), + N("Now, you can run xawtv (under X Window!) !\n")) if (! $use_X); }; }; @@ -150,8 +150,8 @@ if (@devices) { $in->exit(0); } } else { - $in->ask_warn(_("No TV Card detected!"), formatAlaTeX( - _("No TV Card has been detected on your machine. Please verify that a Linux-supported Video/TV Card is correctly plugged in. + $in->ask_warn(N("No TV Card detected!"), formatAlaTeX( + N("No TV Card has been detected on your machine. Please verify that a Linux-supported Video/TV Card is correctly plugged in. You can visit our hardware database at: diff --git a/perl-install/standalone/harddrake2 b/perl-install/standalone/harddrake2 index 139b8c43c..850f840d2 100755 --- a/perl-install/standalone/harddrake2 +++ b/perl-install/standalone/harddrake2 @@ -5,7 +5,7 @@ use standalone; use harddrake::ui; if ("@ARGV" =~ /--help|-h/) { - print "Harddrake 2\n", $harddrake::ui::license, _("\nUsage: harddrake [-h|--help] [--test]\n"); + print "Harddrake 2\n", $harddrake::ui::license, N("\nUsage: harddrake [-h|--help] [--test]\n"); exit; } $::isStandalone=1; diff --git a/perl-install/standalone/keyboarddrake b/perl-install/standalone/keyboarddrake index 759b2ad30..fd4559853 100755 --- a/perl-install/standalone/keyboarddrake +++ b/perl-install/standalone/keyboarddrake @@ -13,7 +13,7 @@ use c; local $_ = join '', @ARGV; -/-h/ and die _("usage: keyboarddrake [--expert] [keyboard]\n"); +/-h/ and die N("usage: keyboarddrake [--expert] [keyboard]\n"); $::expert = /-expert/; @@ -28,8 +28,8 @@ if (my ($kb) = grep { !/^-/ } @ARGV) { begin: $::isEmbedded and kill 'USR2', $::CCPID; choose: - $keyboard->{KEYBOARD} = $in->ask_from_listf(_("Keyboard"), - _("Please, choose your keyboard layout."), + $keyboard->{KEYBOARD} = $in->ask_from_listf(N("Keyboard"), + N("Please, choose your keyboard layout."), \&keyboard::KEYBOARD2text, [ keyboard::KEYBOARDs() ], $keyboard->{KEYBOARD}) or goto end; @@ -38,7 +38,7 @@ if (my ($kb) = grep { !/^-/ } @ARGV) { } if ($::expert) { - my $isNotDelete = !$in->ask_yesorno("BackSpace", _("Do you want the BackSpace to return Delete in console?"), 1); + my $isNotDelete = !$in->ask_yesorno("BackSpace", N("Do you want the BackSpace to return Delete in console?"), 1); $keyboard->{BACKSPACE} = $isNotDelete ? "BackSpace" : "Delete"; } diff --git a/perl-install/standalone/livedrake b/perl-install/standalone/livedrake index 9c2af4c03..be4f9894a 100755 --- a/perl-install/standalone/livedrake +++ b/perl-install/standalone/livedrake @@ -21,8 +21,8 @@ my $cd_mntpoint = "/mnt/cdrom"; while (! -x "$cd_mntpoint/Mandrake/mdkinst/usr/bin/perl-install/live_install") { ejectCdrom(); - $in->ask_okcancel(_("Change Cd-Rom"), -_("Please insert the Installation Cd-Rom in your drive and press Ok when done. + $in->ask_okcancel(N("Change Cd-Rom"), +N("Please insert the Installation Cd-Rom in your drive and press Ok when done. If you don't have it, press Cancel to avoid live upgrade."), 1) or $in->exit(0); run_program::run("mount", "/mnt/cdrom"); } @@ -32,7 +32,7 @@ if (-x "$cd_mntpoint/Mandrake/mdkinst/usr/bin/perl-install/live_install") { $::testing or exec "./live_install"; } -$in->ask_warn('', _("Unable to start live upgrade !!!\n")); +$in->ask_warn('', N("Unable to start live upgrade !!!\n")); $in->exit(1); sub ejectCdrom { diff --git a/perl-install/standalone/localedrake b/perl-install/standalone/localedrake index 499fa6350..2d2d9ac83 100644 --- a/perl-install/standalone/localedrake +++ b/perl-install/standalone/localedrake @@ -30,7 +30,7 @@ if (defined $klang) { lang::write('', $lang, $>); if ($>) { if (my $wm = any::running_window_manager()) { - $in->ask_okcancel('', _("The change is done, but to be effective you must logout"), 1) + $in->ask_okcancel('', N("The change is done, but to be effective you must logout"), 1) && any::ask_window_manager_to_logout($wm); } } diff --git a/perl-install/standalone/logdrake b/perl-install/standalone/logdrake index 070426045..2b43eb087 100755 --- a/perl-install/standalone/logdrake +++ b/perl-install/standalone/logdrake @@ -83,7 +83,7 @@ my $h = chomp_(`hostname -s`); my $window = $::isEmbedded ? new Gtk::Plug ($::XID) : new Gtk::Window -toplevel; $window->signal_connect(delete_event => sub { $::isEmbedded ? kill('USR1', $::CCPID) : Gtk->exit(0) }); -$window->set_title(_("logdrake")); +$window->set_title(N("logdrake")); $window->set_policy(1, 1, 1); $window->border_width (5) unless ($::isEmbedded); #$window->set_default_size(540,460); @@ -93,31 +93,31 @@ my (undef,undef,undef,$mday) = localtime(time); $cal->select_day($mday); my @months = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); my $cal_mode = 0; -my $cal_butt = gtksignal_connect(new Gtk::CheckButton(_("Show only for the selected day")), clicked =>sub{ $cal_mode =!$cal_mode; gtkset_sensitive($cal,$cal_mode) }); +my $cal_butt = gtksignal_connect(new Gtk::CheckButton(N("Show only for the selected day")), clicked =>sub{ $cal_mode =!$cal_mode; gtkset_sensitive($cal,$cal_mode) }); ### menus definition # the menus are not shown # but they provides shiny shortcut like C-q my @menu_items = ( - { path => _("/_File"), type => '' }, - { path => _("/File/_New"), accelerator => _("N"), callback => \&print_hello }, - { path => _("/File/_Open"), accelerator => _("O"),callback => \&print_hello }, - { path => _("/File/_Save"), accelerator => _("S"),callback => \&save }, - { path => _("/File/Save _As") }, - { path => _("/File/-"),type => '' }, - { path => _("/File/_Quit"), accelerator => _("Q"), callback => \&quit }, - { path => _("/_Options"), type => '' }, - { path => _("/Options/Test") }, - { path => _("/_Help"),type => '' }, - { path => _("/Help/_About...") } + { path => N("/_File"), type => '' }, + { path => N("/File/_New"), accelerator => N("N"), callback => \&print_hello }, + { path => N("/File/_Open"), accelerator => N("O"),callback => \&print_hello }, + { path => N("/File/_Save"), accelerator => N("S"),callback => \&save }, + { path => N("/File/Save _As") }, + { path => N("/File/-"),type => '' }, + { path => N("/File/_Quit"), accelerator => N("Q"), callback => \&quit }, + { path => N("/_Options"), type => '' }, + { path => N("/Options/Test") }, + { path => N("/_Help"),type => '' }, + { path => N("/Help/_About...") } ); my $menubar = ugtk::create_factory_menu($window, @menu_items); ######### menus end ########## font and colors -my $n = Gtk::Gdk::Font->fontset_load(_("-misc-fixed-medium-r-*-*-*-100-*-*-*-*-*-*,*")); -my $b = Gtk::Gdk::Font->fontset_load(_("-misc-fixed-bold-r-*-*-*-100-*-*-*-*-*-*,*")); +my $n = Gtk::Gdk::Font->fontset_load(N("-misc-fixed-medium-r-*-*-*-100-*-*-*-*-*-*,*")); +my $b = Gtk::Gdk::Font->fontset_load(N("-misc-fixed-bold-r-*-*-*-100-*-*-*-*-*-*,*")); #$black = "\033[30m"; #$red = "\033[31m"; @@ -170,36 +170,36 @@ my $col = $cyan; ######### font and colors end my %files = ( - "auth" => { file => "/var/log/auth.log", desc => _("Authentication") }, - "user" => { file => "/var/log/user.log", desc => _("User") }, - "messages" => { file => "/var/log/messages", desc => _("Messages") }, - "syslog" => { file => "/var/log/syslog", desc => _("Syslog") }, - "explanations" => { file => "/var/log/explanations", desc => _("Mandrake Tools Explanations") } + "auth" => { file => "/var/log/auth.log", desc => N("Authentication") }, + "user" => { file => "/var/log/user.log", desc => N("User") }, + "messages" => { file => "/var/log/messages", desc => N("Messages") }, + "syslog" => { file => "/var/log/syslog", desc => N("Syslog") }, + "explanations" => { file => "/var/log/explanations", desc => N("Mandrake Tools Explanations") } ); -my $yy = gtkset_sensitive(gtksignal_connect(new Gtk::Button(_("search")) , clicked => \&search),0); +my $yy = gtkset_sensitive(gtksignal_connect(new Gtk::Button(N("search")) , clicked => \&search),0); my $log_text = new Gtk::Text(undef, undef); my $refcount_search; #### far from window gtkadd($window, gtkpack_(new Gtk::VBox(0,0), - if_(!$::isExplain && !$::isEmbedded, 0, _("A tool to monitor your logs")), - if_(!$::isFile, 0, gtkadd(new Gtk::Frame(_("Settings")), + if_(!$::isExplain && !$::isEmbedded, 0, N("A tool to monitor your logs")), + if_(!$::isFile, 0, gtkadd(new Gtk::Frame(N("Settings")), gtkpack__(new Gtk::VBox(0,2), gtkpack__(new Gtk::VBox(0,2), - # _("Show lines"), + # N("Show lines"), gtkpack__(new Gtk::HBox(0,0), - " " . _("matching") . " ", $e_yes = new Gtk::Entry(), - " " . _("but not matching") . " ", $e_no = new Gtk::Entry() + " " . N("matching") . " ", $e_yes = new Gtk::Entry(), + " " . N("but not matching") . " ", $e_no = new Gtk::Entry() ) ), gtkpack_(new Gtk::HBox(0,0), - 1, gtkadd(gtkset_border_width(new Gtk::Frame(_("Choose file")),2), + 1, gtkadd(gtkset_border_width(new Gtk::Frame(N("Choose file")),2), gtkpack (gtkset_border_width(new Gtk::VBox(0,0),0), map { ${ "b_". $_ } = gtksignal_connect(new Gtk::CheckButton($files{ $_ }{desc}), clicked => sub{ $refcount_search++; gtkset_sensitive($yy,$refcount_search) }) } keys %files, ) ), - 0, gtkadd(gtkset_border_width(new Gtk::Frame(_("Calendar")),2), + 0, gtkadd(gtkset_border_width(new Gtk::Frame(N("Calendar")),2), gtkpack__(gtkset_border_width(new Gtk::VBox(0,0),5), $cal_butt, $cal ) @@ -209,11 +209,11 @@ gtkadd($window, ) ) ), - !$::isExplain ? (1, gtkadd(new Gtk::Frame(_("Content of the file")), + !$::isExplain ? (1, gtkadd(new Gtk::Frame(N("Content of the file")), createScrolledWindow($log_text) )) : (1, createScrolledWindow($log_text)), if_(!$::isExplain, 0, gtkadd (gtkset_border_width(gtkset_layout(new Gtk::HButtonBox,-end), 5), - if_(!$::isFile, gtksignal_connect(new Gtk::Button (_("Mail alert")), + if_(!$::isFile, gtksignal_connect(new Gtk::Button (N("Mail alert")), clicked => sub { eval { alert_config() }; if ($@ =~ /wizcancel/) { $::Wizard_no_previous = 1; @@ -221,8 +221,8 @@ gtkadd($window, $::WizardWindow->destroy if defined $::WizardWindow; undef $::WizardWindow; } })), - gtksignal_connect(new Gtk::Button (_("Save")), clicked => \&save), - gtksignal_connect(new Gtk::Button ($::isEmbedded ? _("Cancel") : _("Quit")), clicked => \&quit) + gtksignal_connect(new Gtk::Button (N("Save")), clicked => \&save), + gtksignal_connect(new Gtk::Button ($::isEmbedded ? N("Cancel") : N("Quit")), clicked => \&quit) ) ) ) @@ -265,7 +265,7 @@ sub parse_file { my $i = 0; gtkadd(my $win_pb = (gtkset_modal new Gtk::Window(), 1), gtkpack(new Gtk::VBox(5,0), - " " . _("please wait, parsing file: %s", $files{ $_ }{desc}) . " ", + " " . N("please wait, parsing file: %s", $files{ $_ }{desc}) . " ", my $pbar = new Gtk::ProgressBar() ) ); @@ -389,7 +389,7 @@ sub alert_config { $::isWizard = 1; $::Wizard_pix_up = "wiz_logdrake.png"; # FIXME - $::Wizard_title = _("Mail alert"); + $::Wizard_title = N("Mail alert"); my $cron = q(#!/usr/bin/perl # generated by logdrake @@ -406,30 +406,30 @@ my $initdir = "/etc/init.d"; begin: $::Wizard_finished = 0; $::Wizard_no_previous = 1; - $in->ask_okcancel(_("Mail alert configuration"), - _("Welcome to the mail configuration utility.\n\nHere, you'll be able to set up the alert system.\n"), + $in->ask_okcancel(N("Mail alert configuration"), + N("Welcome to the mail configuration utility.\n\nHere, you'll be able to set up the alert system.\n"), 1) or quit(); step_service: undef $::Wizard_no_previous; undef $::Wizard_finished; my $service = { - httpd => _("Apache World Wide Web Server"), - bind => _("Domain Name Resolver"), - ftp => _("Ftp Server"), - postfix => _("Postfix Mail Server"), - samba => _("Samba Server"), - sshd => _("SSH Server"), - webmin => _("Webmin Service"), - xinetd => _("Xinetd Service") + httpd => N("Apache World Wide Web Server"), + bind => N("Domain Name Resolver"), + ftp => N("Ftp Server"), + postfix => N("Postfix Mail Server"), + samba => N("Samba Server"), + sshd => N("SSH Server"), + webmin => N("Webmin Service"), + xinetd => N("Xinetd Service") }; my @installed_d = (); foreach $serv (keys %$service) { -e "$initdir/$serv" && push (@installed_d,$serv); } - $in->ask_from(_("service setting"), - _("You will receive an alert if one of the selected services is no more running"), + $in->ask_from(N("service setting"), + N("You will receive an alert if one of the selected services is no more running"), [ map { { label => "$_", val => \${ $_ }, type => "bool", text => "$service->{ $_ }" } } @installed_d ]) or goto begin; @@ -441,8 +441,8 @@ my $initdir = "/etc/init.d"; step_load: undef $::Wizard_finished; - $in->ask_from(_("load setting"), - _("You will receive an alert if the load is higher than this value"), + $in->ask_from(N("load setting"), + N("You will receive an alert if the load is higher than this value"), [ { label => "load ", val => \$load, type => 'range', min => 1, max => 50 }, ]) or goto step_service; @@ -455,8 +455,8 @@ $r .= "Load is huge: $load\n" if ($load >@ . "$load);\n\n"; step_output: # $::Wizard_no_previous = 1; $::Wizard_finished = 1; - $in->ask_from(_("alert configuration"), - _("Please enter your email address below "), + $in->ask_from(N("alert configuration"), + N("Please enter your email address below "), [ { label => "" }, { label => "Email", val => \$email}, @@ -495,6 +495,6 @@ print F $r; sub save { $::isWizard=0; - $yy = $in->ask_file(_("Save as.."),"/root") or return; + $yy = $in->ask_file(N("Save as.."),"/root") or return; output($yy,$log_text->get_chars(0,$log_text->get_length())); } diff --git a/perl-install/standalone/mousedrake b/perl-install/standalone/mousedrake index 06faca069..bf493e774 100755 --- a/perl-install/standalone/mousedrake +++ b/perl-install/standalone/mousedrake @@ -42,7 +42,7 @@ if (!$mouse || !$::auto) { 0; }); } - my $name = $in->ask_from_treelistf('mousedrake', _("Please, choose the type of your mouse."), '|', + my $name = $in->ask_from_treelistf('mousedrake', N("Please, choose the type of your mouse."), '|', sub { join '|', map { translate($_) } split '\|', $_[0] }, [ mouse::fullnames ], $mouse->{type} . '|' . $mouse->{name}); @@ -55,10 +55,10 @@ if (!$mouse || !$::auto) { modules::load(qw(hid mousedev usbmouse)); } - $mouse->{XEMU3} = 'yes' if $mouse->{nbuttons} < 3 && (!$::noauto || $in->ask_yesorno('', _("Emulate third button?"), 1)); + $mouse->{XEMU3} = 'yes' if $mouse->{nbuttons} < 3 && (!$::noauto || $in->ask_yesorno('', N("Emulate third button?"), 1)); - $mouse->{device} = $in->ask_from_listf(_("Mouse Port"), - _("Please choose on which serial port your mouse is connected to."), + $mouse->{device} = $in->ask_from_listf(N("Mouse Port"), + N("Please choose on which serial port your mouse is connected to."), \&mouse::serial_port2text, [ mouse::serial_ports ], $mouse->{device}, diff --git a/perl-install/standalone/net_monitor b/perl-install/standalone/net_monitor index c39f65198..07be76b68 100755 --- a/perl-install/standalone/net_monitor +++ b/perl-install/standalone/net_monitor @@ -65,7 +65,7 @@ my $in = 'interactive'->vnew('su', 'default'); my $window1 = $::isEmbedded ? new Gtk::Plug ($::XID) : new Gtk::Window -toplevel; $window1->signal_connect ( delete_event => sub { Gtk->exit(0); }); $window1->set_position(1); -$window1->set_title(_("Network Monitoring")); +$window1->set_title(N("Network Monitoring")); $window1->set_policy(1, 1, 1); $window1->set_border_width(5); #$::isEmbedded or $window1->set_usize(580, 320); @@ -99,38 +99,38 @@ MDK::Common::Globals::init( gtkadd($window1, gtkpack_(new Gtk::VBox(0,5), - 0, _("Network Monitoring"), + 0, N("Network Monitoring"), 1, gtkpack_(new Gtk::HBox(0,5), 1, my $notebook = new Gtk::Notebook, 0, gtkpack_(new Gtk::VBox(0,5), - 0, gtkadd(gtkset_shadow_type(new Gtk::Frame(_("Settings")), 'etched_out'), + 0, gtkadd(gtkset_shadow_type(new Gtk::Frame(N("Settings")), 'etched_out'), gtkpack__(gtkset_border_width(new Gtk::VBox(0,5),5), gtkpack__(new Gtk::HBox(0,0), - _("Connection type: "), my $label_cnx_type = new Gtk::Label("")), + N("Connection type: "), my $label_cnx_type = new Gtk::Label("")), gtkpack__(new Gtk::HBox(0,0), - _("Profile "), $combo1) + N("Profile "), $combo1) ) ), - 1, gtkadd(gtkset_shadow_type(new Gtk::Frame(_("Statistics")), 'etched_out'), + 1, gtkadd(gtkset_shadow_type(new Gtk::Frame(N("Statistics")), 'etched_out'), gtkpack__(new Gtk::VBox(0,0), create_packtable({ col_spacings => 1, row_spacings => 1}, [ "", "instantaneous" , "average"], - [ _("Sending Speed:"), my $label_st = new Gtk::Label(""), my $label_sta=new Gtk::Label("na")], - [ _("Receiving Speed:"),my $label_sr= new Gtk::Label(""), my $label_sra=new Gtk::Label("na")], + [ N("Sending Speed:"), my $label_st = new Gtk::Label(""), my $label_sta=new Gtk::Label("na")], + [ N("Receiving Speed:"),my $label_sr= new Gtk::Label(""), my $label_sra=new Gtk::Label("na")], ), - gtkpack__(new Gtk::HBox(0,0), " "._("Connection Time: "), my $label_ct = new Gtk::Label("")), + gtkpack__(new Gtk::HBox(0,0), " " . N("Connection Time: "), my $label_ct = new Gtk::Label("")), ) ), 0, gtkpack_(new Gtk::HBox(0,5), 1, gtksignal_connect(my $button_connect = gtkset_sensitive(new Gtk::Button(), 0), clicked => \&connection), 0, new Gtk::VSeparator, 0, gtkpack(new Gtk::VBox(0,5), - gtksignal_connect(new Gtk::Button(_("Logs")), clicked => sub { + gtksignal_connect(new Gtk::Button(N("Logs")), clicked => sub { -e "/usr/sbin/logdrake" ? system('/usr/sbin/logdrake --file=/var/log/messages &') : system('/usr/X11R6/bin/xvt -e "tail -f /var/log/messages " &') }), - gtksignal_connect(my $button_close = new Gtk::Button(_("Close")), clicked => sub { Gtk->exit(0) }), + gtksignal_connect(my $button_close = new Gtk::Button(N("Close")), clicked => sub { Gtk->exit(0) }), ) ) ) @@ -157,9 +157,9 @@ my ($pix_d_map, $pix_d_mask) = gtkcreate_png("net_d.png"); my ($pix_u_map, $pix_u_mask) = gtkcreate_png("net_u.png"); $button_connect->add(gtkpack__(new Gtk::VBox(0,3), my $pix_c = new Gtk::Pixmap($pix_u_map, $pix_u_mask), - my $label_c = new Gtk::Label(_("Wait please")) + my $label_c = new Gtk::Label(N("Wait please")) )); -$statusbar->push(1, _("Wait please, testing your connection...")); +$statusbar->push(1, N("Wait please, testing your connection...")); $window1->show_all(); #$window1->set_policy (1, 1, 1); @@ -190,7 +190,7 @@ sub connection { $button_connect->set_sensitive(0); $button_close->set_sensitive(0); $statusbar->pop(1); - $statusbar->push(1, $wasconnected ? _("Disconnecting from Internet ") : _("Connecting to Internet ")); + $statusbar->push(1, $wasconnected ? N("Disconnecting from Internet ") : N("Connecting to Internet ")); if($wasconnected == 1) { $c_time = time(); $ct_tag = Gtk->timeout_add(1000, sub { @@ -203,7 +203,7 @@ sub connection { my $tag = Gtk->timeout_add(1000, sub { $statusbar->pop(1); - $statusbar->push(1, ($wasconnected == 1 ? _("Disconnecting from Internet ") : _("Connecting to Internet ")) + $statusbar->push(1, ($wasconnected == 1 ? N("Disconnecting from Internet ") : N("Connecting to Internet ")) . join('', map { "." } (1..$nb_point))); $nb_point++; if ($nb_point < 4) { return 1; } @@ -234,11 +234,11 @@ sub connection { $ret = 0; $statusbar->pop(1); $statusbar->push(1, $wasconnected ? ( $isconnected ? - _("Disconnection from Internet failed.") : - _("Disconnection from Internet complete.")) : + N("Disconnection from Internet failed.") : + N("Disconnection from Internet complete.")) : ( $isconnected ? - _("Connection complete.") : - _("Connection failed.\nVerify your configuration in the Mandrake Control Center.")) + N("Connection complete.") : + N("Connection failed.\nVerify your configuration in the Mandrake Control Center.")) ); my $delay = 1000; # keep the message displayed longer if there is a problem. @@ -342,14 +342,14 @@ sub change_color { my $doit; $window->signal_connect ( delete_event => sub { Gtk->main_quit() }); $window->set_position(1); - $window->set_title(_("Color configuration")); + $window->set_title(N("Color configuration")); $window->set_border_width(5); gtkadd(gtkset_modal($window,1), gtkpack_(new Gtk::VBox(0,5), 1, my $colorsel = new Gtk::ColorSelection, 0, gtkadd(gtkset_layout(new Gtk::HButtonBox, -end), - gtksignal_connect(new Gtk::Button(_("OK")), clicked => sub { $doit=1; Gtk->main_quit() }), - gtksignal_connect(new Gtk::Button(_("Cancel")), clicked => sub { Gtk->main_quit() }), + gtksignal_connect(new Gtk::Button(N("OK")), clicked => sub { $doit=1; Gtk->main_quit() }), + gtksignal_connect(new Gtk::Button(N("Cancel")), clicked => sub { Gtk->main_quit() }), ) ) ); @@ -395,31 +395,31 @@ sub update { $gct->set_foreground($colort); $_[0]->draw(undef); }), - _("sent: "), $monitor->{$intf}{labelt} = new Gtk::Label("0")), + N("sent: "), $monitor->{$intf}{labelt} = new Gtk::Label("0")), gtkpack__(gtkset_border_width(new Gtk::HBox(0,5), 5), gtksignal_connect(my $button_r = gtkset_relief(new Gtk::Button(), 'none'), clicked => sub { $colorr = change_color($colorr); $gcr->set_foreground($colorr); $_[0]->draw(undef); }), - _("received: "), $monitor->{$intf}{labelr} = new Gtk::Label("0")), + N("received: "), $monitor->{$intf}{labelr} = new Gtk::Label("0")), gtkpack__(gtkset_border_width(new Gtk::HBox(0,5), 5), gtksignal_connect(my $button_a = gtkset_relief(new Gtk::Button(), 'none'), clicked => sub { $colora = change_color($colora); $gca->set_foreground($colora); $_[0]->draw(undef); }), - _("average")) + N("average")) ), 0, gtkpack__(gtkset_border_width(new Gtk::VBox(0,0), 5), - gtkadd(gtkset_shadow_type(new Gtk::Frame(_("Local measure")), 'etched_out'), + gtkadd(gtkset_shadow_type(new Gtk::Frame(N("Local measure")), 'etched_out'), gtkpack__(gtkset_border_width(new Gtk::VBox(0,0), 5), gtkpack__(new Gtk::HBox(0,0), - _('sent: '), + N("sent: "), my $measure_t = new Gtk::Label("0") ), gtkpack__(new Gtk::HBox(0,0), - _('received: '), + N("received: "), my $measure_r = new Gtk::Label("0") ) ) @@ -444,8 +444,8 @@ sub update { my $received = $x >= 0 ? $monitor->{$intf}{stack_r}[$x] : 0; my $transmitted = $x >= 0 ? $monitor->{$intf}{stack_t}[$x] : 0; my $type; - $y * $scale / 150 < $transmitted and $type = _('transmitted'); - (150 - $y) * $scale / 150 < $received and $type = _('received'); + $y * $scale / 150 < $transmitted and $type = N("transmitted"); + (150 - $y) * $scale / 150 < $received and $type = N("received"); $measure_r->set(formatXiB($received)); $measure_t->set(formatXiB($transmitted)); }); @@ -467,13 +467,13 @@ sub update { if(($isconnected == 1) && !in_ifconfig($netcnx->{NET_INTERFACE})) { $isconnected=0; $statusbar->pop(1); - $statusbar->push(1, _("Warning, another internet connexion has been detected, maybe using your network")); + $statusbar->push(1, N("Warning, another internet connexion has been detected, maybe using your network")); } else { #- translators : $netcnx->{type} is the type of network connection (modem, adsl...) $statusbar->pop(1); - $statusbar->push(1, $isconnected == 1 ? _("Connected") : _("Not connected")); + $statusbar->push(1, $isconnected == 1 ? N("Connected") : N("Not connected")); } - $label_c->set($isconnected == 1 ? _("Disconnect %s", $netcnx->{type}) : _("Connect %s", $netcnx->{type})); + $label_c->set($isconnected == 1 ? N("Disconnect %s", $netcnx->{type}) : N("Connect %s", $netcnx->{type})); $isconnected == 1 ? $pix_c->set($pix_c_map, $pix_c_mask) : $pix_c->set($pix_d_map, $pix_d_mask); $button_connect->set_sensitive(1); } diff --git a/perl-install/standalone/printerdrake b/perl-install/standalone/printerdrake index f31ca3e68..8be3a7907 100755 --- a/perl-install/standalone/printerdrake +++ b/perl-install/standalone/printerdrake @@ -54,7 +54,7 @@ exit 0 if !printerdrake::first_time_dialog($printer, $in, 1); # Check whether Foomatic is installed and install it if necessary printerdrake::install_foomatic($in); -my $w = $in->wait_message(_("Printerdrake"), _("Reading printer data ...")); +my $w = $in->wait_message(N("Printerdrake"), N("Reading printer data ...")); # Get what was installed before eval { $printer = printer::getinfo('') }; # Choose the spooler by command line options diff --git a/perl-install/standalone/scannerdrake b/perl-install/standalone/scannerdrake index 4ce8c5add..a1f94125e 100755 --- a/perl-install/standalone/scannerdrake +++ b/perl-install/standalone/scannerdrake @@ -38,7 +38,7 @@ for (@ARGV) { $in = 'interactive'->vnew('su', 'default'); $in->do_pkgs->install('sane-backends', 'xsane', if_($in->do_pkgs->is_installed('gimp'),'xsane-gimp')); if ($::Manual) { manual(); quit() } -my $wait = $in->wait_message(_("Test ports"), _("Detecting devices ...")); +my $wait = $in->wait_message(N("Test ports"), N("Detecting devices ...")); @f = scanner::detect(); $wait=undef; (@f) ? auto() : manual(); @@ -50,22 +50,22 @@ sub auto { my $name = $_->{val}{DESCRIPTION}; $name =~ s/\s$//; #some HP entry have a trailing space, i will correct usbtable asap if ($scanner::scannerDB->{$name}{flags}{unsupported}) { - $in->ask_warn('scannerdrake', _("The %s is not supported by this version of Mandrake Linux.", $name)); + $in->ask_warn('scannerdrake', N("The %s is not supported by this version of Mandrake Linux.", $name)); return; } - $in->ask_yesorno('scannerdrake',_("%s found on %s, configure it?",$name,$_->{port}),1) or manual(); + $in->ask_yesorno('scannerdrake',N("%s found on %s, configure it?",$name,$_->{port}),1) or manual(); tryConfScanner($name, $_->{port}); } else { - $in->ask_yesorno('scannerdrake',_("%s is not in the scanner database, configure it manually?", $_->{val}{DESCRIPTION}),1) and manual(); + $in->ask_yesorno('scannerdrake',N("%s is not in the scanner database, configure it manually?", $_->{val}{DESCRIPTION}),1) and manual(); } } } sub manual { - my $s = $in->ask_from_treelist('scannerdrake', _("Select a scanner"), '|', [' None', keys %$scanner::scannerDB], '') or return; + my $s = $in->ask_from_treelist('scannerdrake', N("Select a scanner"), '|', [' None', keys %$scanner::scannerDB], '') or return; return if $s eq ' None'; if ($scanner::scannerDB->{$s}{flags}{unsupported}) { - $in->ask_warn('scannerdrake', _("The %s is not supported by this version of Mandrake Linux.", $s)); + $in->ask_warn('scannerdrake', N("The %s is not supported by this version of Mandrake Linux.", $s)); return; } tryConfScanner($s); @@ -78,7 +78,7 @@ sub dynamic { my $name = $_->{val}{DESCRIPTION}; $name =~ s/\s$//; #some HP entry have a trailing space, i will correct usbtable asap if ($scanner::scannerDB->{$name}{flags}{unsupported}) { - $in->ask_warn('scannerdrake', _("The %s is not supported by this version of Mandrake Linux.", $name)); + $in->ask_warn('scannerdrake', N("The %s is not supported by this version of Mandrake Linux.", $name)); return; } scanner::confScanner($name, $_->{port}) unless ($scanner::scannerDB->{$model}{flags}{unsupported}); @@ -90,34 +90,34 @@ sub tryConfScanner { # take care if interactive output is needed (unsupported, parallel..) my ($model, $port) = @_; if ($scanner::scannerDB->{$model}{flags}{unsupported}) { - $in->ask_warn('scannerdrake', _("This %s scanner is unsupported", $model)); + $in->ask_warn('scannerdrake', N("This %s scanner is unsupported", $model)); return; } # if ($scanner::scannerDB->{$model}{driver} =~ /Parport/) { - # $in->ask_warn('scannerdrake', _("This %s scanner uses parallel port, which is unsupported for the moment", $model)); + # $in->ask_warn('scannerdrake', N("This %s scanner uses parallel port, which is unsupported for the moment", $model)); # return; # } if ($scanner::scannerDB->{$model}{driver} =~ /SCSI/) { - #$in->ask_warn('scannerdrake', _("This %s scanner uses parallel port, which is unsupported for the moment", $model)); + #$in->ask_warn('scannerdrake', N("This %s scanner uses parallel port, which is unsupported for the moment", $model)); #return; } if ($scanner::scannerDB->{$model}{ask} =~ /DEVICE/) { $port = '/dev/sg0'; $in->ask_from('scannerdrake', - _("Scannerdrake was not able to detect your %s scanner.\nPlease select the device where your scanner is plugged", $model), + N("Scannerdrake was not able to detect your %s scanner.\nPlease select the device where your scanner is plugged", $model), [ - { label => _("choose device"), val => \$port, list => ['/dev/sg0', '/dev/sg1', '/dev/sg2', '/dev/sg3', '/dev/sg4' ], not_edit => 0, sort => 1 }, + { label => N("choose device"), val => \$port, list => ['/dev/sg0', '/dev/sg1', '/dev/sg2', '/dev/sg3', '/dev/sg4' ], not_edit => 0, sort => 1 }, ], ) or manual(); } if ($scanner::scannerDB->{$model}{server} =~ /printerdrake/) { - $in->ask_warn('scannerdrake', _("This %s scanner must be configured by printerdrake.\nYou can launch printerdrake from the Mandrake Control Center in Hardware section.", $model)); + $in->ask_warn('scannerdrake', N("This %s scanner must be configured by printerdrake.\nYou can launch printerdrake from the Mandrake Control Center in Hardware section.", $model)); return; } scanner::confScanner($model,$port); - $in->ask_warn(_("Congratulations!"), - _("Your %s scanner has been configured.\nYou may now scan documents using ``XSane'' from Multimedia/Graphics in the applications menu.", $model)); + $in->ask_warn(N("Congratulations!"), + N("Your %s scanner has been configured.\nYou may now scan documents using ``XSane'' from Multimedia/Graphics in the applications menu.", $model)); } diff --git a/perl-install/standalone/service_harddrake b/perl-install/standalone/service_harddrake index 964a59592..84097e9a9 100755 --- a/perl-install/standalone/service_harddrake +++ b/perl-install/standalone/service_harddrake @@ -4,7 +4,7 @@ use lib qw(/usr/lib/libDrakX); use strict; use standalone; #- warning, standalone must be loaded very first, for 'explanations' -use MDK::Common; +use common; use interactive; use harddrake::data; use Storable qw(store retrieve); @@ -41,11 +41,11 @@ foreach (@harddrake::data::tree) { my $msg; my @was_removed = difference2([ keys %$oldconfig ], [ keys %ID ]); if (@was_removed) { - $msg .= _("Some devices in the \"%s\" hardware class were removed:\n", $item) . + $msg .= N("Some devices in the \"%s\" hardware class were removed:\n", $item) . "- ". harddrake::data::custom_id($oldconfig->{$_}, $item) ." was removed\n" foreach @was_removed . "\n"; } my @added = difference2([ keys %ID ], [ keys %$oldconfig ]); - $msg .= _("Some devices were added:\n", $item) if @added; + $msg .= N("Some devices were added:\n", $item) if @added; $msg .= "- ". harddrake::data::custom_id($ID{$_}, $item) ." was added\n" foreach (@added); @added || @was_removed or next; next unless (-x $configurator); @@ -61,7 +61,7 @@ foreach (@harddrake::data::tree) { if ($no) { require interactive; undef $wait; - $wait = $in->wait_message(_('Please wait'), _('Hardware probing in progress')); + $wait = $in->wait_message(N("Please wait"), N("Hardware probing in progress")); } elsif ($res) { if (my $pid = fork) { wait; -- cgit v1.2.1