Code: Select all
#!/bin/sh
# help for CUPS
export TEXTDOMAIN=fatdog
read LANG < ${FATDOG_STATE_DIR}/language
if [ "${LANG%_*}" != "en" ]; then
DIR=/usr/share/cups/templates/
DIRs=`find $DIR -type d | sed 's#'${DIR}'##'`
cups=
for lang in `echo $DIRs`; do
cups="$cups `grep ^${lang%_*}: /usr/share/i18n/lang_names | cut -d':' -f2`"
[ "${lang#*_}" != "$lang" ] && cups="${cups}_${lang#*_}" #ex: Português_BR
done
TEXT="$(gettext 'The Printing system will autmatically come up in one these languages:')
${cups}
$(gettext 'if the default browser is set up in this language.')"
TEXT="$TEXT \n$(gettext 'Easiest way is using Google Chrome, see Updates in Control Panel.')
"
fi
TEXT="$TEXT \n$(gettext 'Do you need help in English language with adding a printer in Fatdog64-600?')"
if Xdialog --title "CUPS" --yesno "$TEXT" 0 0; then
exec defaultbrowser http://murga-linux.com/puppy/viewtopic.php?p=628636
else
exec defaultbrowser http://localhost:631
fi