--- WindowMaker-0.80.2/util/wmchlocale.in.orig Tue Jul 24 01:13:24 2001 +++ WindowMaker-0.80.2/util/wmchlocale.in Sat Nov 23 14:26:30 2002 @@ -52,7 +52,7 @@ test="--test";; *) if [ -z "$new_locale" ]; then - new_locale="$i" + new_locale="${i%_*}" else echo -e "\nUnrecognized command line argument, run without arguments to see help.\n" exit 1 @@ -65,7 +65,7 @@ fi if [ -n "$auto" ] && [ -z "$new_locale" ]; then - new_locale=$LANG + new_locale=${LANG%_*} if [ -z "$new_locale" ]; then new_locale="${LC_ALL%_*}" fi @@ -75,7 +75,7 @@ if [ -z "$default" ]; then echo -e "\nNo locale is set, using default...\n" >/dev/stderr fi -elif ! (locale -a |grep "^$new_locale$" &>/dev/null); then +elif ! (locale -a |grep "^$new_locale$" >/dev/null 2>/dev/null); then if [ -z "$auto" ]; then echo -e "\n"\ "Locale $new_locale is not supported on your system..."\ @@ -86,7 +86,7 @@ "Check your LANG and LC_ALL variables or install your locale support\n"\ "\n" >/dev/stderr fi - exit 1 +# exit 1 -- disabled, `locale -a` doesn't work under glibc 2.3.1 fi echo -n "Setting Window Maker root menu... " @@ -104,7 +104,7 @@ for new_menu in $menu_list; do for wm_dir in $LOCALDIR $GLOBALDIR; do if [ -f "$wm_dir/$new_menu" ]; then - if [ -z "$new_locale" ] || ( [ -n "$new_locale" ] && echo "$new_menu" |grep "menu.$new_locale" &>/dev/null ); then + if [ -z "$new_locale" ] || ( [ -n "$new_locale" ] && echo "$new_menu" |grep "menu.$new_locale" >/dev/null 2>/dev/null); then echo "success" else echo "fail (copying default)" @@ -135,11 +135,11 @@ else args="--locale=$new_locale $nodef" fi -if wsetfont "$args" &>/dev/null; then +if wsetfont "$args" >/dev/null 2>/dev/null; then echo "success" else echo -n "fail" - if wsetfont default "$test" &>/dev/null; then + if wsetfont default "$test" >/dev/null 2>/dev/null; then echo " (setting default)" else echo " (totally)"