diff options
author | Siep Kroonenberg <siepo@cybercomm.nl> | 2017-06-12 13:23:16 +0000 |
---|---|---|
committer | Siep Kroonenberg <siepo@cybercomm.nl> | 2017-06-12 13:23:16 +0000 |
commit | 807d135d3f1ab7bfd3fc070a2468db975e706ed5 (patch) | |
tree | 1434bd34d434c9365b7286043ab75e6963b0b212 /Master | |
parent | cbb05e207d6c11513bfdaffa1214535d99eb66f9 (diff) |
Hopefully __ is now handled right.
git-svn-id: svn://tug.org/texlive/trunk@44571 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-x | Master/install-tl | 51 | ||||
-rw-r--r-- | Master/tlpkg/installer/install-menu-text.pl | 6 | ||||
-rw-r--r-- | Master/tlpkg/installer/tracked-install.pl | 4 |
3 files changed, 26 insertions, 35 deletions
diff --git a/Master/install-tl b/Master/install-tl index 6b588ba6b61..771335e0db6 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -202,7 +202,7 @@ $::fileassocdesc[2] = "All"; # if we find a file installation.profile we ask the user whether we should # continue with the installation -# note, we are in the installer directory. +# note, we are in the directory from which the aborted installation was run. my %profiledata; if (-r "installation.profile") { my $pwd = Cwd::getcwd(); @@ -563,7 +563,8 @@ if ($opt_profile eq "") { tlwarn("Unknown return value of run_menu: $ret\n"); exit(3); } -} else { +} else { # no interactive setting of options + *__ = \&::___; if (!do_remote_init()) { die ("Exiting installation.\n"); } @@ -587,7 +588,7 @@ $::env_warns = ""; check_env() unless $ENV{"TEXLIVE_INSTALL_ENV_NOCHECK"}; create_welcome(); my $status = 1; -if ($opt_gui eq 'text' or +if ($opt_gui eq 'text' or $opt_profile ne "" or !(-r "$::installerdir/tlpkg/installer/tracked-install.pl")) { $status = do_installation(); if (@::WARNLINES) { @@ -596,8 +597,7 @@ if ($opt_gui eq 'text' or if ($::env_warns) { print STDERR $::env_warns; } unless ($ENV{"TEXLIVE_INSTALL_NO_WELCOME"}) { foreach my $t (@::welcome_arr) { - printf STDOUT sprintf (shift @$t, @$t); - print STDOUT "\n"; + print STDOUT "$t\n"; } } do_cleanup(); # sets $::LOGFILENAME if not already defined @@ -2361,32 +2361,19 @@ EOF # Create a welcome message. -# This is an array of references to anonymous arrays of parameters for -# either __ or sprintf: a localizable string, possibly with placeholders, -# followed by parameters for those placeholders, if any. -# sub create_welcome { @::welcome_arr = (); - push @::welcome_arr, (["\nWelcome to TeX Live!\n"]); - push @::welcome_arr, [ <<END_WELCOME_GENERIC, -Documentation links: %s/index.html -The TeX Live web site (https://tug.org/texlive/) -contains 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 on the web at https://tug.org/usergroups.html. -END_WELCOME_GENERIC - $::vars{'TEXDIR'}]; + push @::welcome_arr, "\n"; + push @::welcome_arr, __("Welcome to TeX Live!"); + push @::welcome_arr, "\n"; + push @::welcome_arr, __( + "See %s/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.", + $::vars{'TEXDIR'}); if (!win32()) { - push @::welcome_arr, [ <<END_WELCOME_W32, -Add %s/texmf-dist/doc/man to MANPATH. -Add %s/texmf-dist/doc/info to INFOPATH. -Most importantly, add %s/bin/%s -to your PATH for current and future sessions. -END_WELCOME_W32 - $::vars{'TEXDIR'}, $::vars{'TEXDIR'}, $::vars{'TEXDIR'}, - $::vars{'this_platform'}]; + push @::welcome_arr, __( + "Add %s/texmf-dist/doc/man to MANPATH.\nAdd %s/texmf-dist/doc/info to INFOPATH.\nMost importantly, add %s/bin/%s\nto your PATH for current and future sessions.", + $::vars{'TEXDIR'}, $::vars{'TEXDIR'}, $::vars{'TEXDIR'}, + $::vars{'this_platform'}); } } @@ -2426,7 +2413,13 @@ sub deselect_collections { } } -__END__ +# assign \&___ to *__ if __ is not otherwise defined +sub ___ { + my $s = shift; + return sprintf($s, @_); +} + + __END__ =head1 NAME diff --git a/Master/tlpkg/installer/install-menu-text.pl b/Master/tlpkg/installer/install-menu-text.pl index 07268bb782b..ea09b06dfe0 100644 --- a/Master/tlpkg/installer/install-menu-text.pl +++ b/Master/tlpkg/installer/install-menu-text.pl @@ -52,10 +52,8 @@ sub string_to_list { return split(//, $string); } -sub __ { - my $s = shift; - return sprintf($s, @_); -} +# ___, defined in install-tl, replaces the GUI translating function +*::__ = \&::___; sub button { # for main menu: 1 char my $val=shift; diff --git a/Master/tlpkg/installer/tracked-install.pl b/Master/tlpkg/installer/tracked-install.pl index bdc12e3f041..54ec22599d5 100644 --- a/Master/tlpkg/installer/tracked-install.pl +++ b/Master/tlpkg/installer/tracked-install.pl @@ -65,8 +65,8 @@ sub installer_tracker { $::progressw->tagConfigure('centered', -justify => 'center'); # basic welcome message foreach my $t (@::welcome_arr) { - my $s = shift @$t; - $::progressw->insert("end", __($s, @$t)."\n", 'centered'); + #my $s = shift @$t; + $::progressw->insert("end", "$t\n", 'centered'); } $::progressw->insert("end", "\n"); # additional info |