handle lang....... :)

SVN revision: 993
This commit is contained in:
Carsten Haitzler 1999-10-27 07:43:25 +00:00
parent 4c76270df8
commit ef0e68895e
2 changed files with 16 additions and 8 deletions

View File

@ -124,7 +124,10 @@ fi
is_desktop() {
VAL=`grep "\[Desktop Entry\]" $1`
if [ -n "$VAL" ]; then
VAL=`grep '^Name=' $1 | head -1`
VAL=`grep "^Name\[$LANG\]=" $1 | head -1`
if [ ! -n "$VAL" ]; then
VAL=`grep '^Name=' $1 | head -1`
fi
if [ -n "$VAL" ]; then
NAME=`echo $VAL | awk -F= '{printf("%s", $2);}'`
echo $NAME | tr -d '\n'
@ -245,11 +248,13 @@ for F in $ORDER; do
ICO=`get_icon $FF"/.directory"`
echo \"$NAME\" \"$ICO\" menu \"$MFILE\" >> $OUT
else
NAME=`is_desktop $FF`
if [ -n "$NAME" ]; then
EXE=`get_exec $FF`
ICO=`get_icon $FF`
echo \"$NAME\" \"$ICO\" exec \"$EXE\" >> $OUT
fi
if [ -r "$FF" ]; then
NAME=`is_desktop $FF`
if [ -n "$NAME" ]; then
EXE=`get_exec $FF`
ICO=`get_icon $FF`
echo \"$NAME\" \"$ICO\" exec \"$EXE\" >> $OUT
fi
fi
fi
done

View File

@ -108,7 +108,10 @@ fi
is_kdelnk() {
VAL=`grep "\[KDE Desktop Entry\]" $1`
if [ -n "$VAL" ]; then
VAL=`grep '^Name=' $1 | head -1`
VAL=`grep "^Name\[$LANG\]=" $1 | head -1`
if [ ! -n "$VAL" ]; then
VAL=`grep '^Name=' $1 | head -1`
fi
if [ -n "$VAL" ]; then
NAME=`echo $VAL | awk -F= '{printf("%s", $2);}'`
echo $NAME | tr -d '\n'