summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-02-22 13:43:44 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-02-22 13:43:44 +0000
commitfdde198ca5e44c8de0a2d6b7b654fdec378b43c1 (patch)
tree58b36d3368833144ea6cc211aa49f4d6c6e6de6d /perl-install
parent499805090758ee226b80e12257f8c4a9d6d90e6a (diff)
downloaddrakx-backup-do-not-use-fdde198ca5e44c8de0a2d6b7b654fdec378b43c1.tar
drakx-backup-do-not-use-fdde198ca5e44c8de0a2d6b7b654fdec378b43c1.tar.gz
drakx-backup-do-not-use-fdde198ca5e44c8de0a2d6b7b654fdec378b43c1.tar.bz2
drakx-backup-do-not-use-fdde198ca5e44c8de0a2d6b7b654fdec378b43c1.tar.xz
drakx-backup-do-not-use-fdde198ca5e44c8de0a2d6b7b654fdec378b43c1.zip
not translating in console installs (esp. newt) when the font is missing
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install2.pm2
-rw-r--r--perl-install/install_steps.pm2
-rw-r--r--perl-install/install_steps_interactive.pm7
-rw-r--r--perl-install/lang.pm11
4 files changed, 16 insertions, 6 deletions
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 05c0f2646..fd75df2b8 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -517,7 +517,7 @@ sub main {
#- needed very early for install_steps_gtk
eval { ($o->{mouse}, @{$o->{wacom} = []}) = mouse::detect() } unless $o->{nomouseprobe} || $o->{mouse};
- $o->{lang} = lang::set($o->{lang}); #- mainly for defcfg
+ $o->{lang} = lang::set($o->{lang}) if $o->{lang} ne 'en_US'; #- mainly for defcfg
start_i810fb();
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 41b59882e..76bd0e08f 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -85,7 +85,7 @@ sub set_help { 1 }
#------------------------------------------------------------------------------
sub selectLanguage {
my ($o) = @_;
- lang::set($o->{lang});
+ lang::set($o->{lang}, !$o->isa('interactive_gtk'));
$o->{langs} ||= { $o->{lang} => 1 };
log::l("selectLanguage: pack_langs ", lang::pack_langs($o->{langs}));
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 28a6446d6..1458e40b1 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -87,7 +87,8 @@ sub selectLanguage {
$o->charsetChanged;
- $o->ask_warn('', formatAlaTeX(
+ if ($o->isa('interactive_gtk')) {
+ $o->ask_warn('', formatAlaTeX(
"If you see this message it is because you choose a language for
which DrakX does not include a translation yet; however the fact
that it is listed means there is some support for it anyway.
@@ -96,6 +97,10 @@ That is, once GNU/Linux will be installed, you will be able to at
least read and write in that language; and possibly more (various
fonts, spell checkers, various programs translated etc. that
varies from language to language).")) if $o->{lang} !~ /^en/ && !lang::load_mo();
+ } else {
+ $o->ask_warn('', _("The characters of your language can't be displayed in console,
+so the messages will be displayed in english during installation")) if $ENV{LANGUAGE} eq 'C';
+ }
unless ($o->{useless_thing_accepted}) {
$o->set_help('license');
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index 52c6c968d..857f97838 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -544,7 +544,7 @@ sub charset2kde_charset {
}
sub set {
- my ($lang) = @_;
+ my ($lang, $translate_for_console) = @_;
if ($lang && !exists $languages{$lang}) {
#- try to find the best lang
@@ -596,9 +596,14 @@ sub set {
$ENV{LC_CTYPE} = lang2LANG($lang);
$ENV{LC_MESSAGES} = lang2LANG($lang);
$ENV{LANG} = lang2LANG($lang);
- $ENV{LANGUAGE} = lang2LANGUAGE($lang);
- load_mo();
+ if ($translate_for_console && $lang =~ /^(ko|ja|zh|th)/) {
+ log::l("not translating in console");
+ $ENV{LANGUAGE} = 'C';
+ } else {
+ $ENV{LANGUAGE} = lang2LANGUAGE($lang);
+ }
+ load_mo() ;
} else {
# stick with the default (English) */
delete $ENV{LANG};