[PC-BSD Commits] r411 - pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts

svn at pcbsd.org svn at pcbsd.org
Tue Jul 3 10:22:21 PDT 2007


Author: kris
Date: 2007-07-03 18:22:20 +0100 (Tue, 03 Jul 2007)
New Revision: 411

Modified:
   pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.Localize.sh
Log:

Updated localize script to setup profile and csh.cshrc to set UTF-8 LANG /
LC_CTYPE properly



Modified: pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.Localize.sh
===================================================================
--- pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.Localize.sh	2007-07-03 17:08:15 UTC (rev 410)
+++ pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.Localize.sh	2007-07-03 17:22:20 UTC (rev 411)
@@ -10,125 +10,162 @@
 FILE="$LANG-kde-i18n-*.tbz"
 
 
-# Add the KDE Package for this LANG & Do any Overrides
+# Setup the presets for the specific lang
 case $LANG in
    af) COUNTRY="C" 
        SETLANG="af"
+       LOCALE="af_ZA" 
        SETKDMLANG="af" ;;
    ar) COUNTRY="C" 
        SETLANG="ar"
+       LOCALE="en_US"
        SETKDMLANG="ar" ;;
    az) COUNTRY="C" 
        SETLANG="az"
+       LOCALE="en_US"
        SETKDMLANG="az" ;;
    ca) COUNTRY="es" 
        SETLANG="es:ca"
+       LOCALE="ca_ES"
        SETKDMLANG="es:ca" ;;
    bn) COUNTRY="bn" 
        SETLANG="bn"
+       LOCALE="en_US"
        SETKDMLANG="bn" ;;
    bg) COUNTRY="bg" 
        SETLANG="bg"
+       LOCALE="bg_BG"
        SETKDMLANG="bg" ;;
    da) COUNTRY="dk" 
        SETLANG="da"
+       LOCALE="da_DK"
        SETKDMLANG="da" ;;
    de) COUNTRY="de" 
        SETLANG="de"
+       LOCALE="de_DE"
        SETKDMLANG="de" ;;
    en_GB) COUNTRY="gb" 
        SETLANG="en_GB:cy"
+       LOCALE="en_GB"
        SETKDMLANG="en_GB:cy" ;;
    el) COUNTRY="gr" 
        SETLANG="el:gr"
+       LOCALE="el_GR"
        SETKDMLANG="el:gr" ;;
    es) COUNTRY="es" 
        SETLANG="es"
+       LOCALE="es_ES"
        SETKDMLANG="es" ;;
    es_LA) COUNTRY="us" 
           SETLANG="es:en_US"
+          LOCALE="es_ES"
           SETKDMLANG="es:en_US" ;;
    et) COUNTRY="ee" 
        SETLANG="et"
+       LOCALE="et_EE"
        SETKDMLANG="et" ;;
    fr) COUNTRY="fr" 
        SETLANG="fr"
+       LOCALE="fr_FR"
        SETKDMLANG="fr" ;;
    he) COUNTRY="il" 
        SETLANG="he:ar"
+       LOCALE="he_IL"
        SETKDMLANG="he:ar" ;;
    hr) COUNTRY="hr" 
        SETLANG="hr"
+       LOCALE="hr_HR"
        SETKDMLANG="hr" ;;
    hu) COUNTRY="hu" 
        SETLANG="hu"
+       LOCALE="hu_HU"
        SETKDMLANG="hu" ;;
    it) COUNTRY="it" 
        SETLANG="it"
+       LOCALE="it_IT"
        SETKDMLANG="it" ;;
    ja) COUNTRY="jp" 
        SETLANG="ja"
+       LOCALE="ja_JP"
        SETKDMLANG="ja" ;;
    ko) COUNTRY="kr" 
        SETLANG="ko"
+       LOCALE="ko_KR"
        SETKDMLANG="ko" ;;
    nl) COUNTRY="nl" 
        SETLANG="nl"
+       LOCALE="nl_NL"
        SETKDMLANG="nl" ;;
    nn) COUNTRY="no" 
        SETLANG="nn"
+       LOCALE="en_US"
        SETKDMLANG="nn" ;;
    pl) COUNTRY="pl" 
        SETLANG="pl"
+       LOCALE="pl_PL"
        SETKDMLANG="pl" ;;
    pt) COUNTRY="pt" 
        SETLANG="pt"
+       LOCALE="pt_PT"
        SETKDMLANG="pt" ;;
    pt_BR) COUNTRY="br" 
           SETLANG="pt_BR"
+          LOCALE="pt_BR"
           SETKDMLANG="pt_BR" ;;
    ru) COUNTRY="ru" 
        SETLANG="ru"
+       LOCALE="ru_RU"
        SETKDMLANG="ru" ;;
    sk) COUNTRY="sk" 
        SETLANG="sk"
+       LOCALE="sk_SK"
        SETKDMLANG="sk" ;;
    sv) COUNTRY="se" 
        SETLANG="sv"
+       LOCALE="sv_SE"
        SETKDMLANG="sv" ;;
    uk) COUNTRY="ua" 
        SETLANG="uk"
+       LOCALE="uk_UA"
        SETKDMLANG="uk" ;;
    vi) COUNTRY="vn" 
        SETLANG="vi"
+       LOCALE="en_US"
        SETKDMLANG="vi" ;;
    zh_CN) COUNTRY="cn" 
           SETLANG="zh_CN"
+          LOCALE="zh_CN"
           SETKDMLANG="zh_CN" ;;
    zh_TW) COUNTRY="tw" 
           SETLANG="zh_TW"
+          LOCALE="zh_TW"
           SETKDMLANG="zh_TW" ;;
    *) COUNTRY="C"
       SETLANG="${LANG}"
+      LOCALE="en_US"
       SETKDMLANG="${LANG}" ;;
 esac
 
 #Change the skel files
+##########################################################################
 sed -e "s/Country=us/Country=${COUNTRY}/g" /mnt/usr/share/skel/.kde/share/config/kdeglobals  > /mnt/tmp/sed
 
 mv /mnt/tmp/sed /mnt/usr/share/skel/.kde/share/config/kdeglobals
 
 # Change the language
+##########################################################################
 sed -e "s/Language=en_US/Language=${SETLANG}/g" /mnt/usr/share/skel/.kde/share/config/kdeglobals > /mnt/tmp/sed
 
 mv /mnt/tmp/sed /mnt/usr/share/skel/.kde/share/config/kdeglobals 
 
 # Change the keyboard layout tool
+##########################################################################
 sed -e "s/CHANGEME/${KEYLAYOUT},us/g" /mnt/usr/share/skel/.kde/share/config/kxkbrc > /mnt/tmp/sed
 
 mv /mnt/tmp/sed /mnt/usr/share/skel/.kde/share/config/kxkbrc
 
 #Change the root files
+##########################################################################
 sed -e "s/Country=C/Country=${COUNTRY}/g" /mnt/root/.kde/share/config/kdeglobals  > /mnt/tmp/sed
 
 mv /mnt/tmp/sed /mnt/root/.kde/share/config/kdeglobals
@@ -138,14 +175,26 @@
 mv /mnt/tmp/sed /mnt/root/.kde/share/config/kdeglobals 
 
 #Change KDM Langs
-
+##########################################################################
 sed -e "s/Language=en_US/Language=${SETKDMLANG}/g" /mnt/usr/local/share/config/kdm/kdmrc > /mnt/tmp/sed
 
 mv /mnt/tmp/sed /mnt/usr/local/share/config/kdm/kdmrc
+
+# Change the profile and csh.cshrc file
+###########################################################################
+if [ "${LOCALE}" != "en_US" ]
+then
+
+sed -e "s/en_US/${LOCALE}/g" /mnt/etc/profile > /mnt/tmp/sed
+mv /mnt/tmp/sed /mnt/etc/profile
+
+sed -e "s/en_US/${LOCALE}/g" /mnt/etc/csh.cshrc > /mnt/tmp/sed
+mv /mnt/tmp/sed /mnt/etc/csh.cshrc
  
+fi
 
 # Change User Langs
-
+###########################################################################
 cd /mnt/usr/home
 for i in `ls`
 do



More information about the Commits mailing list