diff options
Diffstat (limited to 'Master/tlpkg/installer/install-menu-perltk.pl')
-rw-r--r-- | Master/tlpkg/installer/install-menu-perltk.pl | 47 |
1 files changed, 26 insertions, 21 deletions
diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl index 67dbed6a8e2..169b1388126 100644 --- a/Master/tlpkg/installer/install-menu-perltk.pl +++ b/Master/tlpkg/installer/install-menu-perltk.pl @@ -20,7 +20,6 @@ our @collections_lang; our @collections_lang_doc; our $texlive_release; our $trynet; -our $max_bins_on_CD; our $MENU_INSTALL = 0; our $MENU_ABORT = 1; @@ -35,25 +34,29 @@ require Tk::PNG; use utf8; no utf8; -if ($^O =~ /^MSWin(32|64)$/i) { - # trying to deduce automatically the country code - my $foo = TeXLive::TLWinGoo::reg_country(); - if ($foo) { - $::lang = $foo; - } else { - tllog($::LOG_DEBUG, "Didn't get any usuful code from reg_country: $foo...\n"); - } +if (defined($::opt_lang)) { + $::lang = $::opt_lang; } else { - # we load POSIX and locale stuff - require POSIX; - import POSIX qw/locale_h/; - # now we try to deduce $::lang - my $loc = setlocale(&POSIX::LC_CTYPE); - my ($lang,$area,$codeset); - if ($loc =~ m/^([^_.]*)(_([^.]*))?(\.([^@]*))?(@.*)?$/) { - $lang = defined($1)?$1:""; + if ($^O =~ /^MSWin(32|64)$/i) { + # trying to deduce automatically the country code + my $foo = TeXLive::TLWinGoo::reg_country(); + if ($foo) { + $::lang = $foo; + } else { + tllog($::LOG_DEBUG, "Didn't get any usuful code from reg_country: $foo...\n"); + } + } else { + # we load POSIX and locale stuff + require POSIX; + import POSIX qw/locale_h/; + # now we try to deduce $::lang + my $loc = setlocale(&POSIX::LC_CTYPE); + my ($lang,$area,$codeset); + if ($loc =~ m/^([^_.]*)(_([^.]*))?(\.([^@]*))?(@.*)?$/) { + $lang = defined($1)?$1:""; + } + $::lang = $lang if ($lang); } - $::lang = $lang if ($lang); } my $mw; @@ -138,6 +141,8 @@ my %text = ( title => 'TeX Live 2008 Installation', diskreq => 'disk space required', yes => 'Yes', no => 'No', + notwritable => '(default not writable - please change!)', + changetexdir => '(please change TEXDIR first!)' ); @@ -635,7 +640,7 @@ sub menu_set_pathes_text { if (TeXLive::TLUtils::texdir_check($vars{'TEXDIR'})) { menu_set_text($texdirtext, "$vars{'TEXDIR'}"); } else { - menu_set_text($texdirtext, "(default not writable - please change!)"); + menu_set_text($texdirtext, $text{'notwritable'}); } menu_set_text($texmflocaltext, "$vars{'TEXMFLOCAL'}"); if (-w $vars{'TEXMFSYSVAR'}) { @@ -644,10 +649,10 @@ sub menu_set_pathes_text { if (TeXLive::TLUtils::texdir_check($vars{'TEXDIR'})) { menu_set_text($texmfsysvartext, "$vars{'TEXMFSYSVAR'}"); } else { - menu_set_text($texmfsysvartext, "(please change TEXDIR first!)"); + menu_set_text($texmfsysvartext, $text{'changetexdir'}); } } else { - menu_set_text($texmfsysvartext, "(default not writable - please change!)"); + menu_set_text($texmfsysvartext, $text{'notwritable'}); } menu_set_text($texmfhometext, "$vars{'TEXMFHOME'}"); } |