summaryrefslogtreecommitdiff
path: root/Master/tlpkg/installer/install-menu-perltk.pl
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2009-08-09 17:50:12 +0000
committerNorbert Preining <preining@logic.at>2009-08-09 17:50:12 +0000
commite69918468644f891e3246aa8c0f2001b8c92b108 (patch)
tree5f934875ac09fad226b5db90e23e8487e2b09b92 /Master/tlpkg/installer/install-menu-perltk.pl
parentcf18f3ed20e8c33c50474349c41c4b820f631402 (diff)
rework translation handling completely, all is now done more or less
gettext compatible, and people can use po editors to edit tlpkg/translations/*.po git-svn-id: svn://tug.org/texlive/trunk@14589 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/installer/install-menu-perltk.pl')
-rw-r--r--Master/tlpkg/installer/install-menu-perltk.pl251
1 files changed, 126 insertions, 125 deletions
diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl
index 6edd17362d2..de91f4e0a53 100644
--- a/Master/tlpkg/installer/install-menu-perltk.pl
+++ b/Master/tlpkg/installer/install-menu-perltk.pl
@@ -47,13 +47,13 @@ our $MENU_ALREADYDONE = 3;
my $return = $MENU_INSTALL;
-our %text;
-our %labels;
-require("installer/install-translations.pl");
+our $LANG;
+our %TRANS;
+require("translations/trans.pl");
-$::fileassocdesc[0] = $text{fa_dontchange};
-$::fileassocdesc[1] = $text{fa_onlynew};
-$::fileassocdesc[2] = $text{fa_all};
+$::fileassocdesc[0] = __("None");
+$::fileassocdesc[1] = __("Only new");
+$::fileassocdesc[2] = __("All");
my $mw;
my $subframe;
@@ -71,15 +71,15 @@ my $optletterstate;
my $optfmtstate;
my $optsrcstate;
my $optdocstate;
-my $letteryesno = ( $vars{'option_letter'} ? $text{'yes'} : $text{'no'} );
-my $fmtyesno = ( $vars{'option_fmt'} ? $text{'yes'} : $text{'no'} );
-my $srcyesno = ( $vars{'option_src'} ? $text{'yes'} : $text{'no'} );
-my $deskintyesno = ( $vars{'option_desktop_integration'} ? $text{'yes'} : $text{'no'} );
-my $pathadjyesno = ( $vars{'option_path'} ? $text{'yes'} : $text{'no'} );
+my $letteryesno = ( $vars{'option_letter'} ? __("Yes") : __("No") );
+my $fmtyesno = ( $vars{'option_fmt'} ? __("Yes") : __("No") );
+my $srcyesno = ( $vars{'option_src'} ? __("Yes") : __("No") );
+my $deskintyesno = ( $vars{'option_desktop_integration'} ? __("Yes") : __("No") );
+my $pathadjyesno = ( $vars{'option_path'} ? __("Yes") : __("No") );
my $fileassocyesno = $::fileassocdesc[$vars{'option_file_assocs'}];
-my $editoryesno = ( $vars{'addon_editor'} ? $text{'yes'} : $text{'no'} );
-my $adminallyesno = ( $vars{'option_w32_multi_user'} ? $text{'yes'} : $text{'no'} );
-my $docyesno = ( $vars{'option_doc'} ? $text{'yes'} : $text{'no'} );
+my $editoryesno = ( $vars{'addon_editor'} ? __("Yes") : __("No") );
+my $adminallyesno = ( $vars{'option_w32_multi_user'} ? __("Yes") : __("No") );
+my $docyesno = ( $vars{'option_doc'} ? __("Yes") : __("No") );
$::run_menu = \&run_menu_perltk;
@@ -156,44 +156,44 @@ sub run_menu_perltk {
my $row = 1;
- $fr->Label(-text => $text{'title'})->grid(-row => $row, -column => 1, -columnspan => 3);
+ $fr->Label(-text => __("TeX Live 2009 Installation"))->grid(-row => $row, -column => 1, -columnspan => 3);
$row++;
- $fr->Label(-text => "------- $text{'basicinfo'} -------")->grid(-row => $row, -column => 1, -columnspan => 3);
+ $fr->Label(-text => "------- " . __("Basic Information") . " -------")->grid(-row => $row, -column => 1, -columnspan => 3);
# binary system line
if (!win32()) {
$row++;
- $fr->Label(-text => $labels{'binsys'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
+ $fr->Label(-text => __('Binary system(s)'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$bintextbutton = $fr->Label(-anchor => 'w');
$bintextbutton->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => $text{'change'}, -command => sub { menu_select_binsystems(); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
+ $fr->Button(-text => __("Change"), -command => sub { menu_select_binsystems(); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
}
$row++;
# scheme line
- $fr->Label(-text => $labels{'scheme'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
+ $fr->Label(-text => __('Selected scheme'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$schemebutton = $fr->Label(-anchor => 'w');
$schemebutton->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => $text{'change'}, -command => sub { menu_select_scheme(); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
+ $fr->Button(-text => __("Change"), -command => sub { menu_select_scheme(); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
$row++;
# further customization
- $fr->Label(-text => "------- $text{'custom'} -------")->grid(-row => $row, -column => 1,-columnspan => 3);
+ $fr->Label(-text => "------- " . __("Further Customization") . " -------")->grid(-row => $row, -column => 1,-columnspan => 3);
$row++;
# standard collection line
- $fr->Label(-text => $labels{'stdcoll'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
- $fr->Button(-text => $text{'change'}, -command => sub { menu_select_standard_collections(); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
+ $fr->Label(-text => __('Standard collections'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
+ $fr->Button(-text => __("Change"), -command => sub { menu_select_standard_collections(); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
$row++;
# lang collection line
- $fr->Label(-text => $labels{'langcoll'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
+ $fr->Label(-text => __('Language collections'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$langcoltext = $fr->Label(-anchor => 'w')->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button( -text => $text{'change'}, -command => sub { menu_select_lang_collections(); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
+ $fr->Button( -text => __("Change"), -command => sub { menu_select_lang_collections(); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
$row++;
$collectionstext = $fr->Label();
@@ -201,119 +201,120 @@ sub run_menu_perltk {
$row++;
# further customization
- $fr->Label(-text => "------- $text{'dirsetup'} -------")->grid(-row => $row, -column => 1, -columnspan => 3);
+ $fr->Label(-text => "------- " . __("Directory setup") . " -------")->grid(-row => $row, -column => 1, -columnspan => 3);
$row++;
# texdir line
- $fr->Label(-text => $labels{'texdir'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
+ $fr->Label(-text => __('TEXDIR (the main TeX directory)'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$texdirtext = $fr->Label(-anchor => 'w')->grid(-row => $row, -column => 2, -padx => "2m");
if ($::alternative_selector) {
- $fr->Button(-text => $text{'change'}, -command => sub { menu_edit_texdir("TEXDIR"); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
+ $fr->Button(-text => __("Change"), -command => sub { menu_edit_texdir("TEXDIR"); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
} else {
- $fr->Button(-text => $text{'change'}, -command => sub { menu_edit_vars_value("TEXDIR"); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
+ $fr->Button(-text => __("Change"), -command => sub { menu_edit_vars_value("TEXDIR"); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
}
$row++;
# texmflocal line
- $fr->Label(-text => $labels{'localdir'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
+ $fr->Label(-text => __('TEXMFLOCAL (directory for site-wide local files)'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$texmflocaltext = $fr->Label(-anchor => 'w')->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => $text{'change'}, -command => sub { menu_edit_vars_value("TEXMFLOCAL"); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
+ $fr->Button(-text => __("Change"), -command => sub { menu_edit_vars_value("TEXMFLOCAL"); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
$row++;
# texmfsysvar line
- $fr->Label(-text => $labels{'sysvardir'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
+ $fr->Label(-text => __('TEXMFSYSVAR (directory for autogenerated data)'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$texmfsysvartext = $fr->Label(-anchor => 'w')->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => $text{'change'}, -command => sub { menu_edit_vars_value("TEXMFSYSVAR"); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
+ $fr->Button(-text => __("Change"), -command => sub { menu_edit_vars_value("TEXMFSYSVAR"); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
$row++;
# texmfsysvar line
- $fr->Label(-text => $labels{'sysconfigdir'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
+ $fr->Label(-text => __('TEXMFSYSCONFIG (directory for local config)'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$texmfsysconfigtext = $fr->Label(-anchor => 'w')->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => $text{'change'}, -command => sub { menu_edit_vars_value("TEXMFSYSCONFIG"); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
+ $fr->Button(-text => __("Change"), -command => sub { menu_edit_vars_value("TEXMFSYSCONFIG"); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
$row++;
# texmfhome line
- $fr->Label(-text => $labels{'texmfhome'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
+ $fr->Label(-text => __('TEXMFHOME (directory for user-specific files)'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$texmfhometext = $fr->Label(-anchor => 'w')->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => $text{'change'}, -command => sub { menu_edit_vars_value("TEXMFHOME"); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
+ $fr->Button(-text => __("Change"), -command => sub { menu_edit_vars_value("TEXMFHOME"); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
$row++;
# Options
- $fr->Label(-text => "------- $text{'options'} -------")->grid(-row => $row, -column => 1, -columnspan => 3);
+ $fr->Label(-text => "------- " . __("Options") . " -------")->grid(-row => $row, -column => 1, -columnspan => 3);
$row++;
# optpaper
- $fr->Label(-text => $labels{'optletter'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
+ $fr->Label(-text => __('Use letter size instead of A4 by default'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$fr->Label(-anchor => 'w', -textvariable => \$letteryesno)->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_letter'}, \$letteryesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
+ $fr->Button(-text => __("Toggle"), -command => sub { toggle_and_set_opt_variable(\$vars{'option_letter'}, \$letteryesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
$row++;
- $fr->Label(-text => $labels{'optfmt'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
+ $fr->Label(-text => __('Create all format files'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$fr->Label(-anchor => 'w', -textvariable => \$fmtyesno)->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_fmt'}, \$fmtyesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
+ $fr->Button(-text => __("Toggle"), -command => sub { toggle_and_set_opt_variable(\$vars{'option_fmt'}, \$fmtyesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
if ($vars{'doc_splitting_supported'}) {
$row++;
- $fr->Label(-text => $labels{'optdoc'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
+ $fr->Label(-text => __('Install font/macro doc tree'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$fr->Label(-anchor => 'w', -textvariable => \$docyesno)->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_doc'}, \$docyesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
+ $fr->Button(-text => __("Toggle"), -command => sub { toggle_and_set_opt_variable(\$vars{'option_doc'}, \$docyesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
}
if ($vars{'src_splitting_supported'}) {
$row++;
- $fr->Label(-text => $labels{'optsrc'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
+ $fr->Label(-text => __('Install font/macro source tree'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$fr->Label(-anchor => 'w', -textvariable => \$srcyesno)->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_src'}, \$srcyesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
+ $fr->Button(-text => __("Toggle"), -command => sub { toggle_and_set_opt_variable(\$vars{'option_src'}, \$srcyesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
}
$row++;
- $fr->Label(-text => (win32() ? $labels{'pathadj'} : $labels{'symlink'} ),
+ $fr->Label(-text => (win32() ? __('Adjust PATH setting in registry') :
+ __('Create symlinks in system directories')),
-anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$fr->Label(-anchor => 'w', -textvariable => \$pathadjyesno)->grid(-row => $row, -column => 2, -padx => "2m");
if (unix()) {
- $fr->Button(-text => $text{'change'}, -command => sub { menu_select_symlink(); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
+ $fr->Button(-text => __("Change"), -command => sub { menu_select_symlink(); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
} else {
- $fr->Button(-text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_path'}, \$pathadjyesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
+ $fr->Button(-text => __("Toggle"), -command => sub { toggle_and_set_opt_variable(\$vars{'option_path'}, \$pathadjyesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
}
if ($::opt_all_options || win32()) {
$row++;
- $fr->Label(-text => $labels{'desktop_integration'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
+ $fr->Label(-text => __('Add shortcuts to menu and desktop'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$fr->Label(-anchor => 'w', -textvariable => \$deskintyesno)->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_desktop_integration'}, \$deskintyesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
+ $fr->Button(-text => __("Toggle"), -command => sub { toggle_and_set_opt_variable(\$vars{'option_desktop_integration'}, \$deskintyesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
$row++;
- $fr->Label(-text => $labels{'fileassocs'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
+ $fr->Label(-text => __('Change file associations'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$fr->Label(-anchor => 'w', -textvariable => \$fileassocyesno)->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => $text{'change'}, -command => sub { menu_edit_file_assocs(); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
+ $fr->Button(-text => __("Change"), -command => sub { menu_edit_file_assocs(); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
if ($::opt_all_options || admin()) {
$row++;
- $fr->Label(-text => $labels{'w32admallusers'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
+ $fr->Label(-text => __('Installation for all users'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$fr->Label(-anchor => 'w', -textvariable => \$adminallyesno)->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_w32_multi_user'}, \$adminallyesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
+ $fr->Button(-text => __("Toggle"), -command => sub { toggle_and_set_opt_variable(\$vars{'option_w32_multi_user'}, \$adminallyesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
}
$row++;
- $fr->Label(-text => $labels{'addon_editor'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
+ $fr->Label(-text => __('Install TeXworks front end'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$fr->Label(-anchor => 'w', -textvariable => \$editoryesno)->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'addon_editor'}, \$editoryesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
+ $fr->Button(-text => __("Toggle"), -command => sub { toggle_and_set_opt_variable(\$vars{'addon_editor'}, \$editoryesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
}
# install/cancel buttons
my $f3 = $fr->Frame;
$f3->Button(
- -text => $text{'install'},
+ -text => __("Install TeX Live"),
-command => sub { installation_window(); }
)->pack(-side => 'left', -padx => "2m", -pady => "2m");
my $quitbutton = $f3->Button(
- -text => $text{'quit'},
+ -text => __("Quit"),
-command => sub { $return = $MENU_ABORT; $mainwindow->destroy }
)->pack(-side => 'right', -padx => "2m", -pady => "2m");
$mw->bind('<Escape>', [ $quitbutton, 'Invoke' ]);
#my $wizardbutton = $f3->Button(
- # -text => $text{'wizard'},
+ # -text => __("Wizard"),
# -command => sub {
# $mainwindow->destroy;
# require("installer/install-menu-wizard.pl");
@@ -357,18 +358,18 @@ sub installation_window {
-colors => [ 0, '#0078b8' ]);
$::progress->pack(-fill => "x");
my $f = $::sww->Frame;
- my $b = $f->Button(-text => $text{'cancel'},
+ my $b = $f->Button(-text => __("Cancel"),
-command => sub { $::sww->destroy; $mainwindow->destroy;
do_cleanup(); exit(1); }
)->pack(-pady => "2m");
$f->pack;
do_installation();
$return = $MENU_ALREADYDONE;
- my $t = $text{'finished'};
+ my $t = __("See TEXDIR/index.html for links to documentation.\nThe TeX Live web site (http://tug.org/texlive/) contains any updates and corrections. TeX Live is a joint project of the TeX user groups around the world; please consider supporting it by joining the group best for you. The list of groups is available on the web at http://tug.org/usergroups.html.");
if (!win32()) {
- $t .= "\n\n$text{'finishedpath'}";
+ $t .= "\n\n" . __("Add TEXDIR/texmf/doc/man to MANPATH.\nAdd TEXDIR/texmf/doc/info to INFOPATH.\nMost importantly, add TEXDIR/bin/PLATFORM\nto your PATH for current and future sessions.");
}
- $t .= "\n\n$text{'welcome'}";
+ $t .= "\n\n" . __("Welcome to TeX Live!");
$t =~ s/TEXDIR/$::vars{'TEXDIR'}/g;
$t =~ s/PLATFORM/$::vars{'this_platform'}/g;
$t =~ s/\\n/\n/g;
@@ -380,7 +381,7 @@ sub installation_window {
$::progressw->see("end");
$::progressw->tagAdd("centered", $linechar, "end");
$::progressw->tagConfigure("centered", -justify => "center");
- $b->configure(-text => $text{'finbut'},
+ $b->configure(-text => __("Finish"),
-command => sub { $mainwindow->destroy; });
}
@@ -403,7 +404,7 @@ sub menu_edit_texdir {
} else {
$hint_var = win32() ? '%USERPROFILE%' : '$HOME';
}
- my $hint_text = $text{'hinthome'};
+ my $hint_text = __('(use ~ for %%%)');
$hint_text =~ s/%%%/$hint_var/;
if ($val =~ m!^(.*)/texlive/$texlive_release$!) {
$currsel = "$1";
@@ -422,10 +423,10 @@ sub menu_edit_texdir {
$addtexlive = 0;
$currsel = $val;
}
- my $sw = $mainwindow->Toplevel(-title => $text{'changevar'});
+ my $sw = $mainwindow->Toplevel(-title => __("Change variable value"));
$sw->transient($mainwindow);
$sw->grab();
- $sw->Label(-text => $text{'enterpath'} . " $key: " . $hint_text)->pack(-padx => "2m", -pady => "2m");
+ $sw->Label(-text => __("Enter path for") . " $key: " . $hint_text)->pack(-padx => "2m", -pady => "2m");
$entry = $sw->Entry(-width => 60)->pack(-padx => "2m", -pady => "2m");
my $f = $sw->Frame;
my $c1 = $f->Checkbutton(-text => 'Add "texlive"', -variable => \$addtexlive,
@@ -436,11 +437,11 @@ sub menu_edit_texdir {
-browsecmd => sub { my ($d) = @_; $currsel = $d; update_label(); },
-directory => "$currsel");
my $ff = $sw->Frame;
- my $ok = $ff->Button(-text => $text{'ok'}, -command => sub { $val = $entry->get; callback_edit_directories($key,$val); $sw->destroy; });
- my $cancel = $ff->Button(-text => $text{'cancel'}, -command => sub { $sw->destroy; });
+ my $ok = $ff->Button(-text => __("Ok"), -command => sub { $val = $entry->get; callback_edit_directories($key,$val); $sw->destroy; });
+ my $cancel = $ff->Button(-text => __("Cancel"), -command => sub { $sw->destroy; });
update_label();
- $c1->pack(-side => 'left', -padx => "2m", -pady => "2m");
- $c2->pack(-side => 'right', -padx => "2m", -pady => "2m");
+ $c1->pack(-side => "left", -padx => "2m", -pady => "2m");
+ $c2->pack(-side => "right", -padx => "2m", -pady => "2m");
$f->pack;
$foo->pack(-fill => "both", -expand => 1);
$ok->pack(-side => 'left' , -padx => "2m", -pady => "2m");
@@ -453,7 +454,7 @@ sub menu_edit_texdir {
sub menu_edit_vars_value {
my $key = shift;
- my $sw = $mainwindow->Toplevel(-title => $text{'changevar'});
+ my $sw = $mainwindow->Toplevel(-title => __("Change variable value"));
$sw->transient($mainwindow);
$sw->grab();
my $val = $vars{$key};
@@ -463,15 +464,15 @@ sub menu_edit_vars_value {
} else {
$hint_var = win32() ? '%USERPROFILE%' : '$HOME';
}
- my $hint_text = $text{'hinthome'};
+ my $hint_text = __('(use ~ for %%%)');
$hint_text =~ s/%%%/$hint_var/;
- $sw->Label(-text => $text{'enterpath'} . " $key: " . $hint_text)->pack(-padx => "2m", -pady => "2m");
+ $sw->Label(-text => __("Enter path for") . " $key: " . $hint_text)->pack(-padx => "2m", -pady => "2m");
my $entry = $sw->Entry(-textvariable => $val, -width => 60);
$entry->pack(-padx => "2m", -pady => "2m");
my $f = $sw->Frame;
- my $okbutton = $f->Button(-text => $text{'ok'},
+ my $okbutton = $f->Button(-text => __("Ok"),
-command => sub { $val = $entry->get; callback_edit_directories($key,$val) ; $sw->destroy })->pack(-side => 'left', -padx => "2m", -pady => "2m");
- my $cancelbutton = $f->Button(-text => $text{'cancel'},
+ my $cancelbutton = $f->Button(-text => __("Cancel"),
-command => sub { $sw->destroy })->pack(-side => 'right', -padx => "2m", -pady => "2m");
$f->pack(-expand => 'x');
# bindings
@@ -480,12 +481,12 @@ sub menu_edit_vars_value {
}
sub menu_edit_file_assocs {
- my $sw = $mainwindow->Toplevel(-title => $labels{'fileassocs'});
+ my $sw = $mainwindow->Toplevel(-title => __('Change file associations'));
$sw->transient($mainwindow);
$sw->grab();
my $key = 'option_file_assocs';
my $var = $::fileassocdesc[$vars{$key}];
- $sw->Label(-text => $labels{"fileassocs"})->pack(-padx => "2m", -pady => "2m");
+ $sw->Label(-text => __("Change file associations"))->pack(-padx => "2m", -pady => "2m");
my $opt = $sw->BrowseEntry(-autolistwidth => 1,
-variable => \$var);
for my $i (0..2) {
@@ -494,7 +495,7 @@ sub menu_edit_file_assocs {
$opt->pack(-padx => "2m", -pady => "2m");
my $f = $sw->Frame;
- my $okbutton = $f->Button(-text => $text{"ok"},
+ my $okbutton = $f->Button(-text => __("Ok"),
-command => sub {
my $idx;
if ($var eq $::fileassocdesc[0]) {
@@ -509,7 +510,7 @@ sub menu_edit_file_assocs {
$vars{$key} = $idx;
$fileassocyesno = $::fileassocdesc[$idx];
$sw->destroy; })->pack(-side => "left", -padx => "2m", -pady => "2m");
- my $cancelbutton = $f->Button(-text => $text{"cancel"}, -command => sub { $sw->destroy; })->pack(-side => "left", -padx => "2m", -pady => "2m");
+ my $cancelbutton = $f->Button(-text => __("Cancel"), -command => sub { $sw->destroy; })->pack(-side => "left", -padx => "2m", -pady => "2m");
$f->pack;
$sw->bind('<Return>', [ $okbutton, 'Invoke' ]);
$sw->bind('<Escape>', [ $cancelbutton, 'Invoke' ]);
@@ -517,7 +518,7 @@ sub menu_edit_file_assocs {
sub menu_select_scheme {
- my $sw = $mainwindow->Toplevel(-title => $labels{'scheme'});
+ my $sw = $mainwindow->Toplevel(-title => __('Selected scheme'));
$sw->transient($mainwindow);
$sw->grab();
my @schemes;
@@ -530,7 +531,7 @@ sub menu_select_scheme {
}
@schemes=sort @schemes;
my $selected = $vars{'selected_scheme'};
- $sw->Label(-text => $text{'selectscheme'})->pack(-padx => "2m", -pady => "2m");
+ $sw->Label(-text => __("Selected scheme"))->pack(-padx => "2m", -pady => "2m");
my $f2 = $sw->Frame;
my $f2l = $f2->Frame;
my $f2r = $f2->Frame;
@@ -551,9 +552,9 @@ sub menu_select_scheme {
$f2r->pack(-side => 'right', -padx => "2m", -pady => "2m");
$f2->pack;
my $f3 = $sw->Frame;
- my $okbutton = $f3->Button(-text => $text{'ok'},
+ my $okbutton = $f3->Button(-text => __("Ok"),
-command => sub { callback_select_scheme($selected) ; $sw->destroy })->pack(-side => 'left', -padx => "2m", -pady => "2m");
- my $cancelbutton = $f3->Button(-text => $text{'cancel'},
+ my $cancelbutton = $f3->Button(-text => __("Cancel"),
-command => sub { $sw->destroy })->pack(-side => 'left', -padx => "2m", -pady => "2m");
$f3->pack(-expand => 'x');
$sw->bind('<Return>' => [ $okbutton, 'Invoke']);
@@ -561,7 +562,7 @@ sub menu_select_scheme {
}
sub menu_select_standard_collections {
- my $sw = $mainwindow->Toplevel(-title => $labels{'stdcoll'});
+ my $sw = $mainwindow->Toplevel(-title => __('Standard collections'));
$sw->transient($mainwindow);
$sw->grab();
my $fb = $sw->Frame;
@@ -570,7 +571,7 @@ sub menu_select_standard_collections {
my $f1 = $fb->Frame;
my $f2 = $fb->Frame;
my %lvars = %vars;
- $sw->Label(-text => $text{'selectstdcol'})->pack(-padx => "2m", -pady => "2m");
+ $sw->Label(-text => __("Select the collections to be installed"))->pack(-padx => "2m", -pady => "2m");
my $halfcol = $#collections_std / 2;
my $i = 0;
foreach my $coll (sort @collections_std) {
@@ -586,27 +587,27 @@ sub menu_select_standard_collections {
$f2->pack(-side => 'right', -padx => "2m", -pady => "2m");
$fb->pack(-padx => "2m", -pady => "2m");
$fd->pack();
- $fd->Button(-text => $text{'selectall'},
+ $fd->Button(-text => __("Select All"),
-command => sub { select_collections(\%lvars, @collections_std) })->pack(-side => 'left', -padx => "2m", -pady => "2m");
- $fd->Button(-text => $text{'selectnone'},
+ $fd->Button(-text => __("Deselect All"),
-command => sub { deselect_collections(\%lvars, @collections_std) })->pack(-side => 'right', -padx => "2m", -pady => "2m");
$fc->pack(-expand => 'x', -padx => "2m", -pady => "2m");
- my $okbutton = $fc->Button(-text => $text{'ok'},
+ my $okbutton = $fc->Button(-text => __("Ok"),
-command => sub { %vars = %lvars; callback_select_collection() ; $sw->destroy })->pack(-side => 'left', -padx => "2m", -pady => "2m");
- my $cancelbutton = $fc->Button(-text => $text{'cancel'},
+ my $cancelbutton = $fc->Button(-text => __("Cancel"),
-command => sub { $sw->destroy })->pack(-side => 'right', -padx => "2m", -pady => "2m");
$sw->bind('<Return>' => [ $okbutton, 'Invoke']);
$sw->bind('<Escape>' => [ $cancelbutton, 'Invoke']);
}
sub menu_select_lang_collections {
- my $sw = $mainwindow->Toplevel(-title => $labels{'langcoll'});
+ my $sw = $mainwindow->Toplevel(-title => __('Language collections'));
$sw->transient($mainwindow);
$sw->grab();
my $f1 = $sw->Frame;
$f1->pack;
- my $f1lang = $f1->Labelframe(-text => $text{'selectlang'});
- my $f1doc = $f1->Labelframe(-text => $text{'selectdoc'});
+ my $f1lang = $f1->Labelframe(-text => __("Select language support"));
+ my $f1doc = $f1->Labelframe(-text => __("Select language-specific documentation"));
$f1lang->pack(-side => 'left', -padx => "2m", -pady => "2m", -ipadx => "2m", -ipady => "2m");
$f1doc->pack(-side => 'right', -padx => "2m", -pady => "2m", -ipadx => "2m", -ipady => "2m", -expand => 1, -fill => "y");
my $f1langT = $f1lang->Frame; $f1langT->pack;
@@ -627,9 +628,9 @@ sub menu_select_lang_collections {
}
my $f1langB = $f1lang->Frame;
$f1langB->pack(-expand => 'x');
- $f1langB->Button(-text => $text{'selectall'},
+ $f1langB->Button(-text => __("Select All"),
-command => sub { select_collections(\%lvars, @collections_lang) })->pack(-side => 'left', -padx => "2m", -pady => "2m");
- $f1langB->Button(-text => $text{'selectnone'},
+ $f1langB->Button(-text => __("Deselect All"),
-command => sub { deselect_collections(\%lvars, @collections_lang) })->pack(-side => 'right', -padx => "2m", -pady => "2m");
my $f1docT = $f1doc->Frame; $f1docT->pack;
@@ -649,14 +650,14 @@ sub menu_select_lang_collections {
}
my $f1docB = $f1doc->Frame;
$f1docB->pack(-expand => 1, -side => "bottom");
- $f1docB->Button(-text => $text{'selectall'},
+ $f1docB->Button(-text => __("Select All"),
-command => sub { select_collections(\%lvars, @collections_lang_doc) })->pack(-side => 'left', -padx => "2m", -pady => "2m");
- $f1docB->Button(-text => $text{'selectnone'},
+ $f1docB->Button(-text => __("Deselect All"),
-command => sub { deselect_collections(\%lvars, @collections_lang_doc) })->pack(-side => 'left', -padx => "2m", -pady => "2m");
my $f2 = $sw->Frame; $f2->pack(-expand => 'x');
- my $okbutton = $f2->Button(-text => $text{'ok'},
+ my $okbutton = $f2->Button(-text => __("Ok"),
-command => sub { %vars = %lvars; callback_select_collection() ; $sw->destroy })->pack(-side => 'left', -padx => "2m", -pady => "2m");
- my $cancelbutton = $f2->Button(-text => $text{'cancel'},
+ my $cancelbutton = $f2->Button(-text => __("Cancel"),
-command => sub { $sw->destroy })->pack(-side => 'right', -padx => "2m", -pady => "2m");
$sw->bind('<Return>' => [ $okbutton, 'Invoke']);
$sw->bind('<Escape>' => [ $cancelbutton, 'Invoke']);
@@ -701,26 +702,26 @@ sub menu_select_symlink {
$vars{'option_path'} = $osym;
toggle_and_set_opt_variable(\$vars{'option_path'}, \$pathadjyesno);
}
- my $sw = $mainwindow->Toplevel(-title => $labels{'symlink'});
+ my $sw = $mainwindow->Toplevel(-title => __('Create symlinks in system directories'));
$sw->transient($mainwindow);
$sw->grab();
$sw->Checkbutton(-variable => \$osym,
- -text => $text{'createsym'},
+ -text => __("create symlinks in standard directories"),
-command => sub { set_unset_buttons(); } )->grid(-column => 1,
-row => 1,
-columnspan => 2,
-padx => "2m");
- $binlab = $sw->Label(-text => $text{'binto'});
+ $binlab = $sw->Label(-text => __("binaries to"));
$binb = $sw->Entry(-textvariable => \$lbin);
- $manlab = $sw->Label(-text => $text{'manto'});
+ $manlab = $sw->Label(-text => __("manpages to"));
$manb = $sw->Entry(-textvariable => \$lman);
- $infolab = $sw->Label(-text => $text{'infoto'});
+ $infolab = $sw->Label(-text => __("info to"));
$infob = $sw->Entry(-textvariable => \$linfo);
set_unset_buttons();
my $f2 = $sw->Frame; $f2->grid(-column => 1, -columnspan => 2, -row => 5);
- my $okbutton = $f2->Button(-text => $text{'ok'},
+ my $okbutton = $f2->Button(-text => __("Ok"),
-command => sub { return_callback(); $sw->destroy })->pack(-side => 'left');
- my $cancelbutton = $f2->Button(-text => $text{'cancel'},
+ my $cancelbutton = $f2->Button(-text => __("Cancel"),
-command => sub { $sw->destroy })->pack(-side => 'right');
$sw->bind('<Return>' => [ $okbutton, 'Invoke']);
$sw->bind('<Escape>' => [ $cancelbutton, 'Invoke']);
@@ -729,7 +730,7 @@ sub menu_select_symlink {
sub menu_select_binsystems {
my $f2r;
my $f2;
- my $sw = $mainwindow->Toplevel(-title => $labels{'binsys'});
+ my $sw = $mainwindow->Toplevel(-title => __('Binary system(s)'));
$sw->transient($mainwindow);
$sw->grab();
my @diskarchs = ();
@@ -738,7 +739,7 @@ sub menu_select_binsystems {
push @diskarchs, $1;
}
}
- $sw->Label(-text => $text{'selectsys'})->pack(-padx => "2m", -pady => "2m");
+ $sw->Label(-text => __("Select arch-os"))->pack(-padx => "2m", -pady => "2m");
$f2 = $sw->Frame;
my $f2l = $f2->Frame;
foreach my $sys (sort @diskarchs) {
@@ -747,9 +748,9 @@ sub menu_select_binsystems {
$f2l->pack(-side => 'left');
$f2->pack(-padx => "2m", -pady => "2m");
my $f3 = $sw->Frame;
- my $okbutton = $f3->Button(-text => $text{'ok'},
+ my $okbutton = $f3->Button(-text => __("Ok"),
-command => sub { callback_select_systems() ; $sw->destroy })->pack(-side => 'left', -padx => "2m", -pady => "2m");
- my $cancelbutton = $f3->Button(-text => $text{'cancel'},
+ my $cancelbutton = $f3->Button(-text => __("Cancel"),
-command => sub { $sw->destroy })->pack(-side => 'right', -padx => "2m", -pady => "2m");
$f3->pack(-expand => 'x');
$sw->bind('<Return>' => [ $okbutton, 'Invoke']);
@@ -769,12 +770,12 @@ sub menu_set_schemebutton_text {
sub menu_set_binbutton_text {
if (!win32()) {
- menu_set_text($bintextbutton, "$vars{'n_systems_selected'} $text{'outof'} $vars{'n_systems_available'}");
+ menu_set_text($bintextbutton, "$vars{'n_systems_selected'} " . __("out of") . " $vars{'n_systems_available'}");
}
}
sub menu_set_collections_text {
- menu_set_text($collectionstext, "$vars{'n_collections_selected'} $text{'collof'} $vars{'n_collections_available'}, $text{'diskreq'}: $vars{'total_size'} MB");
+ menu_set_text($collectionstext, "$vars{'n_collections_selected'} " . __("collections out of") . " $vars{'n_collections_available'}, " . __("disk space required") . ": $vars{'total_size'} MB");
}
sub menu_set_pathes_text {
@@ -783,12 +784,12 @@ sub menu_set_pathes_text {
menu_set_text($langcoltext, "");
} else {
# bad
- menu_set_text($langcoltext, $text{'nolangcol'}, -foreground => "red");
+ menu_set_text($langcoltext, __("(no language collection selected!)"), -foreground => "red");
}
if (TeXLive::TLUtils::texdir_check($vars{'TEXDIR'})) {
menu_set_text($texdirtext, "$vars{'TEXDIR'}", -foreground => "black");
} else {
- menu_set_text($texdirtext, $text{'notwritable'}, -foreground => "red");
+ menu_set_text($texdirtext, __("(default not writable - please change!)"), -foreground => "red");
}
menu_set_text($texmflocaltext, "$vars{'TEXMFLOCAL'}");
if ((-w $vars{'TEXMFSYSVAR'}) || (-w dirname($vars{'TEXMFSYSVAR'}))) {
@@ -797,10 +798,10 @@ sub menu_set_pathes_text {
if (TeXLive::TLUtils::texdir_check($vars{'TEXDIR'})) {
menu_set_text($texmfsysvartext, "$vars{'TEXMFSYSVAR'}", -foreground => "black");
} else {
- menu_set_text($texmfsysvartext, $text{'changetexdir'}, -foreground => "red");
+ menu_set_text($texmfsysvartext, __("(please change TEXDIR first!)"), -foreground => "red");
}
} else {
- menu_set_text($texmfsysvartext, $text{'notwritable'});
+ menu_set_text($texmfsysvartext, __("(default not writable - please change!)"));
}
if ((-w $vars{'TEXMFSYSCONFIG'}) || (-w dirname($vars{'TEXMFSYSCONFIG'}))) {
menu_set_text($texmfsysconfigtext, "$vars{'TEXMFSYSCONFIG'}", -foreground => "black");
@@ -808,10 +809,10 @@ sub menu_set_pathes_text {
if (TeXLive::TLUtils::texdir_check($vars{'TEXDIR'})) {
menu_set_text($texmfsysconfigtext, "$vars{'TEXMFSYSCONFIG'}", -foreground => "black");
} else {
- menu_set_text($texmfsysconfigtext, $text{'changetexdir'}, -foreground => "red");
+ menu_set_text($texmfsysconfigtext, __("(please change TEXDIR first!)"), -foreground => "red");
}
} else {
- menu_set_text($texmfsysconfigtext, $text{'notwritable'});
+ menu_set_text($texmfsysconfigtext, __("(default not writable - please change!)"));
}
menu_set_text($texmfhometext, "$vars{'TEXMFHOME'}");
}
@@ -822,10 +823,10 @@ sub menu_update_texts {
menu_set_collections_text;
menu_set_binbutton_text;
menu_set_schemebutton_text;
- $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'});
+ $optletterstate = ($vars{'option_letter'} ? __("Yes") : __("No"));
+ $optfmtstate = ($vars{'option_fmt'} ? __("Yes") : __("No"));
+ $optsrcstate = ($vars{'option_src'} ? __("Yes") : __("No"));
+ $optdocstate = ($vars{'option_doc'} ? __("Yes") : __("No"));
}
sub callback_select_scheme {
@@ -895,9 +896,9 @@ sub dump_vars_stdout {
sub toggle_and_set_opt_variable {
my ($varsref, $toggleref) = @_;
- $$toggleref = ($$toggleref eq $text{'yes'}) ? $text{'no'} : $text{'yes'};
+ $$toggleref = ($$toggleref eq __("Yes")) ? __("No") : __("Yes");
$$varsref = 0;
- $$varsref = 1 if ($$toggleref eq $text{'yes'});
+ $$varsref = 1 if ($$toggleref eq __("Yes"));
calc_depends();
menu_update_texts();
}