#!/bin/sh 

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

#turn off auto expansion
set -f

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

on_message()
{
	case "$in_action" in
		template)
			echo '('

			if [ "$in__objects" = "avail_layout" ];then
			    echo ' template "card-index"'
			    echo ' url "xkb-layout.html"'
			    echo ' redirect "/xkb"'
			else
			    echo ' template "form"'
			    if [ -n "$in_add" ];then
			        echo ' url-redirect "/xkb/avail_layout"'
			    else
				echo ' url "xkb.html"'
			    fi
			fi
			
			echo ' translate "alterator-xkb"'
			echo ' help "xkb.html"'
			echo ')'
			;;
		*)
			echo '#f'
	esac
}

message_loop
