Subversion Repositories navi

Rev

Rev 150 | Rev 153 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

{% extends "base.html" %}

{% block title %}Translator{% end %}

{% block body %}
<b>Na'vi sentence:</b><br />
<form action="/translate" method="post">
<input id="word" name="word" type="text" value="{{last}}" style="width: 100%;" />
<select name="lang">
    <option id="eng" value="eng" selected="selected">English</option>
    <option id="hu" value="hu">Hungarian - Magyar</option>
    <option id="de" value="de">German - Deutsch</option>
    <option id="est" value="est">Estonian - Eesti</option>
    <option id="ptbr" value="ptbr">Brazilian Portuguese - Português do Brasil</option>
</select>
<input name="btn" type="submit" value="Parse!" />
</form>
{% if out %}
<table border="1">
<tr>
    <th>Words</th>
    <th>English</th>
    <th>Parts</th>
    <th>Data</th>
</tr>
{% for wor in out %}
<tr>
    <td rowspan="4">{{ wor["word"]["navi"] }}</td>
    <td rowspan="4">{{ wor["translated"] }}</td>
    <td>Infixes:</td>
    <td>{{ u", ".join(wor["inf"]) }}</td>
</tr>
<tr>
    <td>Prefixes:</td>
    <td>{{ u"; ".join(u", ".join(x) for x in wor["pref"]) }}</td>
</tr>
<tr>
    <td>Postfixes:</td>
    <td>{{ u"; ".join(u", ".join(x) for x in wor["post"]) }}</td>
</tr>
<tr>
    <td>Lenited:</td>
    <td>{{ str(wor["len"]) }}</td>
</tr>
{% end %}
</table>
{% end %}
<p>This program uses Eana Eltu for the list of words and infix positions (but nothing else), created by Tuiq and Taronyu. Thanks also go to the rest of the Learn Na'vi community!</p>
<script type="text/javascript">
document.getElementById("word").focus();
</script>
{% if lang != "eng" %}
<script type="text/javascript">
document.getElementById(lang).selected = "selected"
</script>
{% end %}
{% end %}