diff options
-rw-r--r-- | Master/texmf/scripts/texlive/tlmgrgui/gui-uninstall.pl | 4 | ||||
-rwxr-xr-x | Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl | 6 | ||||
-rw-r--r-- | Master/tlpkg/installer/install-menu-perltk.pl | 22 | ||||
-rw-r--r-- | Master/tlpkg/installer/install-menu-wizard.pl | 14 | ||||
-rw-r--r-- | Master/tlpkg/translations/trans.pl | 4 |
5 files changed, 21 insertions, 29 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/gui-uninstall.pl b/Master/texmf/scripts/texlive/tlmgrgui/gui-uninstall.pl index 1e881b3547a..0c889f002d0 100644 --- a/Master/texmf/scripts/texlive/tlmgrgui/gui-uninstall.pl +++ b/Master/texmf/scripts/texlive/tlmgrgui/gui-uninstall.pl @@ -17,14 +17,14 @@ if ($^O=~/^MSWin(32|64)$/i) { $lab->pack(-padx => "10m", -pady => "5m"); } else { my $lab = $back_f3->Label(-justify => 'left', - -text => __("Really remove the complete TeX Live 2009 installation?\nYour last chance to change your mind!")); + -text => __("Really remove the complete TeX Live %s installation?\nYour last chance to change your mind!", $TeXLive::TLConfig::ReleaseYear)); $lab->pack(-padx => "10m", -pady => "5m"); my $f = $back_f3->Frame; $f->pack(-padx => "10m", -pady => "5m"); - my $ok = $f->Button(-text => __("Remove TeX Live 2009"), + my $ok = $f->Button(-text => __("Remove TeX Live %s", $TeXLive::TLConfig::ReleaseYear), -state => $::action_button_state, -command => sub { system("tlmgr", "uninstall", "--force"); diff --git a/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl b/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl index d6dd99a018a..c910c7cf5c4 100755 --- a/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl +++ b/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl @@ -234,7 +234,7 @@ $mw->deiconify; if (!$::we_can_save) { my $no_write_warn = $mw->Dialog(-title => "warning", - -text => __("You don't have permissions to change the installation in any way,\nspecifically the following directory is not writable: ") . "$Master/tlpkg\n" . __("Please run this program as administrator, or contact your local admin.\n\nMost buttons will be disabled."), + -text => __("You don't have permissions to change the installation in any way,\nspecifically, the directory %s is not writable.\nPlease run this program as administrator, or contact your local admin.\n\nMost buttons will be disabled.", "$Master/tlpkg/"), -buttons => [ __("Ok") ])->Show(); } @@ -254,7 +254,7 @@ sub init_install_media { if (!defined($tlmediasrc)) { # something went badly wrong, maybe the newroot is wrong? $mw->Dialog(-title => "warning", - -text => __("Could not load the TeX Live Database from \$newroot\nIf you want to install or update packages, please try with a different package repository!\n\nFor configuration and removal you don\'t have to do anything."), + -text => __("Could not load the TeX Live Database from %s\nIf you want to install or update packages, please try with a different package repository!\n\nFor configuration and removal you don\'t have to do anything.", $newroot), -buttons => [ __("Ok") ])->Show; $location = __("...please change me..."); @allpackages = (); @@ -533,7 +533,7 @@ sub execute_action_gui { sub give_warning_window { my ($act, @args) = @_; my $sw = $mw->DialogBox(-title => __("Warning Window"), -buttons => [ __("Ok") ]); - $sw->add("Label", -text => $act . "@args" . __(": failed.\nPlease consult the log window for details.") + $sw->add("Label", -text => __("Running %s failed.\nPlease consult the log window for details.", "$act @args") )->pack(-padx => "3m", -pady => "3m"); $sw->Show; } diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl index e4cbd30516f..ef7ffa64b26 100644 --- a/Master/tlpkg/installer/install-menu-perltk.pl +++ b/Master/tlpkg/installer/install-menu-perltk.pl @@ -157,7 +157,7 @@ sub run_menu_perltk { my $row = 1; - $fr->Label(-text => __("TeX Live 2009 Installation"))->grid(-row => $row, -column => 1, -columnspan => 3); + $fr->Label(-text => __("TeX Live %s Installation", $TeXLive::TLConfig::ReleaseYear))->grid(-row => $row, -column => 1, -columnspan => 3); $row++; $fr->Label(-text => "------- " . __("Basic Information") . " -------")->grid(-row => $row, -column => 1, -columnspan => 3); @@ -371,14 +371,12 @@ sub installation_window { $f->pack; do_installation(); $return = $MENU_ALREADYDONE; - 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."); + my $t = __("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()) { - $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" . __("Add %s/texmf/doc/man to MANPATH.\nAdd %s/texmf/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'}); } $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; + #$t =~ s/\\n/\n/g; $::progressw->insert("end", "\n"); my $linechar = $::progressw->index("end"); $::progressw->markSet("finaltext", $linechar); @@ -410,8 +408,6 @@ sub menu_edit_texdir { } else { $hint_var = win32() ? '%USERPROFILE%' : '$HOME'; } - my $hint_text = __('(use ~ for %%%)'); - $hint_text =~ s/%%%/$hint_var/; if ($val =~ m!^(.*)/texlive/$texlive_release$!) { $currsel = "$1"; $addyear = 1; @@ -432,7 +428,7 @@ sub menu_edit_texdir { my $sw = $mainwindow->Toplevel(-title => __("Change variable value")); $sw->transient($mainwindow); $sw->grab(); - $sw->Label(-text => __("Enter path for") . " $key: " . $hint_text)->pack(-padx => "2m", -pady => "2m"); + $sw->Label(-text => __("Enter path for %s (use ~ for %s)", $key, $hint_var))->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, @@ -470,9 +466,7 @@ sub menu_edit_vars_value { } else { $hint_var = win32() ? '%USERPROFILE%' : '$HOME'; } - my $hint_text = __('(use ~ for %%%)'); - $hint_text =~ s/%%%/$hint_var/; - $sw->Label(-text => __("Enter path for") . " $key: " . $hint_text)->pack(-padx => "2m", -pady => "2m"); + $sw->Label(-text => __("Enter path for %s (use ~ for %s)", $key, $hint_var))->pack(-padx => "2m", -pady => "2m"); my $entry = $sw->Entry(-textvariable => $val, -width => 60); $entry->pack(-padx => "2m", -pady => "2m"); my $f = $sw->Frame; @@ -776,12 +770,12 @@ sub menu_set_schemebutton_text { sub menu_set_binbutton_text { if (!win32()) { - menu_set_text($bintextbutton, "$vars{'n_systems_selected'} " . __("out of") . " $vars{'n_systems_available'}"); + menu_set_text($bintextbutton, __("%s out of %s", $vars{'n_systems_selected'}, $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, __("%s collections out of %s (disk space required: %s MB)", $vars{'n_collections_selected'}, $vars{'n_collections_available'}, $vars{'total_size'})); } sub menu_set_pathes_text { diff --git a/Master/tlpkg/installer/install-menu-wizard.pl b/Master/tlpkg/installer/install-menu-wizard.pl index f0f9c1c571f..34d2c9dfdbc 100644 --- a/Master/tlpkg/installer/install-menu-wizard.pl +++ b/Master/tlpkg/installer/install-menu-wizard.pl @@ -140,7 +140,7 @@ sub run_menu_wizard { $ftitle->update; $ftitle->place(-x => $LEFT, -y => $TOP); - $tit = $ftitle->Label(-text => __('TeX Live 2009 Installation')); + $tit = $ftitle->Label(-text => __('TeX Live %s Installation', $TeXLive::TLConfig::ReleaseYear)); $usedfont= $tit->cget("-font"); $lineskip = $usedfont->metrics("-linespace"); @@ -179,7 +179,7 @@ sub reset_start { $counter->configure(-text => "1/5"); $prv->placeForget; - my $inf = $fmain->Label(-text => __("Welcome to the installation of TeX Live 2009\nhttp://tug.org/texlive\n\nThis wizard will guide you through the installation.\n\nFor an advanced, customizable installation, please consult\nthe web pages or installation guide.") . "\n" . (win32() ? __("Or use install-tl-advanced.bat") : __("Or use the argument --gui perltk to install-tl.")), -justify => "left"); + my $inf = $fmain->Label(-text => __("Welcome to the installation of TeX Live %s\nhttp://tug.org/texlive\n\nThis wizard will guide you through the installation.\n\nFor an advanced, customizable installation, please consult\nthe web pages or installation guide.", $TeXLive::TLConfig::ReleaseYear) . "\n" . (win32() ? __("Or use install-tl-advanced.bat") : __("Or use the argument --gui perltk to install-tl.")), -justify => "left"); $inf->place(-x => 0, -y => 100); $nxt->configure(-text => __("Next >") , -command => \&ask_path ); @@ -383,7 +383,7 @@ sub ask_go { $_->destroy; } $counter->configure(-text => "4/5"); - my $inf = $fmain->Label(-justify => "left", -text => __("We are ready to install TeX Live 2009.\nThe following settings will be used.\nIf you want to change something please go back,\notherwise press the \"Install\" button.")); + my $inf = $fmain->Label(-justify => "left", -text => __("We are ready to install TeX Live %s.\nThe following settings will be used.\nIf you want to change something please go back,\notherwise press the \"Install\" button.", $TeXLive::TLConfig::ReleaseYear)); $inf->place(-x => 0, -y => 80); @@ -456,14 +456,12 @@ sub wizard_installation_window { do_installation(); $::progress->value(110); $return = $MENU_ALREADYDONE; - 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."); + my $t = __("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()) { - $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" . __("Add %s/texmf/doc/man to MANPATH.\nAdd %s/texmf/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'}); } $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; + #$t =~ s/\\n/\n/g; my $linechar = $::progressw->index("end"); $::progressw->markSet("finaltext", $linechar); $::progressw->markGravity("finaltext", "left"); diff --git a/Master/tlpkg/translations/trans.pl b/Master/tlpkg/translations/trans.pl index 9fa8cc1ff9f..6f4055eb9d0 100644 --- a/Master/tlpkg/translations/trans.pl +++ b/Master/tlpkg/translations/trans.pl @@ -68,7 +68,7 @@ our %TRANS; # # __ takes a string argument and checks that it -sub __ ($) { +sub __ ($@) { my $key = shift; my $ret; # if no $::lang is set just return without anything @@ -97,7 +97,7 @@ sub __ ($) { $ret =~ s/\\n/\n/g; $ret =~ s/\\"/"/g; $ret =~ s/\\\\/\\/g; - return $ret; + return sprintf($ret, @_); } if (($::lang ne "en") && ($::lang ne "C")) { |