diff options
author | Norbert Preining <preining@logic.at> | 2008-01-16 14:56:51 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-01-16 14:56:51 +0000 |
commit | 798920e39d7727e81d1cc48e31a0b0a31e93ac5b (patch) | |
tree | 546929276ae09bc1da9ffbfc1d5cfb1e8b6b91fd /Master/tlpkg/TeXLive | |
parent | be7e71d4cb30a4b9b88bdfcf88941d9ea4ae7504 (diff) |
language support
git-svn-id: svn://tug.org/texlive/trunk@6260 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r-- | Master/tlpkg/TeXLive/install-menu-perltk-de.pl | 55 | ||||
-rw-r--r-- | Master/tlpkg/TeXLive/install-menu-perltk.pl | 239 |
2 files changed, 209 insertions, 85 deletions
diff --git a/Master/tlpkg/TeXLive/install-menu-perltk-de.pl b/Master/tlpkg/TeXLive/install-menu-perltk-de.pl new file mode 100644 index 00000000000..00033b83a33 --- /dev/null +++ b/Master/tlpkg/TeXLive/install-menu-perltk-de.pl @@ -0,0 +1,55 @@ + +our %translatedtext = ( title => 'TeX Live 2008 Installation', + custom => 'Weitere Einstellungen', + basicinfo => 'Grundlegende Informationen', + dirsetup => "Setup der Ordner", + options => 'Optionen', + sysint => 'System Integration', + change => 'Ändern', + toggle => 'Ändern', + install => 'TeX Live installieren', + finished => 'Installation beendet', + finbut => 'Ende', + quit => 'Abbruch', + ok => 'Ok', + cancel => 'Abbruch', + status => 'Status Ausgabe', + changevar => 'Ändern der Werte von Variablen', + enterpath => 'Bitte geben Sie den Pfad ein für ', + selectscheme => 'Auswahl des Schema', + selectstdcol => 'Auswahl der zu installierenden Sammlungen', + selectall => 'Alle anwählen', + selectnone => 'Alle abwählen', + selectlang => 'Sprachauswahl', + selectdoc => 'Dokumentationssprachauswahl', + createsym => 'Erstellen von symbolischen Links in Standardordnern', + binto => 'Programme nach: ', + manto => 'Hilfeseiten nach: ', + infoto => 'Infoseiten nach: ', + onnet => 'Am Netz', + ondisk => 'Auf dem Medium', + selectsys => 'Auswahl von arch-os', + clicknetbin => 'Klicken für Netzwerk Programme', + outof => 'von', + collof => 'Sammlungen von', + diskreq => 'benötigter Festplattenplatz', + yes => 'Ja', + no => 'Nein', + ); + + +our %translatedlabels = ( binsys => 'Binary System(s)', + scheme => 'Ausgewähltes Schema', + stdcoll => 'Standardsammlungen', + langcoll => 'Sprachsammlungen', + texdir => 'TEXDIR (Hauptordner für TeX)', + localdir => 'TEXMFLOCAL (lokale Styles etc)', + sysvardir => 'TEXMFSYSVAR (lokalen Konfiguration)', + optletter => 'Standardmäßig letter anstelle von A4', + optfmt => 'Alle Formatdateien erstellen', + optdoc => 'Installation der font/macro Dokumentation', + optsrc => 'Installation der font/macro Quellen', + symlink => 'Installation von symbolischen Link in Systemordnern', + ); + + diff --git a/Master/tlpkg/TeXLive/install-menu-perltk.pl b/Master/tlpkg/TeXLive/install-menu-perltk.pl index 51c9b9a0add..c1fd63db8d3 100644 --- a/Master/tlpkg/TeXLive/install-menu-perltk.pl +++ b/Master/tlpkg/TeXLive/install-menu-perltk.pl @@ -9,7 +9,6 @@ # # TODO: # - does the DoOneEvent *NEVER* hang??? -# - change windows have the useless title "Toplevel" # - translation into other languages # - dynamic computation of column sizes? how could that be done? @@ -46,10 +45,6 @@ my $optletterstate; my $optfmtstate; my $optsrcstate; my $optdocstate; -my $letteryesno = "No"; -my $fmtyesno = "No"; -my $srcyesno = "Yes"; -my $docyesno = "Yes"; push @::start_install_hook, sub { update_statusbar("Starting Installation"); Tk::DoOneEvent(Tk::Event::DONT_WAIT); Tk::DoOneEvent(Tk::Event::DONT_WAIT); }; @@ -83,6 +78,80 @@ sub update_statusbar { $::statusbar->configure(-text => "$p"); } +my %text = ( title => 'TeX Live 2008 Installation', + basicinfo => 'Basic Information', + custom => 'Further Customization', + dirsetup => "Directories' setup", + options => 'Options', + sysint => 'System Integration', + change => 'Change', + toggle => 'Toggle', + install => 'Install TeX Live', + finished => 'Installation finished', + finbut => 'Finish', + quit => 'Quit', + ok => 'Ok', + cancel => 'Cancel', + status => 'Status output', + changevar => 'Change variable value', + enterpath => 'Enter path for ', + selectscheme => 'Select Scheme', + selectstdcol => 'Select the collections to be installed', + selectall => 'Select All', + selectnone => 'Deselect All', + selectlang => 'Language Selection', + selectdoc => 'Doc/Language Selection', + createsym => 'create symlinks in standard directories', + binto => 'binaries to: ', + manto => 'manpages to: ', + infoto => 'info to: ', + onnet => 'On Net', + ondisk => 'On Disk', + selectsys => 'Select arch-os', + clicknetbin => 'Click for net bins', + outof => 'out of', + collof => 'collections out of', + diskreq => 'disk space required', + yes => 'Yes', + no => 'No', + ); + + +my %labels = ( binsys => 'Binary System(s)', + scheme => 'Selected Scheme', + stdcoll => 'Standard Collections', + langcoll => 'Language Collections', + texdir => 'TEXDIR (main TeX directory)', + localdir => 'TEXMFLOCAL (local styles etc)', + sysvardir => 'TEXMFSYSVAR (local config)', + optletter => 'Use letter instead of A4 by default', + optfmt => 'Create all format files', + optdoc => 'Install font/macro doc tree', + optsrc => 'Install font/macro source tree', + symlink => 'Install symlinks to system directories', + ); + +if ($::lang ne "en") { + eval { require("TeXLive/install-menu-perltk-$::lang.pl"); }; + if ($@) { + # couldn't find the file, continue with english + warn "Couldn't find language file TeXLive/install-menu-perltk-$::lang.pl: $!\nContinuing in English!\n"; + } else { + # merge the translated strings into the text string + foreach my $k (keys %translatedtext) { + $text{$k} = $translatedtext{$k}; + } + foreach my $k (keys %translatedlabels) { + $labels{$k} = $translatedlabels{$k}; + } + } +} + +my $letteryesno = $text{'no'}; +my $fmtyesno = $text{'no'}; +my $srcyesno = $text{'yes'}; +my $docyesno = $text{'yes'}; + sub run_menu { my $a = 35; my $b = 35; my $c = 6; if (win32()) { @@ -100,106 +169,106 @@ sub run_menu { my $fr = $mw->Frame; $fl->pack(-side => 'left'); $fr->pack(-side => 'right'); - $fr->Label(-text => 'TeX Live 2008 Installation')->pack; - $fr->Label(-text => '------- Basic Information -------')->pack; + $fr->Label(-text => $text{'title'})->pack; + $fr->Label(-text => "------- $text{'basicinfo'} -------")->pack; # binary system line my $fbin = $fr->Frame; $fbin->pack; - $fbin->Label(-text => 'Binary System(s)', -width => $a, -anchor => 'w')->pack(-side => 'left'); + $fbin->Label(-text => $labels{'binsys'}, -width => $a, -anchor => 'w')->pack(-side => 'left'); $bintextbutton = $fbin->Label(-width => $b, -anchor => 'w'); $bintextbutton->pack(-side => 'left'); - $fbin->Button(-width => $c, -text => 'Change', -command => sub { menu_select_binsystems(); })->pack(-side => 'left'); + $fbin->Button(-width => $c, -text => $text{'change'}, -command => sub { menu_select_binsystems(); })->pack(-side => 'left'); # scheme line my $fscheme = $fr->Frame; $fscheme->pack; - $fscheme->Label(-text => 'Selected Scheme', -width => $a, -anchor => 'w')->pack(-side => 'left'); + $fscheme->Label(-text => $labels{'scheme'}, -width => $a, -anchor => 'w')->pack(-side => 'left'); $schemebutton = $fscheme->Label(-width => $b, -anchor => 'w'); $schemebutton->pack(-side => 'left'); - $fscheme->Button(-width => $c, -text => 'Change', -command => sub { menu_select_scheme(); })->pack(-side => 'left'); + $fscheme->Button(-width => $c, -text => $text{'change'}, -command => sub { menu_select_scheme(); })->pack(-side => 'left'); # further customization - $fr->Label(-text => '------- Further Customiztion -------')->pack; + $fr->Label(-text => "------- $text{'custom'} -------")->pack; # standard collection line my $fcoll = $fr->Frame; $fcoll->pack; - $fcoll->Label(-text => 'Standard Collections', -width => $a+$b, -anchor => 'w')->pack(-side => 'left'); - $fcoll->Button(-width => $c, -text => 'Change', -command => sub { menu_select_standard_collections(); })->pack(-side => 'left'); + $fcoll->Label(-text => $labels{'stdcoll'}, -width => $a+$b, -anchor => 'w')->pack(-side => 'left'); + $fcoll->Button(-width => $c, -text => $text{'change'}, -command => sub { menu_select_standard_collections(); })->pack(-side => 'left'); # lang collection line my $flang = $fr->Frame; $flang->pack; - $flang->Label(-text => 'Language Collections', -width => $a+$b, -anchor => 'w')->pack(-side => 'left'); - $flang->Button(-width => $c, -text => 'Change', -command => sub { menu_select_lang_collections(); })->pack(-side => 'left'); + $flang->Label(-text => $labels{'langcoll'}, -width => $a+$b, -anchor => 'w')->pack(-side => 'left'); + $flang->Button(-width => $c, -text => $text{'change'}, -command => sub { menu_select_lang_collections(); })->pack(-side => 'left'); $collectionstext = $fr->Label(); $collectionstext->pack; # further customization - $fr->Label(-text => '------- Directories setup -------')->pack; + $fr->Label(-text => "------- $text{'dirsetup'} -------")->pack; # texdir line my $ftexdir = $fr->Frame; $ftexdir->pack; - $ftexdir->Label(-text => "TEXDIR (main TeX directory)", -width => $a, -anchor => 'w')->pack(-side => 'left'); + $ftexdir->Label(-text => $labels{'texdir'}, -width => $a, -anchor => 'w')->pack(-side => 'left'); $texdirtext = $ftexdir->Label(-width => $b, -anchor => 'w')->pack(-side => 'left'); - $ftexdir->Button(-width => $c, -text => 'Change', -command => sub { menu_edit_vars_value("TEXDIR"); })->pack(-side => 'left'); + $ftexdir->Button(-width => $c, -text => $text{'change'}, -command => sub { menu_edit_vars_value("TEXDIR"); })->pack(-side => 'left'); # texmflocal line my $flocal = $fr->Frame; $flocal->pack; - $flocal->Label(-text => "TEXMFLOCAL (local styles etc)", -width => $a, -anchor => 'w')->pack(-side => 'left'); + $flocal->Label(-text => $labels{'localdir'}, -width => $a, -anchor => 'w')->pack(-side => 'left'); $texmflocaltext = $flocal->Label(-width => $b, -anchor => 'w')->pack(-side => 'left'); - $flocal->Button(-width => $c, -text => 'Change', -command => sub { menu_edit_vars_value("TEXMFLOCAL"); })->pack(-side => 'left'); + $flocal->Button(-width => $c, -text => $text{'change'}, -command => sub { menu_edit_vars_value("TEXMFLOCAL"); })->pack(-side => 'left'); # texmflocal line my $fsys = $fr->Frame; $fsys->pack; - $fsys->Label(-text => "TEXMFSYSVAR (local config)", -width => $a, -anchor => 'w')->pack(-side => 'left'); + $fsys->Label(-text => $labels{'sysvardir'}, -width => $a, -anchor => 'w')->pack(-side => 'left'); $texmfsysvartext = $fsys->Label(-width => $b, -anchor => 'w')->pack(-side => 'left'); - $fsys->Button(-width => $c, -text => 'Change', -command => sub { menu_edit_vars_value("TEXMFSYSVAR"); })->pack(-side => 'left'); + $fsys->Button(-width => $c, -text => $text{'change'}, -command => sub { menu_edit_vars_value("TEXMFSYSVAR"); })->pack(-side => 'left'); # Options - $fr->Label(-text => '------- Options -------')->pack; + $fr->Label(-text => "------- $text{'options'} -------")->pack; # optpaper my $fletter = $fr->Frame; $fletter->pack; - $fletter->Label(-text => "Use letter instead of A4 by default", -width => $a, -anchor => 'w')->pack(-side => 'left'); + $fletter->Label(-text => $labels{'optletter'}, -width => $a, -anchor => 'w')->pack(-side => 'left'); $fletter->Label(-width => $b, -anchor => 'w', -textvariable => \$letteryesno)->pack(-side => 'left'); - $fletter->Button(-width => $c, -text => 'Toggle', -command => sub { toggle_and_set_opt_variable(\$vars{'option_letter'}, \$letteryesno); })->pack(-side => 'left'); + $fletter->Button(-width => $c, -text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_letter'}, \$letteryesno); })->pack(-side => 'left'); my $ffmt = $fr->Frame; $ffmt->pack; - $ffmt->Label(-text => "Create all format files", -width => $a, -anchor => 'w')->pack(-side => 'left'); + $ffmt->Label(-text => $labels{'optfmt'}, -width => $a, -anchor => 'w')->pack(-side => 'left'); $ffmt->Label(-width => $b, -anchor => 'w', -textvariable => \$fmtyesno)->pack(-side => 'left'); - $ffmt->Button(-width => $c, -text => 'Toggle', -command => sub { toggle_and_set_opt_variable(\$vars{'option_fmt'}, \$fmtyesno); })->pack(-side => 'left'); + $ffmt->Button(-width => $c, -text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_fmt'}, \$fmtyesno); })->pack(-side => 'left'); my $fdoc = $fr->Frame; $fdoc->pack; - $fdoc->Label(-text => "Install font/macro doc tree", -width => $a, -anchor => 'w')->pack(-side => 'left'); + $fdoc->Label(-text => $labels{'optdoc'}, -width => $a, -anchor => 'w')->pack(-side => 'left'); $fdoc->Label(-width => $b, -anchor => 'w', -textvariable => \$docyesno)->pack(-side => 'left'); - $fdoc->Button(-width => $c, -text => 'Toggle', -command => sub { toggle_and_set_opt_variable(\$vars{'option_doc'}, \$docyesno); })->pack(-side => 'left'); + $fdoc->Button(-width => $c, -text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_doc'}, \$docyesno); })->pack(-side => 'left'); my $fsrc = $fr->Frame; $fsrc->pack; - $fsrc->Label(-text => "Install font/macro source tree", -width => $a, -anchor => 'w')->pack(-side => 'left'); + $fsrc->Label(-text => $labels{'optsrc'}, -width => $a, -anchor => 'w')->pack(-side => 'left'); $fsrc->Label(-width => $b, -anchor => 'w', -textvariable => \$srcyesno)->pack(-side => 'left'); - $fsrc->Button(-width => $c, -text => 'Toggle', -command => sub { toggle_and_set_opt_variable(\$vars{'option_src'}, \$srcyesno); })->pack(-side => 'left'); + $fsrc->Button(-width => $c, -text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_src'}, \$srcyesno); })->pack(-side => 'left'); if (unix()) { # Symlinks - $fr->Label(-text => '------- System Integration -------')->pack; + $fr->Label(-text => "------- $text{'sysint'} -------")->pack; my $fsym = $fr->Frame; $fsym->pack; - $fsym->Label(-text => "Install symlinks to system directories", -width => $a, -anchor => 'w')->pack(-side => 'left'); + $fsym->Label(-text => $labels{'symlink'}, -width => $a, -anchor => 'w')->pack(-side => 'left'); $symlinktext = $fsym->Label(-width => $b, -anchor => 'w')->pack(-side => 'left'); - $fsym->Button(-width => $c, -text => 'Change', -command => sub { menu_select_symlink(); })->pack(-side => 'left'); + $fsym->Button(-width => $c, -text => $text{'change'}, -command => sub { menu_select_symlink(); })->pack(-side => 'left') } my $f3 = $fr->Frame; $f3->Button( - -text => 'Install TeX Live', + -text => $text{'install'}, -command => sub { do_installation(); $return = $MENU_ALREADYDONE; - $fr->Dialog(-text => 'Installation finished', -buttons => [qw/Finish/])->Show; + $fr->Dialog(-text => $text{'finished'}, -buttons => [ $text{'finbut'} ])->Show; $mw->destroy }, )->pack(-side => 'left'); $f3->Button( - -text => 'Quit', + -text => $text{'quit'}, -command => sub { exit 0; $return = $MENU_ABORT; $mw->destroy } )->pack(-side => 'right'); $f3->pack(-expand => 'x'); - $::statusbar = $fr->Label(-text => 'Status output'); + $::statusbar = $fr->Label(-text => $text{'status'}); $::statusbar->pack; menu_update_texts(); Tk::MainLoop(); @@ -208,21 +277,21 @@ sub run_menu { sub menu_edit_vars_value { my $key = shift; - my $sw = $mw->Toplevel; + my $sw = $mw->Toplevel(-title => $text{'changevar'}); my $val = $vars{$key}; - $sw->Label(-text => "Enter path for $key:")->pack; + $sw->Label(-text => $text{'enterpath'} . "$key:")->pack; my $entry = $sw->Entry(-textvariable => $val, -width => 60); $entry->pack; my $f = $sw->Frame; - $f->Button(-text => "Ok", + $f->Button(-text => $text{'ok'}, -command => sub { $val = $entry->get; callback_edit_directories($key,$val) ; $sw->destroy })->pack(-side => 'left'); - $f->Button(-text => "Cancel", + $f->Button(-text => $text{'cancel'}, -command => sub { $sw->destroy })->pack(-side => 'right'); $f->pack(-expand => 'x'); } sub menu_select_scheme { - my $sw = $mw->Toplevel; + my $sw = $mw->Toplevel(-title => $labels{'scheme'}); my @schemes; foreach my $pkg ($tlpdb->list_packages) { my $tlpobj = $tlpdb->{'tlps'}{$pkg}; @@ -233,7 +302,7 @@ sub menu_select_scheme { } @schemes=sort @schemes; my $selected = $vars{'selected_scheme'}; - $sw->Label(-text => 'Select Scheme')->pack; + $sw->Label(-text => $text{'selectscheme'})->pack; my $f2 = $sw->Frame; my $f2l = $f2->Frame; my $f2r = $f2->Frame; @@ -254,22 +323,22 @@ sub menu_select_scheme { $f2r->pack(-side => 'right'); $f2->pack; my $f3 = $sw->Frame; - $f3->Button(-text => "Return", + $f3->Button(-text => $text{'ok'}, -command => sub { callback_select_scheme($selected) ; $sw->destroy })->pack(-side => 'left'); - $f3->Button(-text => "Cancel", + $f3->Button(-text => $text{'cancel'}, -command => sub { $sw->destroy })->pack(-side => 'right'); $f3->pack(-expand => 'x'); } sub menu_select_standard_collections { - my $sw = $mw->Toplevel; + my $sw = $mw->Toplevel(-title => $label{'stdcoll'}); my $fb = $sw->Frame; my $fc = $sw->Frame; my $fd = $sw->Frame; my $f1 = $fb->Frame; my $f2 = $fb->Frame; my %lvars = %vars; - $sw->Label(-text => 'Select the collections to be installed')->pack; + $sw->Label(-text => $text{'selectstdcol'})->pack; my $halfcol = $#collections_std / 2; my $i = 0; foreach my $coll (sort @collections_std) { @@ -285,19 +354,19 @@ sub menu_select_standard_collections { $f2->pack(-side => 'right'); $fb->pack; $fd->pack(-expand => 'x'); - $fd->Button(-text => "Select all", + $fd->Button(-text => $text{'selectall'}, -command => sub { select_collections(\%lvars, @collections_std) })->pack(-side => 'left'); - $fd->Button(-text => "Deselect all", + $fd->Button(-text => $text{'selectnone'}, -command => sub { deselect_collections(\%lvars, @collections_std) })->pack(-side => 'right'); $fc->pack(-expand => 'x'); - $fc->Button(-text => "Return", + $fc->Button(-text => $text{'ok'}, -command => sub { %vars = %lvars; callback_select_collection() ; $sw->destroy })->pack(-side => 'left'); - $fc->Button(-text => "Cancel", + $fc->Button(-text => $text{'cancel'}, -command => sub { $sw->destroy })->pack(-side => 'right'); } sub menu_select_lang_collections { - my $sw = $mw->Toplevel; + my $sw = $mw->Toplevel(-title => $label{'langcoll'}); my $f1 = $sw->Frame; $f1->pack; my $f1lang = $f1->Frame; @@ -306,7 +375,7 @@ sub menu_select_lang_collections { $f1doc->pack(-side => 'right'); my $f1langT = $f1lang->Frame; $f1langT->pack; my $f1langL = $f1lang->Frame; $f1langL->pack; - $f1langT->Label(-text => 'Language Selection')->pack; + $f1langT->Label(-text => $text{'selectlang'})->pack; my $f1langLa = $f1langL->Frame; $f1langLa->pack(-side => 'left'); my $f1langLb = $f1langL->Frame; $f1langLb->pack(-side => 'right'); my $langh = $#collections_lang / 2; @@ -323,14 +392,14 @@ sub menu_select_lang_collections { } my $f1langB = $f1lang->Frame; $f1langB->pack(-expand => 'x'); - $f1langB->Button(-text => "Select all", + $f1langB->Button(-text => $text{'selectall'}, -command => sub { select_collections(\%lvars, @collections_lang) })->pack(-side => 'left'); - $f1langB->Button(-text => "Deselect all", + $f1langB->Button(-text => $text{'selectnone'}, -command => sub { deselect_collections(\%lvars, @collections_lang) })->pack(-side => 'right'); my $f1docT = $f1doc->Frame; $f1docT->pack; my $f1docL = $f1doc->Frame; $f1docL->pack; - $f1docT->Label(-text => 'Doc/Language Selection')->pack; + $f1docT->Label(-text => $text{'selectdoc'})->pack; my $f1docLa = $f1docL->Frame; $f1docLa->pack(-side => 'left'); my $f1docLb = $f1docL->Frame; $f1docLb->pack(-side => 'right'); my $doch = $#collections_lang_doc / 2; @@ -346,14 +415,14 @@ sub menu_select_lang_collections { } my $f1docB = $f1doc->Frame; $f1docB->pack(-expand => 'x'); - $f1docB->Button(-text => "Select all", + $f1docB->Button(-text => $text{'selectall'}, -command => sub { select_collections(\%lvars, @collections_lang_doc) })->pack(-side => 'left'); - $f1docB->Button(-text => "Deselect all", + $f1docB->Button(-text => $text{'selectnone'}, -command => sub { deselect_collections(\%lvars, @collections_lang_doc) })->pack(-side => 'right'); my $f2 = $sw->Frame; $f2->pack(-expand => 'x'); - $f2->Button(-text => "Return", + $f2->Button(-text => $text{'ok'}, -command => sub { %vars = %lvars; callback_select_collection() ; $sw->destroy })->pack(-side => 'left'); - $f2->Button(-text => "Cancel", + $f2->Button(-text => $text{'cancel'}, -command => sub { $sw->destroy })->pack(-side => 'right'); } @@ -375,29 +444,29 @@ sub menu_select_symlink { menu_update_texts(); } set_unset_buttons(); - my $sw = $mw->Toplevel; + my $sw = $mw->Toplevel(-title => $label{'symlink'}); $sw->Checkbutton(-variable => \$osym, - -text => 'create symlinks in standard directories', + -text => $text{'createsym'}, -command => sub { set_unset_buttons(); } )->pack; my $fbin = $sw->Frame; - $fbin->Label(-text => 'binaries to: ')->pack(-side => 'left'); + $fbin->Label(-text => $text{'binto'})->pack(-side => 'left'); my $binb = $fbin->Entry(-textvariable => \$lbin, -width => 30); $binb->pack(-side => 'right'); $fbin->pack(-expand => 'x'); my $fman = $sw->Frame; - $fman->Label(-text => 'manpages to: ')->pack(-side => 'left'); + $fman->Label(-text => $text{'manto'})->pack(-side => 'left'); my $manb = $fman->Entry(-textvariable => \$lman, -width => 30); $manb->pack(-side => 'right'); $fman->pack(-expand => 'x'); my $finfo = $sw->Frame; - $finfo->Label(-text => 'info to: ')->pack(-side => 'left'); + $finfo->Label(-text => $text{'infoto'})->pack(-side => 'left'); my $infob = $finfo->Entry(-textvariable => \$linfo, -width => 30); $infob->pack(-side => 'right'); $finfo->pack(-expand => 'x'); my $f2 = $sw->Frame; $f2->pack(-expand => 'x'); - $f2->Button(-text => "Return", + $f2->Button(-text => $text{'ok'}, -command => sub { return_callback(); $sw->destroy })->pack(-side => 'left'); - $f2->Button(-text => "Cancel", + $f2->Button(-text => $text{'cancel'}, -command => sub { $sw->destroy })->pack(-side => 'right'); } @@ -427,7 +496,7 @@ sub menu_select_binsystems { sub do_net_frame { $f2r = $f2->Frame; if ($#netarchs >= 0) { - $f2r->Label(-text => 'On Net')->pack; + $f2r->Label(-text => $text{'onnet'})->pack; foreach my $sys (sort @netarchs) { $f2r->Checkbutton(-variable => \$vars{"netbin_$sys"}, -text => "$sys")->pack(-anchor => 'w'); } @@ -435,7 +504,7 @@ sub menu_select_binsystems { } $f2->pack; } - my $sw = $mw->Toplevel; + my $sw = $mw->Toplevel(-title => $label{'binsys'}); my @diskarchs = (); foreach my $key (keys %vars) { if ($key=~/diskbin_(.*)/) { @@ -447,10 +516,10 @@ sub menu_select_binsystems { $from_net{"$1"}=1; } } - $sw->Label(-text => 'Select arch/os')->pack; + $sw->Label(-text => $text{'selectsys'})->pack; $f2 = $sw->Frame; my $f2l = $f2->Frame; - $f2l->Label(-text => 'On Disk')->pack; + $f2l->Label(-text => $text{'ondisk'})->pack; foreach my $sys (sort @diskarchs) { $f2l->Checkbutton(-variable => \$vars{"diskbin_$sys"}, -text => platform_desc($sys))->pack(-anchor => 'w'); } @@ -458,12 +527,12 @@ sub menu_select_binsystems { do_net_frame(); my $f4 = $sw->Frame; $f4->pack; - $f4->Button(-text => 'Click for net bins', + $f4->Button(-text => $text{'clicknetbin'}, -command => sub { update_net_archs(); })->pack; my $f3 = $sw->Frame; - $f3->Button(-text => "Return", + $f3->Button(-text => $text{'ok'}, -command => sub { callback_select_systems() ; $sw->destroy })->pack(-side => 'left'); - $f3->Button(-text => "Cancel", + $f3->Button(-text => $text{'cancel'}, -command => sub { $sw->destroy })->pack(-side => 'right'); $f3->pack(-expand => 'x'); } @@ -476,7 +545,7 @@ sub menu_set_text { } sub menu_set_symlink_text { - menu_set_text($symlinktext, (($vars{'option_symlinks'})?"Yes":"No")); + menu_set_text($symlinktext, (($vars{'option_symlinks'})?$text{'yes'}:$text{'no'})); } sub menu_set_schemebutton_text { @@ -484,11 +553,11 @@ sub menu_set_schemebutton_text { } sub menu_set_binbutton_text { - menu_set_text($bintextbutton, "$vars{'n_systems_selected'} out of $vars{'n_systems_available'}"); + menu_set_text($bintextbutton, "$vars{'n_systems_selected'} $text{'outof'} $vars{'n_systems_available'}"); } sub menu_set_collections_text { - menu_set_text($collectionstext, "$vars{'n_collections_selected'} collections out of $vars{'n_collections_available'}, disk space required: $vars{'total_size'} MB"); + menu_set_text($collectionstext, "$vars{'n_collections_selected'} $text{'collof'} $vars{'n_collections_available'}, $text{'diskreq'}: $vars{'total_size'} MB"); } sub menu_set_pathes_text { @@ -503,10 +572,10 @@ sub menu_update_texts { menu_set_collections_text; menu_set_binbutton_text; menu_set_schemebutton_text; - $optletterstate = ($vars{'option_letter'} ? "Yes" : "No"); - $optfmtstate = ($vars{'option_fmt'} ? "Yes" : "No"); - $optsrcstate = ($vars{'option_src'} ? "Yes" : "No"); - $optdocstate = ($vars{'option_doc'} ? "Yes" : "No"); + $optletterstate = ($vars{'option_letter'} ? $text{'yes'} : $text{'no'}); + $optfmtstate = ($vars{'option_fmt'} ? $text{'yes'} : $text{'no'}); + $optsrcstate = ($vars{'option_src'} ? $text{'yes'} : $text{'no'}); + $optdocstate = ($vars{'option_doc'} ? $text{'yes'} : $text{'no'}); if (unix()) { menu_set_symlink_text; }; } @@ -569,9 +638,9 @@ sub deselect_collections { sub toggle_and_set_opt_variable { my ($varsref, $toggleref) = @_; - $$toggleref = ($$toggleref eq "Yes") ? "No" : "Yes"; + $$toggleref = ($$toggleref eq $text{'yes'}) ? $text{'no'} : $text{'yes'}; $$varsref = 0; - $$varsref = 1 if ($$toggleref eq "Yes"); + $$varsref = 1 if ($$toggleref eq $text{'yes'}); menu_update_texts(); } |