summaryrefslogtreecommitdiffstats
path: root/perl-install/share/po/lt.po
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/share/po/lt.po')
-rw-r--r--perl-install/share/po/lt.po4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/share/po/lt.po b/perl-install/share/po/lt.po
index f9676fd44..e706cf46a 100644
--- a/perl-install/share/po/lt.po
+++ b/perl-install/share/po/lt.po
@@ -1432,7 +1432,7 @@ msgstr "Ar tu nori išbandyti nustatymus?"
#: diskdrake/interactive.pm:301 fs/partitioning_wizard.pm:283
#, c-format
-msgid "You need to reboot for the partition table modifications to take place"
+msgid "You need to reboot for the partition table modifications to take effect"
msgstr ""
"Tau reikia perkrauti kompiuterį, kad skirsnių lentelės pakeitimai būtų "
"naudojami"
@@ -1900,7 +1900,7 @@ msgstr "Kokio tipo skirsnių skaidymas?"
#: diskdrake/interactive.pm:1235
#, c-format
-msgid "You'll need to reboot before the modification can take place"
+msgid "You'll need to reboot before the modification can take effect"
msgstr "Tau reikia perkrauti, kad pakeitimai būtų veiksmingi"
#: diskdrake/interactive.pm:1244
' href='#n124'>124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297
package install_interactive; # $Id$

use diagnostics;
use strict;

use common;
use partition_table qw(:types);
use partition_table::raw;
use detect_devices;
use install_steps;
use install_any;
use devices;
use fsedit;
use log;
use fs;


sub tellAboutProprietaryModules {
    my ($o) = @_;
    my @l = grep { $_ } map { $_->{driver} =~ /^Bad:(.*)/ && $1 } detect_devices::probeall();
    $o->ask_warn('', formatAlaTeX(
N("Some hardware on your computer needs ``proprietary'' drivers to work.
You can find some information about them at: %s", join(", ", @l)))) if @l;
}

#- unit of $mb is mega bytes, min and max are in sectors, this
#- function is used to convert back to sectors count the size of
#- a partition ($mb) given from the interface (on Resize or Create).
#- modified to take into account a true bounding with min and max.
sub from_Mb {
    my ($mb, $min, $max) = @_;
    $mb <= $min >> 11 and return $min;
    $mb >= $max >> 11 and return $max;
    $mb * 2048;
}

sub partition_with_diskdrake {
    my ($o, $all_hds, $nowizard) = @_;
    my $ok; 

    do {
	$ok = 1;
	my $do_force_reload = sub {
	    $o->{all_hds} = fsedit::empty_all_hds();
	    install_any::getHds($o, $o);
	    $all_hds = $o->{all_hds};
	    $o->{all_hds};
	};
	require diskdrake::interactive;
	{
	    local $::expert = $::expert;
	    diskdrake::interactive::main($o, $all_hds, $nowizard, $do_force_reload, $o->interactive_help_sub_display_id('partition_with_diskdrake'));
	}
	if (delete $o->{wizard}) {
	    partitionWizard($o, 'nodiskdrake') or redo;
	    return 1;
	}
	my @fstab = fsedit::get_all_fstab($all_hds);
	
	unless (fsedit::get_root_(\@fstab)) {
	    $ok = 0;
	    $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 (!any { isSwap($_) } @fstab) {
	    $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('', N("You must have a FAT partition mounted in /boot/efi"));
	    $ok = '';
	}
    } until $ok;
    1;
}

sub partitionWizardSolutions {
    my ($o, $all_hds) = @_;
    my $hds = $all_hds->{hds};
    my $fstab = [ fsedit::get_all_fstab($all_hds) ];
    my @wizlog;
    my (%solutions);

    my $min_linux = 400 << 11;
    my $max_linux = 2000 << 11;
    my $min_swap = 50 << 11;
    my $max_swap = 300 << 11;
    my $min_freewin = 100 << 11;

    # each solution is a [ score, text, function ], where the function retunrs true if succeeded

    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, N("Use free space"), sub { fsedit::auto_allocate($all_hds); 1 } ]
    } else { 
	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");
    }

    if (my @truefs = grep { isTrueLocalFS($_) } @$fstab) {
	#- value twice the ext2 partitions
	$solutions{existing_part} = [ 6 + @truefs + @$fstab, N("Use existing partitions"), sub { $o->ask_mntpoint_s($fstab) } ]
    } else {
	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, N("Use the Windows partition for loopback"), 
	    sub { 
		my ($s_root, $s_swap);
		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('', 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}}, 
		  { pt_type =>0x483, loopback_file => '/lnx4win/linuxsys.img', mntpoint => '/',    size => $s_root << 11, loopback_device => $part, notFormatted => 1 },
		  { pt_type => 0x82, loopback_file => '/lnx4win/swapfile',     mntpoint => 'swap', size => $s_swap << 11, loopback_device => $part, notFormatted => 1 };
		fsedit::recompute_loopbacks($all_hds);
		1;
	    } ];
    } else {
	push @wizlog, N("There is no FAT partition 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 (my @ok_for_resize_fat = grep { isFat_or_NTFS($_) && !fsedit::part2hd($_, $all_hds)->{readonly} } @$fstab) {
	$solutions{resize_fat} = 
	  [ 6 - @ok_for_resize_fat, N("Use the free space on the Windows partition"),
	    sub {
		my $part = $o->ask_from_listf_raw({ messages => N("Which partition do you want to resize?"),
						    interactive_help_id => 'resizeFATChoose',
						  }, \&partition_table::description, \@ok_for_resize_fat) or return;
		my $hd = fsedit::part2hd($part, $all_hds);
		my $resize_fat = eval {
		    my $pkg = isFat($part) ? do { 
			require resize_fat::main;
			'resize_fat::main';
		    } : do {
			require diskdrake::resize_ntfs;
			'diskdrake::resize_ntfs';
		    };
		    $pkg->new($part->{device}, devices::make($part->{device}));
		};
		$@ and die N("The FAT resizer is unable to handle your partition, 
the following error occured: %s", formatError($@));
		my $min_win = do {
		    my $_w = $o->wait_message(N("Resizing"), N("Computing the size of the Windows partition"));
		    $resize_fat->min_size;
		};
		#- make sure that even after normalizing the size to cylinder boundaries, the minimun will be saved,
		#- this save at least a cylinder (less than 8Mb).
		$min_win += partition_table::raw::cylinder_size($hd);