diff options
Diffstat (limited to 'Master/texmf')
-rwxr-xr-x | Master/texmf/scripts/texlive/tlmgr.pl | 6 | ||||
-rw-r--r-- | Master/texmf/scripts/texlive/tlmgrgui.pl | 23 |
2 files changed, 21 insertions, 8 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index f3852703e6b..783b7e970c6 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -4731,6 +4731,12 @@ sub write_config_file # if the value has actually changed $tlmgr_config_file->value($k, $config{$k}); } + # make sure that deleted config entries are carried over + for my $k ($tlmgr_config_file->keys) { + if (not(defined($config{$k}))) { + $tlmgr_config_file->delete_key($k); + } + } if ($tlmgr_config_file->is_changed) { $tlmgr_config_file->save; } diff --git a/Master/texmf/scripts/texlive/tlmgrgui.pl b/Master/texmf/scripts/texlive/tlmgrgui.pl index 653ce846bcb..29355a6119a 100644 --- a/Master/texmf/scripts/texlive/tlmgrgui.pl +++ b/Master/texmf/scripts/texlive/tlmgrgui.pl @@ -1329,12 +1329,12 @@ sub do_gui_language_setting { $sw->transient($mw); $sw->grab(); - my $var = "System"; + my $var = __("System default"); $var = $config{"gui-lang"} if (defined($config{"gui-lang"})); $var = $opts{"gui-lang"} if (defined($opts{"gui-lang"})); $var = (defined($code_lang{$var}) ? $code_lang{$var} : $var); my $opt = $sw->BrowseEntry(-label => __("Default language for GUI:"), -variable => \$var); - $opt->insert(0,__("System default")); + $opt->insert(0, __("System default")); my @ll; foreach my $p (<$Master/tlpkg/translations/*.po>) { $p =~ s!^.*translations/!!; @@ -1350,13 +1350,20 @@ sub do_gui_language_setting { my $f = $sw->Frame; my $okbutton = $f->Button(-text => __("Ok"), -command => sub { - for my $l (keys %code_lang) { - if ($code_lang{$l} eq $var) { - if ($config{'gui-lang'} ne $l) { - $config{'gui-lang'} = $l; - write_config_file(); + if ($var eq __("System default")) { + # we have to remove the setting in the config file + delete($config{'gui-lang'}); + write_config_file(); + } else { + for my $l (keys %code_lang) { + if ($code_lang{$l} eq $var) { + if (!defined($config{'gui-lang'}) || + (defined($config{'gui-lang'}) && ($config{'gui-lang'} ne $l))) { + $config{'gui-lang'} = $l; + write_config_file(); + } + last; } - last; } } $sw->destroy; |