Subversion Repositories navi

Rev

Rev 270 | Rev 284 | 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 %}
176 muzer 6
<!--
7
#    This file is part of Tsim Apiak.
8
#  
9
#    Tsim Apiak is free software: you can redistribute it and/or modify
10
#    it under the terms of the GNU General Public Licence as published by
11
#    the Free Software Foundation, either version 3 of the Licence, or
12
#    (at your option) any later version. 
13
#   
14
#    In addition to this, you must also comply with clause 4 of the
15
#    Apache Licence, version 2.0, concerning attribution. Where there
16
#    is a contradiction between the two licences, the GPL           
17
#    takes preference.
18
#  
186 szabot 19
#    Tsim Apiak is distributed in the hope that it will be useful,
176 muzer 20
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
21
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
#    GNU General Public License for more details.
23
#  
24
#    You should have received a copy of the GNU General Public License
25
#    along with Tsim Apiak.  If not, see <http://www.gnu.org/licenses/>.   
26
-->
27
 
146 szabot 28
<b>Na'vi sentence:</b><br />
148 szabot 29
<form action="/translate" method="post">
146 szabot 30
<input id="word" name="word" type="text" value="{{last}}" style="width: 100%;" />
153 szabot 31
<select name="lang" id="lang">
32
    <option value="eng" selected="selected">English</option>
33
    <option value="hu">Hungarian - Magyar</option>
34
    <option value="de">German - Deutsch</option>
35
    <option value="est">Estonian - Eesti</option>
36
    <option value="ptbr">Brazilian Portuguese - Português do Brasil</option>
232 muzer 37
    <option value="sv">Swedish - Svenska</option>
270 muzer 38
    <option value="nl">Dutch - Nederlands</option>
150 szabot 39
</select>
154 szabot 40
<input name="btn" type="submit" value="Translate!" />
146 szabot 41
</form>
42
{% if out %}
43
<table border="1">
44
<tr>
45
    <th>Words</th>
157 muzer 46
    <th>Translated</th>
146 szabot 47
    <th>Parts</th>
48
    <th>Data</th>
49
</tr>
50
{% for wor in out %}
51
<tr>
52
    <td rowspan="4">{{ wor["word"]["navi"] }}</td>
53
    <td rowspan="4">{{ wor["translated"] }}</td>
54
    <td>Infixes:</td>
55
    <td>{{ u", ".join(wor["inf"]) }}</td>
56
</tr>
57
<tr>
58
    <td>Prefixes:</td>
59
    <td>{{ u"; ".join(u", ".join(x) for x in wor["pref"]) }}</td>
60
</tr>
61
<tr>
62
    <td>Postfixes:</td>
63
    <td>{{ u"; ".join(u", ".join(x) for x in wor["post"]) }}</td>
64
</tr>
65
<tr>
66
    <td>Lenited:</td>
67
    <td>{{ str(wor["len"]) }}</td>
68
</tr>
69
{% end %}
70
</table>
71
{% end %}
283 muzer 72
<p>This program uses Eana Eltu for the list of words, affixes, and infix position data, created by Tuiq, Taronyu, and Tirea Aean. Thanks also go to the rest of the Learn Na'vi community!</p>
146 szabot 73
<script type="text/javascript">
74
document.getElementById("word").focus();
75
</script>
152 szabot 76
{% if lang != "eng" %}
77
<script type="text/javascript">
153 szabot 78
if("{{ lang }}" == "hu"){
79
    document.getElementById("lang").selectedIndex = 1
80
}
81
if("{{ lang }}" == "de"){
82
    document.getElementById("lang").selectedIndex = 2
83
}
84
if("{{ lang }}" == "est"){
85
    document.getElementById("lang").selectedIndex = 3
86
}
87
if("{{ lang }}" == "ptbr"){
88
    document.getElementById("lang").selectedIndex = 4
89
}
232 muzer 90
if("{{ lang }}" == "sv"){
91
    document.getElementById("lang").selectedIndex = 5
92
}
270 muzer 93
if("{{ lang }}" == "nl"){
94
    document.getElementById("lang").selectedIndex = 6
95
}
152 szabot 96
</script>
97
{% end %}
157 muzer 98
{% end %}