diff options
| author | mjwybrow <mjwybrow@users.sourceforge.net> | 2009-07-20 00:09:54 +0000 |
|---|---|---|
| committer | mjwybrow <mjwybrow@users.sourceforge.net> | 2009-07-20 00:09:54 +0000 |
| commit | 2a1e36aa48fe9c6055fa28a084e45c5c5d48b9ac (patch) | |
| tree | 1f0ec353f49efde1c6b88c3e6036c45443120405 /packaging | |
| parent | - Hide some warnings that occur if the AppleAquaColorVariant or (diff) | |
| download | inkscape-2a1e36aa48fe9c6055fa28a084e45c5c5d48b9ac.tar.gz inkscape-2a1e36aa48fe9c6055fa28a084e45c5c5d48b9ac.zip | |
- If the OS X AppleCollationOrder preference doesn't exist, then we
fall back to using the AppleLocale preference instead.
(bzr r8308)
Diffstat (limited to 'packaging')
| -rwxr-xr-x | packaging/macosx/Resources/bin/inkscape | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/packaging/macosx/Resources/bin/inkscape b/packaging/macosx/Resources/bin/inkscape index 2aa2e723b..a085ca498 100755 --- a/packaging/macosx/Resources/bin/inkscape +++ b/packaging/macosx/Resources/bin/inkscape @@ -59,11 +59,21 @@ if [[ ! -e "$HOME/.gtkrc-2.0" ]]; then 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. |
