#!/bin/sh
# help for CUPS
# internationalised by L18L

export TEXTDOMAIN=fatdog

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?')"

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
