diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-04-25 12:26:16 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-04-25 12:26:16 +0000 |
commit | 126777bc019a54afb4ec51299f2cf9d2841698aa (patch) | |
tree | 97f76e571902ead55ba138f1156a4b4f00b9b779 /perl-install/install/share/generate-xlocales | |
parent | f1f67448efc714873378dfeb8279fae68054a90a (diff) | |
download | drakx-backup-do-not-use-126777bc019a54afb4ec51299f2cf9d2841698aa.tar drakx-backup-do-not-use-126777bc019a54afb4ec51299f2cf9d2841698aa.tar.gz drakx-backup-do-not-use-126777bc019a54afb4ec51299f2cf9d2841698aa.tar.bz2 drakx-backup-do-not-use-126777bc019a54afb4ec51299f2cf9d2841698aa.tar.xz drakx-backup-do-not-use-126777bc019a54afb4ec51299f2cf9d2841698aa.zip |
re-sync after the big svn loss
Diffstat (limited to 'perl-install/install/share/generate-xlocales')
-rwxr-xr-x | perl-install/install/share/generate-xlocales | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/perl-install/install/share/generate-xlocales b/perl-install/install/share/generate-xlocales new file mode 100755 index 000000000..1bf60d549 --- /dev/null +++ b/perl-install/install/share/generate-xlocales @@ -0,0 +1,67 @@ +#!/usr/bin/perl +# +# Copyright (C) 2006 Mandriva +# Pablo Saraxtaga <pablo@mandriva.com> +# Thierry Vignaud <tvignaud@mandriva.com> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +use strict; +use lib qw(..); # for lang +# perl_checker: use lib qw(/usr/lib/libDrakX/) +use MDK::Common; +use lang; + +my $prefix = $ARGV[0]; + +my $dir = "$prefix/usr/share/X11/locale"; +mkdir_p($dir); + +output("$dir/locale.alias", +qq(# automatically build list; only valid for install +# since gtk+-2 is used, which uses unicode internally, +# all locales to UTF-8 ones +), + sort(uniq((map { "$_:\t\t\ten_US.UTF-8\n" } lang::list_langs()), + (map { "$_:\t\t\ten_US.UTF-8\n" } (@lang::locales)), + qq(zh_CN.gb2312:\t\t\ten_US.UTF-8 +zh_CN.GB2312:\t\t\ten_US.UTF-8 +zh_CN.Big5:\t\t\ten_US.UTF-8 +), + ), + ), + ); + +output("$dir/locale.dir", + qq(# automatically build list ; only valid for install +C/XLC_LOCALE: C +en_US.UTF-8/XLC_LOCALE: UTF-8 +iso8859-1/XLC_LOCALE: ISO8859-1 +), + map { s/(.*_..)(\.[^@]*)*(\@.*)*$/${1}.UTF-8${3}/; "en_US.UTF-8/XLC_LOCALE: $_\n" } @lang::locales + ); + + +output("$dir/compose.dir", + qq(# list automatically build list ; only valid for install +C/Compose: C +en_US.UTF-8/Compose: UTF-8 +iso8859-1/Compose: ISO8859-1 +), + map { + s/(.*_..)(\.[^@]*)*(\@.*)*$/${1}.UTF-8${3}/; + "en_US.UTF-8/Compose: $_\n"; + } @lang::locales + ); |