[PC-BSD Commits] r5709 - pcbsd/trunk/pc-sysinstall/backend

svn at pcbsd.org svn at pcbsd.org
Tue Dec 29 10:15:25 PST 2009


Author: kris
Date: 2009-12-29 10:15:25 -0800 (Tue, 29 Dec 2009)
New Revision: 5709

Modified:
   pcbsd/trunk/pc-sysinstall/backend/functions-localize.sh
Log:

Updated localization functions of pc-sysinstall, fixing bugs with layout switcher in KDE, wrong
lang getting set, etc



Modified: pcbsd/trunk/pc-sysinstall/backend/functions-localize.sh
===================================================================
--- pcbsd/trunk/pc-sysinstall/backend/functions-localize.sh	2009-12-29 17:56:30 UTC (rev 5708)
+++ pcbsd/trunk/pc-sysinstall/backend/functions-localize.sh	2009-12-29 18:15:25 UTC (rev 5709)
@@ -17,13 +17,13 @@
 {
   #Change the skel files
   ##########################################################################
-  sed -i.bak "s/Country=C/Country=${COUNTRY}/g" ${FSMNT}/usr/share/skel/.kde4/share/config/kdeglobals
+  sed -i.bak "s/Country=us/Country=${COUNTRY}/g" ${FSMNT}/usr/share/skel/.kde4/share/config/kdeglobals
 
-  sed -i.bak "s/Language=en_US.UTF-8S/Language=${SETLANG}/g" ${FSMNT}/usr/share/skel/.kde4/share/config/kdeglobals
+  sed -i.bak "s/Language=en_US/Language=${LOCALE}/g" ${FSMNT}/usr/share/skel/.kde4/share/config/kdeglobals
 
   #Change KDM Langs
   ##########################################################################
-  sed -i.bak "s/Language=/Language=${SETKDMLANG}/g" ${FSMNT}/usr/local/kde4/share/config/kdm/kdmrc
+  sed -i.bak "s/Language=en_US/Language=${LOCALE}.UTF-8/g" ${FSMNT}/usr/local/kde4/share/config/kdm/kdmrc
 
 };
 
@@ -35,6 +35,7 @@
   if [ -e "${KXKBRC}" ]
   then
     sed -i.bak "s/Model=pc104/Model=${MODEL}/" ${KXKBRC}
+    sed -i.bak "s/CHANGEME/${SETLANG}/" ${KXKBRC}
   fi
 
 };
@@ -204,6 +205,10 @@
        SETLANG="ru"
        LOCALE="ru_RU"
        ;;
+   sl) COUNTRY="sl"
+       SETLANG="sl"
+       LOCALE="sl_SL"
+       ;;
    sk) COUNTRY="sk"
        SETLANG="sk"
        LOCALE="sk_SK"
@@ -229,7 +234,7 @@
           LOCALE="zh_TW"
        ;;
    *) COUNTRY="C"
-      SETLANG="${LANG}"
+      SETLANG="${TARGETLANG}"
       LOCALE="en_US"
       ;;
   esac
@@ -276,6 +281,7 @@
     then
 
       # Set our country / lang / locale variables
+      get_value_from_string "$line"
       localize_get_codes ${VAL}
 
       get_value_from_string "$line"
@@ -293,6 +299,9 @@
     then
       get_value_from_string "$line"
       localize_key_layout "$VAL"
+    else
+      # Remove the kxkbrc if not used
+      rm ${FSMNT}/usr/share/skel/.kde4/share/config/kxkbrc >/dev/null 2>/dev/null
     fi
 
     # Check if we need to do any key models



More information about the Commits mailing list