summaryrefslogtreecommitdiffstats
path: root/perl-install/install_interactive.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-11-06 13:20:21 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-11-06 13:20:21 +0000
commit9091151d546e5d749b47e2efce3ff651784fcc8c (patch)
tree2be2bec5e60f21ffe431eeef74095896ae5efe7f /perl-install/install_interactive.pm
parent68a1a2a6f2b9fdb1fd0c833cd9b3d8dcb9d8fd5c (diff)
downloaddrakx-backup-do-not-use-9091151d546e5d749b47e2efce3ff651784fcc8c.tar
drakx-backup-do-not-use-9091151d546e5d749b47e2efce3ff651784fcc8c.tar.gz
drakx-backup-do-not-use-9091151d546e5d749b47e2efce3ff651784fcc8c.tar.bz2
drakx-backup-do-not-use-9091151d546e5d749b47e2efce3ff651784fcc8c.tar.xz
drakx-backup-do-not-use-9091151d546e5d749b47e2efce3ff651784fcc8c.zip
replace "_" with "N" and "__" with "N_"
rationale: - currently, we use _("xxx") as a shorthand for gettext("xxx"). It also used to call xgettext with --keyword=_ - alas, function &_ is global and not by package (notice esp. that _ is not exported in common.pm) - this lead to big ugly pb with packages defining their own &_, overriding common.pm's &_ - a fix is to set @::textdomains to add a new domain (the default being "libDrakX") but relying on the global "_" is still dangerous!
Diffstat (limited to 'perl-install/install_interactive.pm')
-rw-r--r--perl-install/install_interactive.pm72
1 files changed, 36 insertions, 36 deletions
diff --git a/perl-install/install_interactive.pm b/perl-install/install_interactive.pm
index 5c1766351..f1efc2730 100644
--- a/perl-install/install_interactive.pm
+++ b/perl-install/install_interactive.pm
@@ -20,7 +20,7 @@ sub tellAboutProprietaryModules {
my ($o) = @_;
my @l = grep { $_ } map { $_->{driver} =~ /^Bad:(.*)/ && $1 } detect_devices::probeall();
$o->ask_warn('', formatAlaTeX(
-_("Some hardware on your computer needs ``proprietary'' drivers to work.
+N("Some hardware on your computer needs ``proprietary'' drivers to work.
You can find some information about them at: %s", join(", ", @l)))) if @l;
}
@@ -55,16 +55,16 @@ sub partition_with_diskdrake {
unless (fsedit::get_root_(\@fstab)) {
$ok = 0;
- $o->ask_okcancel('', _("You must have a root partition.
+ $o->ask_okcancel('', N("You must have a root partition.
For this, create a partition (or click on an existing one).
Then choose action ``Mount point'' and set it to `/'"), 1) or return;
}
if (!grep { isSwap($_) } @fstab) {
- $o->ask_warn('', _("You must have a swap partition")), $ok = 0 if !$::expert;
- $ok &&= $o->ask_okcancel('', _("You don't have a swap partition.\n\nContinue anyway?"));
+ $o->ask_warn('', N("You must have a swap partition")), $ok = 0 if !$::expert;
+ $ok &&= $o->ask_okcancel('', N("You don't have a swap partition.\n\nContinue anyway?"));
}
if (arch() =~ /ia64/ && !fsedit::has_mntpoint("/boot/efi", $all_hds)) {
- $o->ask_warn('', _("You must have a FAT partition mounted in /boot/efi"));
+ $o->ask_warn('', N("You must have a FAT partition mounted in /boot/efi"));
$ok = '';
}
} until $ok;
@@ -89,9 +89,9 @@ sub partitionWizardSolutions {
my @hds_rw = grep { !$_->{readonly} } @$hds;
my @hds_can_add = grep { $_->can_raw_add } @hds_rw;
if (fsedit::free_space(@hds_can_add) > $min_linux) {
- $solutions{free_space} = [ 20, _("Use free space"), sub { fsedit::auto_allocate($all_hds); 1 } ]
+ $solutions{free_space} = [ 20, N("Use free space"), sub { fsedit::auto_allocate($all_hds); 1 } ]
} else {
- push @wizlog, _("Not enough free space to allocate new partitions") . ": " .
+ push @wizlog, N("Not enough free space to allocate new partitions") . ": " .
(@hds_can_add ?
fsedit::free_space(@hds_can_add) . " < $min_linux" :
"no harddrive on which partitions can be added");
@@ -99,23 +99,23 @@ sub partitionWizardSolutions {
if (my @truefs = grep { isTrueFS($_) } @$fstab) {
#- value twice the ext2 partitions
- $solutions{existing_part} = [ 6 + @truefs + @$fstab, _("Use existing partitions"), sub { $o->ask_mntpoint_s($fstab) } ]
+ $solutions{existing_part} = [ 6 + @truefs + @$fstab, N("Use existing partitions"), sub { $o->ask_mntpoint_s($fstab) } ]
} else {
- push @wizlog, _("There is no existing partition to use");
+ push @wizlog, N("There is no existing partition to use");
}
my @fats = grep { isFat($_) } @$fstab;
fs::df($_) foreach @fats;
if (my @ok_forloopback = sort { $b->{free} <=> $a->{free} } grep { $_->{free} > $min_linux + $min_swap + $min_freewin } @fats) {
$solutions{loopback} =
- [ -10 - @fats, _("Use the Windows partition for loopback"),
+ [ -10 - @fats, N("Use the Windows partition for loopback"),
sub {
my ($s_root, $s_swap);
- my $part = $o->ask_from_listf('', _("Which partition do you want to use for Linux4Win?"), \&partition_table::description, \@ok_forloopback) or return;
+ my $part = $o->ask_from_listf('', N("Which partition do you want to use for Linux4Win?"), \&partition_table::description, \@ok_forloopback) or return;
$max_swap = $min_swap + 1 if $part->{free} - $max_swap < $min_linux;
- $o->ask_from('', _("Choose the sizes"), [
- { label => _("Root partition size in MB: "), val => \$s_root, min => $min_linux >> 11, max => min($part->{free} - $max_swap, $max_linux) >> 11, type => 'range' },
- { label => _("Swap partition size in MB: "), val => \$s_swap, min => $min_swap >> 11, max => $max_swap >> 11, type => 'range' },
+ $o->ask_from('', N("Choose the sizes"), [
+ { label => N("Root partition size in MB: "), val => \$s_root, min => $min_linux >> 11, max => min($part->{free} - $max_swap, $max_linux) >> 11, type => 'range' },
+ { label => N("Swap partition size in MB: "), val => \$s_swap, min => $min_swap >> 11, max => $max_swap >> 11, type => 'range' },
]) or return;
push @{$part->{loopback}},
{ type =>0x483, loopback_file => '/lnx4win/linuxsys.img', mntpoint => '/', size => $s_root << 11, loopback_device => $part, notFormatted => 1 },
@@ -125,19 +125,19 @@ sub partitionWizardSolutions {
} ];
my @ok_for_resize_fat = grep { !fsedit::part2hd($_, $all_hds)->{readonly} } @ok_forloopback;
$solutions{resize_fat} =
- [ 6 - @fats, _("Use the free space on the Windows partition"),
+ [ 6 - @fats, N("Use the free space on the Windows partition"),
sub {
$o->set_help('resizeFATChoose');
- my $part = $o->ask_from_listf('', _("Which partition do you want to resize?"), \&partition_table::description, \@ok_for_resize_fat) or return;
+ my $part = $o->ask_from_listf('', N("Which partition do you want to resize?"), \&partition_table::description, \@ok_for_resize_fat) or return;
$o->set_help('resizeFATWait');
- my $w = $o->wait_message(_("Resizing"), _("Resizing Windows partition"));
+ my $w = $o->wait_message(N("Resizing"), N("Resizing Windows partition"));
require resize_fat::main;
my $resize_fat = eval { resize_fat::main->new($part->{device}, devices::make($part->{device})) };
- $@ and die _("The FAT resizer is unable to handle your partition,
+ $@ and die N("The FAT resizer is unable to handle your partition,
the following error occured: %s", $@);
my $min_win = $resize_fat->min_size;
- $part->{size} > $min_linux + $min_swap + $min_freewin + $min_win or die _("Your Windows partition is too fragmented. Please reboot your computer under Windows, run the ``defrag'' utility, then restart the Mandrake Linux installation.");
- $o->ask_okcancel('', _("WARNING!
+ $part->{size} > $min_linux + $min_swap + $min_freewin + $min_win or die N("Your Windows partition is too fragmented. Please reboot your computer under Windows, run the ``defrag'' utility, then restart the Mandrake Linux installation.");
+ $o->ask_okcancel('', N("WARNING!
DrakX will now resize your Windows partition. Be careful:
this operation is dangerous. If you have not already done
@@ -147,15 +147,15 @@ installation. You should also backup your data.
When sure, press Ok.")) or return;
my $mb_size = $part->{size} >> 11;
- $o->ask_from('', _("Which size do you want to keep for Windows on"), [
- { label => _("partition %s", partition_table::description($part)), val => \$mb_size, min => $min_win >> 11, max => ($part->{size} - $min_linux - $min_swap) >> 11, type => 'range' },
+ $o->ask_from('', N("Which size do you want to keep for Windows on"), [
+ { label => N("partition %s", partition_table::description($part)), val => \$mb_size, min => $min_win >> 11, max => ($part->{size} - $min_linux - $min_swap) >> 11, type => 'range' },
]) or return;
my $size = from_Mb($mb_size, $min_win, $part->{size});
local *log::l = sub { $w->set(join(' ', @_)) };
eval { $resize_fat->resize($size) };
- $@ and die _("FAT resizing failed: %s", $@);
+ $@ and die N("FAT resizing failed: %s", $@);
$part->{size} = $size;
$part->{isFormatted} = 1;
@@ -170,19 +170,19 @@ When sure, press Ok.")) or return;
1;
} ] if @ok_for_resize_fat;
} else {
- push @wizlog, _("There is no FAT partition to resize or to use as loopback (or not enough space left)") .
+ push @wizlog, N("There is no FAT partition to resize or to use as loopback (or not enough space left)") .
@fats ? "\nFAT partitions:" . join('', map { "\n $_->{device} $_->{free} (" . ($min_linux + $min_swap + $min_freewin) . ")" } @fats) : '';
}
if (@$fstab && @hds_rw) {
$solutions{wipe_drive} =
- [ 10, fsedit::is_one_big_fat($hds) ? _("Remove Windows(TM)") : _("Erase entire disk"),
+ [ 10, fsedit::is_one_big_fat($hds) ? N("Remove Windows(TM)") : N("Erase entire disk"),
sub {
$o->set_help('takeOverHdChoose');
- my $hd = $o->ask_from_listf('', _("You have more than one hard drive, which one do you install linux on?"),
+ my $hd = $o->ask_from_listf('', N("You have more than one hard drive, which one do you install linux on?"),
\&partition_table::description, \@hds_rw) or return;
$o->set_help('takeOverHdConfirm');
- $o->ask_okcancel('', _("ALL existing partitions and their data will be lost on drive %s", partition_table::description($hd))) or return;
+ $o->ask_okcancel('', N("ALL existing partitions and their data will be lost on drive %s", partition_table::description($hd))) or return;
partition_table::raw::zero_MBR($hd);
fsedit::auto_allocate($all_hds);
1;
@@ -190,14 +190,14 @@ When sure, press Ok.")) or return;
}
if (@hds_rw) {
- $solutions{diskdrake} = [ 0, _("Custom disk partitioning"), sub { partition_with_diskdrake($o, $all_hds, 'nowizard') } ];
+ $solutions{diskdrake} = [ 0, N("Custom disk partitioning"), sub { partition_with_diskdrake($o, $all_hds, 'nowizard') } ];
}
$solutions{fdisk} =
- [ -10, _("Use fdisk"), sub {
+ [ -10, N("Use fdisk"), sub {
$o->enter_console;
foreach (@$hds) {
- print "\n" x 10, _("You can now partition %s.
+ print "\n" x 10, N("You can now partition %s.
When you are done, don't forget to save using `w'", partition_table::description($_));
print "\n\n";
my $pid = 0;
@@ -226,7 +226,7 @@ sub partitionWizard {
if ($solutions{loopback}) {
%solutions = (loopback => $solutions{loopback});
} else {
- $o->ask_warn('', _("You don't have enough free space on your Windows partition")) if grep { isFat($_) } fsedit::get_all_fstab($o->{all_hds});
+ $o->ask_warn('', N("You don't have enough free space on your Windows partition")) if grep { isFat($_) } fsedit::get_all_fstab($o->{all_hds});
}
}
@@ -242,14 +242,14 @@ sub partitionWizard {
@solutions = @sol if @sol > 1;
log::l("solutions: ", int @solutions);
- @solutions or $o->ask_warn('', _("I can't find any room for installing")), die 'already displayed';
+ @solutions or $o->ask_warn('', N("I can't find any room for installing")), die 'already displayed';
log::l('HERE: ', join(',', map { $_->[1] } @solutions));
- if (my $sol = $o->ask_from_listf('', _("The DrakX Partitioning wizard found the following solutions:"), sub { $_[0][1] }, \@solutions)) {
+ if (my $sol = $o->ask_from_listf('', N("The DrakX Partitioning wizard found the following solutions:"), sub { $_[0][1] }, \@solutions)) {
log::l("partitionWizard calling solution $sol->[1]");
my $ok = eval { $sol->[2]->() };
die if $@ =~ /setstep/;
- $@ and $o->ask_warn('', _("Partitioning failed: %s", $@));
+ $@ and $o->ask_warn('', N("Partitioning failed: %s", $@));
$ok or goto &partitionWizard;
} else {
$nodiskdrake ? return : die "setstep setupSCSI\n";
@@ -259,12 +259,12 @@ sub partitionWizard {
sub upNetwork {
my ($o, $pppAvoided) = @_;
- my $w = $o->wait_message('', _("Bringing up the network"));
+ my $w = $o->wait_message('', N("Bringing up the network"));
install_steps::upNetwork($o, $pppAvoided);
}
sub downNetwork {
my ($o, $pppOnly) = @_;
- my $w = $o->wait_message('', _("Bringing down the network"));
+ my $w = $o->wait_message('', N("Bringing down the network"));
install_steps::downNetwork($o, $pppOnly);
}