Subversion Repositories navi

Rev

Rev 157 | Rev 232 | 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
#  
19
#    Foobar is distributed in the hope that it will be useful,
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>
150 szabot 37
</select>
154 szabot 38
<input name="btn" type="submit" value="Translate!" />
146 szabot 39
</form>
40
{% if out %}
41
<table border="1">
42
<tr>
43
    <th>Words</th>
157 muzer 44
    <th>Translated</th>
146 szabot 45
    <th>Parts</th>
46
    <th>Data</th>
47
</tr>
48
{% for wor in out %}
49
<tr>
50
    <td rowspan="4">{{ wor["word"]["navi"] }}</td>
51
    <td rowspan="4">{{ wor["translated"] }}</td>
52
    <td>Infixes:</td>
53
    <td>{{ u", ".join(wor["inf"]) }}</td>
54
</tr>
55
<tr>
56
    <td>Prefixes:</td>
57
    <td>{{ u"; ".join(u", ".join(x) for x in wor["pref"]) }}</td>
58
</tr>
59
<tr>
60
    <td>Postfixes:</td>
61
    <td>{{ u"; ".join(u", ".join(x) for x in wor["post"]) }}</td>
62
</tr>
63
<tr>
64
    <td>Lenited:</td>
65
    <td>{{ str(wor["len"]) }}</td>
66
</tr>
67
{% end %}
68
</table>
69
{% end %}
70
<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>
71
<script type="text/javascript">
72
document.getElementById("word").focus();
73
</script>
152 szabot 74
{% if lang != "eng" %}
75
<script type="text/javascript">
153 szabot 76
if("{{ lang }}" == "hu"){
77
    document.getElementById("lang").selectedIndex = 1
78
}
79
if("{{ lang }}" == "de"){
80
    document.getElementById("lang").selectedIndex = 2
81
}
82
if("{{ lang }}" == "est"){
83
    document.getElementById("lang").selectedIndex = 3
84
}
85
if("{{ lang }}" == "ptbr"){
86
    document.getElementById("lang").selectedIndex = 4
87
}
152 szabot 88
</script>
89
{% end %}
157 muzer 90
{% end %}