From a9ab728d2a8b514da67b964a845f2e5bb7308f60 Mon Sep 17 00:00:00 2001 From: Siep Kroonenberg Date: Sat, 27 Feb 2021 14:17:34 +0000 Subject: Translations loaded in tlmgr and install-tl git-svn-id: svn://tug.org/texlive/trunk@57970 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/scripts/texlive/tlmgr.pl | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) (limited to 'Master/texmf-dist/scripts/texlive/tlmgr.pl') diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index 3dd72b2c71f..0e114485086 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -21,7 +21,6 @@ $datrev =~ s/ \(.*$//; $tlmgrversion = "$tlmgrrevision ($datrev)"; our $Master; -our $ismain; our $loadmediasrcerror; our $packagelogfile; our $packagelogged; @@ -41,12 +40,6 @@ END { BEGIN { $^W = 1; - $ismain = (__FILE__ eq $0); - # WARNING - # The only use anticipated for tlmgr.pl as library for the 2009 release - # is the Windows w32client prototype script. - # Unix-specific problems with use as library will probably go undetected. - # make subprograms (including kpsewhich) have the right path: my $kpsewhichname; if ($^O =~ /^MSWin/i) { @@ -61,14 +54,8 @@ BEGIN { } else { $Master = __FILE__; $Master =~ s,/*[^/]*$,,; - if ($ismain) { - $bindir = $Master; - $Master = "$Master/../.."; - } else { - # for the time being, this code will not be used or tested - $Master = "$Master/../../.."; - # no code yet for $bindir; would have to detect platform - } + $bindir = $Master; + $Master = "$Master/../.."; # make subprograms (including kpsewhich) have the right path: $ENV{"PATH"} = "$bindir:$ENV{PATH}"; $kpsewhichname = "kpsewhich"; @@ -374,7 +361,7 @@ my %globaloptions = ( "version" => 1, ); -main() if $ismain; +main(); ### main ################################################################## @@ -438,6 +425,12 @@ sub main { } ddebug("arguments: @ARGV\n") if @ARGV; + # prepare for loading of lang.pl which expects $::lang and $::opt_lang + $::opt_lang = $config{"gui-lang"} if (defined($config{"gui-lang"})); + $::opt_lang = $opts{"gui-lang"} if (defined($opts{"gui-lang"})); + require("TeXLive/trans.pl"); + load_translations(); + if ($opts{"version"} || (defined $action && $action eq "version")) { if ($::machinereadable) { # give_version already is machinereadable aware -- cgit v1.2.3