diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-11-30 15:24:30 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-11-30 15:24:30 +0000 |
commit | b3ee2185f78c8b1373eb5060a6b72a5be10b0600 (patch) | |
tree | 357efdcb5a1c877b9508a4a3f5e20a22a4f4e015 | |
parent | c6a9ad9d06312f3840fe3bd2c87668db43a017c5 (diff) | |
download | drakx-b3ee2185f78c8b1373eb5060a6b72a5be10b0600.tar drakx-b3ee2185f78c8b1373eb5060a6b72a5be10b0600.tar.gz drakx-b3ee2185f78c8b1373eb5060a6b72a5be10b0600.tar.bz2 drakx-b3ee2185f78c8b1373eb5060a6b72a5be10b0600.tar.xz drakx-b3ee2185f78c8b1373eb5060a6b72a5be10b0600.zip |
- localedrake:
o restrict the proposed input-methods for each language
(backport from trunk)
-rw-r--r-- | perl-install/NEWS | 2 | ||||
-rw-r--r-- | perl-install/any.pm | 2 | ||||
-rw-r--r-- | perl-install/install/NEWS | 1 | ||||
-rw-r--r-- | perl-install/lang.pm | 35 |
4 files changed, 25 insertions, 15 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS index f7b5d6391..e7c13284d 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,3 +1,5 @@ +- localedrake: + o restrict the proposed input-methods for each language - bootloader-config must not need network::network from libdrakx-net - localedrake: o do propose "Suisse" after selecting french language (#34675) diff --git a/perl-install/any.pm b/perl-install/any.pm index efdc1b615..8c9dea9f3 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -1060,7 +1060,7 @@ sub selectCountry { list => [ @countries ], advanced => scalar(@best), changed => sub { $other = 1 } }, { val => \$locale->{IM}, type => 'combo', label => N("Input method:"), sort => 0, separator => '|', - list => [ '', sort(lang::get_ims()) ], + list => [ '', lang::get_ims($locale->{lang}) ], format => sub { $_[0] ? uc($_[0] =~ /(.*)\+(.*)/ ? "$1|$1+$2" : $_[0]) : N("None") }, advanced => !$locale->{IM}, }, diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 02bb51fd3..5c8119cf1 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,3 +1,4 @@ +- restrict the proposed input-methods for each language - do propose "Suisse" after selecting french language (#34675) Version 10.4.238 - 5 October 2007, by Pascal "Pixel" Rigaux diff --git a/perl-install/lang.pm b/perl-install/lang.pm index 555d811a8..a3c2b0e5b 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -549,16 +549,6 @@ my @scim_bridges_qt_packages; # keep the 'packages' field in sync with share/rpmsrate: my %IM_config = ( - ami => { - XIM => 'Ami', - #- NOTE: there are several possible versions of ami, for the different - #- desktops (kde, gnome, etc). So XIM_PROGRAM is not defined; it will - #- be the xinitrc script, XIM section, that will choose the right one - #- XIM_PROGRAM => 'ami', - XMODIFIERS => '@im=Ami', - GTK_IM_MODULE => 'xim', - QT_IM_MODULE => 'xim', - }, chinput => { GTK_IM_MODULE => 'xim', QT_IM_MODULE => 'xim', @@ -570,6 +560,7 @@ my %IM_config = 'zh_HK' => 'chinput -big5', 'zh_TW' => 'chinput -big5', }, + langs => 'zh', packages => { generic => sub { 'miniChinput' } }, }, fcitx => { @@ -578,6 +569,7 @@ my %IM_config = XIM => 'fcitx', XIM_PROGRAM => 'fcitx', XMODIFIERS => '@im=fcitx', + langs => 'zh', }, gcin => { GTK_IM_MODULE => 'gcin', @@ -585,6 +577,7 @@ my %IM_config = XIM => 'gcin', XIM_PROGRAM => 'gcin', XMODIFIERS => '@im=gcin', + langs => 'zh', }, 'im-ja' => { GTK_IM_MODULE => 'im-ja', @@ -592,6 +585,7 @@ my %IM_config = XIM => 'im-ja-xim-server', XIM_PROGRAM => 'im-ja-xim-server', XMODIFIERS => '@im=im-ja-xim-server', + langs => 'ja', }, kinput2 => { @@ -600,6 +594,7 @@ my %IM_config = XIM => 'kinput2', XIM_PROGRAM => 'kinput2', XMODIFIERS => '@im=kinput2', + langs => 'ja', packages => { generic => sub { 'kinput2-wnn' } }, }, nabi => { @@ -608,6 +603,7 @@ my %IM_config = XIM => 'nabi', XIM_PROGRAM => 'nabi', XMODIFIERS => '@im=nabi', + langs => 'ko', }, oxim => { @@ -616,6 +612,7 @@ my %IM_config = XIM => 'oxim', XIM_PROGRAM => 'oxim', XMODIFIERS => '@im=oxim', # '@im=SCIM' is broken for now + langs => 'zh_TW', packages => { generic => sub { 'oxim' } }, }, 'scim' => { @@ -668,6 +665,7 @@ my %IM_config = XIM => 'uim', XIM_PROGRAM => 'uim-xim', XMODIFIERS => '@im=uim', + langs => 'ja', packages => { generic => sub { qw(uim-gtk uim) } }, }, xcin => { @@ -676,18 +674,16 @@ my %IM_config = XMODIFIERS => '@im=xcin-zh_TW', GTK_IM_MODULE => 'xim', QT_IM_MODULE => 'xim', + langs => 'zh', }, 'x-unikey' => { GTK_IM_MODULE => 'xim', QT_IM_MODULE => 'xim', XMODIFIERS => '@im=unikey', + langs => 'vi', }, ); -sub get_ims() { keys %IM_config } - - - #------------------------------------------------------------- # # Locale configuration regarding encoding/IM @@ -714,6 +710,17 @@ my %IM_locale_specific_config = ( ); +sub get_ims { + my ($lang) = @_; + my $main_lang = analyse_locale_name($lang)->{main}; + + sort grep { + my $langs = $IM_config{$_}{langs}; + !$langs || intersection([ $lang, $main_lang ], + [ split(' ', $langs) ]); + } keys %IM_config; +} + sub get_default_im { my ($lang) = @_; find { |