Subversion Repositories navi

Rev

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