summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 077573d)
raw | patch | inline | side by side (parent: 077573d)
author | mjwybrow <mjwybrow@users.sourceforge.net> | |
Mon, 20 Jul 2009 00:09:54 +0000 (00:09 +0000) | ||
committer | mjwybrow <mjwybrow@users.sourceforge.net> | |
Mon, 20 Jul 2009 00:09:54 +0000 (00:09 +0000) |
fall back to using the AppleLocale preference instead.
packaging/macosx/Resources/bin/inkscape | patch | blob | history |
index 2aa2e723be46168bac9f9cae7d6fc7e3d1698ed6..a085ca4981b7ccb231774ca034d2636cfbc9bf4c 100755 (executable)
export GTK2_RC_FILES="$INKSCAPE_SHAREDIR/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/gtkrc"
fi
-# TODO: Have to add ".UTF-8" to the LANG since ommiting causes Inkscape
+# If the AppleCollationOrder preference doesn't exist, we fall back to using
+# the AppleLocale preference.
+LANGSTR=`defaults read .GlobalPreferences AppleCollationOrder 2>/dev/null`
+if [ "x$LANGSTR" == "x" ]
+then
+ echo "Warning: AppleCollationOrder setting not found, using AppleLocale."
+ LANGSTR=`defaults read .GlobalPreferences AppleLocale 2>/dev/null | \
+ sed 's/_.*//'`
+fi
+
+# NOTE: Have to add ".UTF-8" to the LANG since omitting causes Inkscape
# to crash on startup in locale_from_utf8().
-export LANG="`grep \"\`defaults read .GlobalPreferences AppleCollationOrder \
- 2>&1\`_\" /usr/share/locale/locale.alias | tail -n1 | sed 's/\./ /' | \
- awk '{print $2}'`.UTF-8"
+export LANG="`grep \"\`echo $LANGSTR\`_\" /usr/share/locale/locale.alias | \
+ tail -n1 | sed 's/\./ /' | awk '{print $2}'`.UTF-8"
+echo "Setting Language: $LANG"
# Handle the case where the directory storing Inkscape has a '#' in the name.
# This '#' needs to be escaped in pango.modules for Pango to work properly.