#!/bin/sh

#turn off auto expansion
set -f

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


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

on_message()
{
	case "$in_action" in
		#information for renderer
		template)
			echo '('
			echo 'template "form"'
			echo 'help "xorg.html"'
			if [ "$in__objects" = "/" ];then
		    	    echo 'url "xorg.html"'
			elif [ "$in__objects" = "monitor" ];then
			    echo 'url "xorg-monitor.html"'
			    echo 'redirect "/x11"'
			elif [ "$in__objects" = "driver" ];then
			    echo 'url "xorg-driver.html"'
			    echo 'redirect "/x11"'
			fi
			echo ')'
			;;
		info)
			echo '('
			printf ' group "%s"' "`_ "Graphical interface"`"
			printf ' description "%s"' "`_ "videocard and monitor setup"`"
			printf ' title "%s"' "`_ "Display"`"
			echo ')'
			;;
		*)
			echo '#f'
			;;
	esac
}

message_loop
