diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2003-01-22 11:57:03 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2003-01-22 11:57:03 +0000 |
commit | 1d922c8c7778f4fd5f0b7d592d102109e20835c1 (patch) | |
tree | 7439fc759ca1428e7ba4d4eec919e5d58d7e13d4 | |
parent | 0b2abe1abda411d0333a53bab0bcec18eccb2042 (diff) | |
download | drakx-1d922c8c7778f4fd5f0b7d592d102109e20835c1.tar drakx-1d922c8c7778f4fd5f0b7d592d102109e20835c1.tar.gz drakx-1d922c8c7778f4fd5f0b7d592d102109e20835c1.tar.bz2 drakx-1d922c8c7778f4fd5f0b7d592d102109e20835c1.tar.xz drakx-1d922c8c7778f4fd5f0b7d592d102109e20835c1.zip |
fix accents characters displaying in console mode during install:
- convert translations into utf8 only during install && if using gtk
- explicitely bind the codeset to the specified locale's encoding because
during install they are reported as utf8
-rw-r--r-- | perl-install/c/stuff.xs.pl | 10 | ||||
-rw-r--r-- | perl-install/common.pm | 2 | ||||
-rw-r--r-- | perl-install/lang.pm | 4 |
3 files changed, 7 insertions, 9 deletions
diff --git a/perl-install/c/stuff.xs.pl b/perl-install/c/stuff.xs.pl index d5b711bd6..403735ae2 100644 --- a/perl-install/c/stuff.xs.pl +++ b/perl-install/c/stuff.xs.pl @@ -178,9 +178,9 @@ setMouseLive(display, type, emulate3buttons) } '; -if ($ENV{C_DRAKX}) { print ' +print ' SV * -dgettext(domainname, msgid) +dgettext_utf8(domainname, msgid) char * domainname char * msgid @@ -194,17 +194,11 @@ dgettext(domainname, msgid) OUTPUT: RETVAL -' } else { print ' - char * dgettext(domainname, msgid) char * domainname char * msgid -' } - -print ' - int add_partition(hd, start_sector, size_sector, part_number) int hd diff --git a/perl-install/common.pm b/perl-install/common.pm index 3948cf7f9..f486660d4 100644 --- a/perl-install/common.pm +++ b/perl-install/common.pm @@ -55,7 +55,7 @@ sub translate { my ($s) = @_; $s or return ''; foreach ('libDrakX', @::textdomains) { - my $s2 = c::dgettext($_, $s); + my $s2 = $::isInstall && UNIVERSAL::isa($::o, 'interactive::gtk') ? c::dgettext_utf8($_, $s) : c::dgettext($_, $s); return $s2 if $s ne $s2; } $s; diff --git a/perl-install/lang.pm b/perl-install/lang.pm index 53073a139..52a6fd826 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -825,6 +825,10 @@ sub load_console_font { run_program::run(if_($ENV{LD_LOADER}, $ENV{LD_LOADER}), 'consolechars', '-v', '-f', $name || 'lat0-sun16', if_($sfm, '-u', $sfm), if_($acm, '-m', $acm)); + + #- in console mode install, ensure we'll get translations in the right codeset + #- (charset of locales reported by the glibc are UTF-8 during install) + $acm and c::bind_textdomain_codeset('libDrakX', lang2charset($lang)); } sub get_x_fontset { |