Subversion Repositories navi

Rev

Rev 153 | Rev 176 | 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%;" />
153 szabot 9
<select name="lang" id="lang">
10
    <option value="eng" selected="selected">English</option>
11
    <option value="hu">Hungarian - Magyar</option>
12
    <option value="de">German - Deutsch</option>
13
    <option value="est">Estonian - Eesti</option>
14
    <option value="ptbr">Brazilian Portuguese - Português do Brasil</option>
150 szabot 15
</select>
154 szabot 16
<input name="btn" type="submit" value="Translate!" />
146 szabot 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">
153 szabot 54
if("{{ lang }}" == "hu"){
55
    document.getElementById("lang").selectedIndex = 1
56
}
57
if("{{ lang }}" == "de"){
58
    document.getElementById("lang").selectedIndex = 2
59
}
60
if("{{ lang }}" == "est"){
61
    document.getElementById("lang").selectedIndex = 3
62
}
63
if("{{ lang }}" == "ptbr"){
64
    document.getElementById("lang").selectedIndex = 4
65
}
152 szabot 66
</script>
67
{% end %}
146 szabot 68
{% end %}