#!/bin/sh 

_()
{
LANG=${in_language%%;*}.utf8 gettext "alterator-spamassassin" "$1"
}

#turn off auto expansion
set -f

. /usr/share/alterator/build/backend3.sh

on_message()
{
	case "$in_action" in
		#information for renderer
		template)
			if [ "$in__objects" = "/" ];then
				echo '('
				echo 'template "form" '
				echo 'url "spamassassin.html"'
				echo 'help "spamassassin.html"'
				echo ')'
			elif [ "$in__objects" = "add" ];then
				echo '('
				echo 'template "card-index"'
				echo 'translate "alterator-spamassassin"'
				echo 'redirect "/spamassassin"'
				echo 'url "spamassassin-add.html"'
				echo 'help "spamassassin.html"'
				echo ')'
			fi
			;;
		info)
			echo '('
			printf ' title "%s"' "`_ "Spam filter"`"
			printf ' description "%s\n%s"' "`_ "SpamAssassin based content filter administration"`"
			printf ' group "%s"' "`_ "Mail"`"
			echo ')'
			;;
		*)
			echo '#f'
	esac
}

message_loop
