#!/bin/sh 

_()
{
LANG=${in_language%%;*}.utf8 gettext "alterator-sysinfo" "$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 "sysinfo.html"'
				echo 'help "sysinfo.html"'
				echo ')'
			else
				echo '#f'
			fi
			;;
		info)
			echo '('
			printf ' title "%s"' "`_ "System information"`"
			printf ' description "%s"' "`_ "General system statistics"`"
			printf ' group "%s"' "`_ "System"`"
			printf ' weight 110'
			echo ')'
			;;
		*)
			echo '#f'
	esac
}

message_loop
