Subversion Repositories navi

Rev

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

Rev Author Line No. Line
146 szabot 1
{% extends "base.html" %}
2
 
3
{% block title %}Translator{% end %}
4
 
5
{% block body %}
6
<b>Na'vi sentence:</b><br />
148 szabot 7
<form action="/translate" method="post">
146 szabot 8
<input id="word" name="word" type="text" value="{{last}}" style="width: 100%;" />
150 szabot 9
<select name="lang">
152 szabot 10
    <option id="eng" value="eng" selected="selected">English</option>
11
    <option id="hu" value="hu">Hungarian - Magyar</option>
12
    <option id="de" value="de">German - Deutsch</option>
13
    <option id="est" value="est">Estonian - Eesti</option>
14
    <option id="ptbr" value="ptbr">Brazilian Portuguese - Português do Brasil</option>
150 szabot 15
</select>
146 szabot 16
<input name="btn" type="submit" value="Parse!" />
17
</form>
18
{% if out %}
19
<table border="1">
20
<tr>
21
    <th>Words</th>
22
    <th>English</th>
23
    <th>Parts</th>
24
    <th>Data</th>
25
</tr>
26
{% for wor in out %}
27
<tr>
28
    <td rowspan="4">{{ wor["word"]["navi"] }}</td>
29
    <td rowspan="4">{{ wor["translated"] }}</td>
30
    <td>Infixes:</td>
31
    <td>{{ u", ".join(wor["inf"]) }}</td>
32
</tr>
33
<tr>
34
    <td>Prefixes:</td>
35
    <td>{{ u"; ".join(u", ".join(x) for x in wor["pref"]) }}</td>
36
</tr>
37
<tr>
38
    <td>Postfixes:</td>
39
    <td>{{ u"; ".join(u", ".join(x) for x in wor["post"]) }}</td>
40
</tr>
41
<tr>
42
    <td>Lenited:</td>
43
    <td>{{ str(wor["len"]) }}</td>
44
</tr>
45
{% end %}
46
</table>
47
{% end %}
48
<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>
49
<script type="text/javascript">
50
document.getElementById("word").focus();
51
</script>
152 szabot 52
{% if lang != "eng" %}
53
<script type="text/javascript">
54
document.getElementById(lang).selected = "selected"
55
</script>
56
{% end %}
146 szabot 57
{% end %}