ext-sources/0020.pre-localization
author fujiwara
Wed, 04 Feb 2009 08:36:25 +0000
changeset 15009 9cd4a1ffe12d
child 17220 3500be0f55c7
permissions -rw-r--r--
2009-02-04 Takao Fujiwara <[email protected]> * SUNWdbus.spec: Updated to rename 0005.dbus. * SUNWgnome-dtlogin-integration.spec: Updated to add SUNWdesktop-startup * ext-sources/dtstart: Updated to work with xinitrc.d * ext-sources/0010.env: * ext-sources/0020.pre-localization: * ext-sources/0060.sockets: * ext-sources/0110.fonts: * ext-sources/0120.xrdb: * ext-sources/0210.im: Added * ext-sources/0070.dbus: Renamed * patches/SUNWgnome-dtlogin-integration-01-g11n-migration.diff: Added

#!/bin/sh
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License").  You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#


if [ "x$LC_ALL" = x -a "x$LANG" = x -o "x$LANG" = xC ]; then
  :
else
# Uncomment if you need 6757628
# European locales have LC_MESSAGES=C in /etc/default/init
#  LC_MESSAGES=$LANG; export LC_MESSAGES
  :
fi

# To determine the character set used for filenames with
# glib's g_filename_to/from_utf8() functions, we set the
# environment variables G_FILENAME_ENCODING and G_BROKEN_FILENAMES.
#
# G_BROKEN_FILENAMES, when set, lets the functions take the
# character set for the current locale for filename's encoding.
#
# G_FILENAME_ENCODING, which is introduced to glib 2.3.x and later, may be
# set to a comma-separated list of character set names.
# The special token "@locale" is taken to mean the character set
# for the current locale. The first character set from the list is taken
# as the filename encoding.
#
# If G_FILENAME_ENCODING is not set, but G_BROKEN_FILENAMES is, the
# character set of the current locale is taken as the filename encoding.

G_BROKEN_FILENAMES=yes
export G_BROKEN_FILENAMES
G_FILENAME_ENCODING=@locale,UTF-8
export G_FILENAME_ENCODING

# Fixes 6583891
case $LANG in
ja*) VTE_CJK_WIDTH=1; export VTE_CJK_WIDTH;;
ko*) VTE_CJK_WIDTH=1; export VTE_CJK_WIDTH;;
zh*) VTE_CJK_WIDTH=1; export VTE_CJK_WIDTH;;
*) ;;
esac

# Fixes 6555226
if [ "x$LANG" = "xzh" ] ; then
  LANGUAGE=zh:zh_CN.EUC
  export LANGUAGE
fi

# Locale specific .desktop files
if [ -d /usr/share/locale/$LANG/xdg ] ; then
  XDG_DATA_DIRS=${XDG_DATA_DIRS:-"/usr/share"}
  XDG_DATA_DIRS=${XDG_DATA_DIRS}:/usr/share/locale/$LANG/xdg
  export XDG_DATA_DIRS
fi