summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/any.pm2
-rw-r--r--perl-install/c/stuff.pm1
-rw-r--r--perl-install/install_steps.pm22
3 files changed, 20 insertions, 5 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index d109688e7..0d27c8eaa 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -818,8 +818,6 @@ sub runlevel {
}
}
-sub to_utf8 { c::iconv($_[0], $lang::charset || 'ISO-8859-1', "utf-8") }
-
sub report_bug {
my ($prefix, @other) = @_;
diff --git a/perl-install/c/stuff.pm b/perl-install/c/stuff.pm
index b6cbd6128..918abee6c 100644
--- a/perl-install/c/stuff.pm
+++ b/perl-install/c/stuff.pm
@@ -11,6 +11,7 @@ $VERSION = '0.01';
bootstrap c::stuff $VERSION;
sub from_utf8 { iconv($_[0], "utf-8", standard_charset()) }
+sub to_utf8 { iconv($_[0], standard_charset(), "utf-8") }
sub headerGetEntry {
my ($h, $q) = @_;
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 5eec8ef0a..f797f9ed7 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -446,9 +446,25 @@ Consoles 1,3,4,7 may also contain interesting information";
# log::l("updating kde icons according to available devices");
# install_any::kdeicons_postinstall($o->{prefix});
- if ($o->{lang} !~ /^(ja|ko|zh|ru|th|vi|be|bg)/) {
- my $welcome = any::to_utf8(_("Welcome to %s", '%n'));
- substInFile { s/^(GreetString)=.*/$1=$welcome/ } "$o->{prefix}/usr/share/config/kdm/kdmrc";
+ if ($o->{lang} =~ /^(zh_TW|th|vi|be|bg)/) {
+ #- skip since we don't have the right font (it badly fails at least for zh_TW)
+ } elsif (my $LANG = lang::lang2LANG($o->{lang})) {
+ my $kdmrc = "$o->{prefix}/usr/share/config/kdm/kdmrc";
+
+ my $charset = lang::lang2charset($o->{lang});
+ $charset = '' if member($charset, 'iso-8859-1', 'iso-8859-15'); #- keep the default for those
+ $charset = 'jisx0208.1983-0' if $charset eq 'jisx0208';
+ $charset = 'ksc5601.1987-0' if $charset eq 'ksc5601';
+
+ my $welcome = c::to_utf8 (_("Welcome to %s", '%n'));
+ substInFile {
+ s/^(GreetString)=.*/$1=$welcome/;
+ s/^(Language)=.*/$1=$LANG/;
+ s/^(StdFont)=.*/$1=*,12,5,$charset,50,0/;
+ s/^(FailFont)=.*/$1=*,12,5,$charset,75,0/;
+ s/^(GreetFont)=.*/$1=*,24,5,$charset,50,0/;
+ } "$o->{prefix}/usr/share/config/kdm/kdmrc";
+
}
install_any::disable_user_view($o->{prefix}) if $o->{security} >= 3 || $o->{authentication}{NIS};
run_program::rooted($o->{prefix}, "kdeDesktopCleanup");