Subversion Repositories navi

Rev

Rev 294 | 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">
284 muzer 32
    <option value="en" selected="selected">English</option>
153 szabot 33
    <option value="hu">Hungarian - Magyar</option>
34
    <option value="de">German - Deutsch</option>
284 muzer 35
    <option value="et">Estonian - Eesti</option>
36
    <option value="pt">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>
292 muzer 39
    <option value="es">Spanish - Español</option>
40
    <option value="fr">French - Français</option>
41
    <option value="pl">Polish - Polski</option>
42
    <option value="ru">Russian - Русский</option>
43
    <option value="tr">Turkish - Türkçe</option>
293 muzer 44
    <option value="uk">Ukrainian - Українська</option>
150 szabot 45
</select>
154 szabot 46
<input name="btn" type="submit" value="Translate!" />
146 szabot 47
</form>
48
{% if out %}
49
<table border="1">
50
<tr>
51
    <th>Words</th>
157 muzer 52
    <th>Translated</th>
146 szabot 53
    <th>Parts</th>
54
    <th>Data</th>
55
</tr>
56
{% for wor in out %}
57
<tr>
58
    <td rowspan="4">{{ wor["word"]["navi"] }}</td>
59
    <td rowspan="4">{{ wor["translated"] }}</td>
60
    <td>Infixes:</td>
61
    <td>{{ u", ".join(wor["inf"]) }}</td>
62
</tr>
63
<tr>
64
    <td>Prefixes:</td>
65
    <td>{{ u"; ".join(u", ".join(x) for x in wor["pref"]) }}</td>
66
</tr>
67
<tr>
68
    <td>Postfixes:</td>
284 muzer 69
    <td>{{ u"; ".join(u", ".join([y[0] for y in x]) for x in wor["post"]) }}</td>
146 szabot 70
</tr>
71
<tr>
72
    <td>Lenited:</td>
73
    <td>{{ str(wor["len"]) }}</td>
74
</tr>
75
{% end %}
76
</table>
77
{% end %}
295 muzer 78
<p>This program uses Eana Eltu for the list of words, affixes, and infix position data, created by Tuiq, Taronyu, Seze, Mark Miller, Tìtstewan, and Tirea Aean. Thanks also go to the rest of the Learn Na'vi community!</p>
146 szabot 79
<script type="text/javascript">
80
document.getElementById("word").focus();
81
</script>
284 muzer 82
{% if lang != "en" %}
152 szabot 83
<script type="text/javascript">
153 szabot 84
if("{{ lang }}" == "hu"){
85
    document.getElementById("lang").selectedIndex = 1
86
}
87
if("{{ lang }}" == "de"){
88
    document.getElementById("lang").selectedIndex = 2
89
}
292 muzer 90
if("{{ lang }}" == "et"){
153 szabot 91
    document.getElementById("lang").selectedIndex = 3
92
}
292 muzer 93
if("{{ lang }}" == "pt"){
153 szabot 94
    document.getElementById("lang").selectedIndex = 4
95
}
232 muzer 96
if("{{ lang }}" == "sv"){
97
    document.getElementById("lang").selectedIndex = 5
98
}
270 muzer 99
if("{{ lang }}" == "nl"){
100
    document.getElementById("lang").selectedIndex = 6
101
}
293 muzer 102
if("{{ lang }}" == "es"){
292 muzer 103
    document.getElementById("lang").selectedIndex = 7
104
}
293 muzer 105
if("{{ lang }}" == "fr"){
292 muzer 106
    document.getElementById("lang").selectedIndex = 8
107
}
293 muzer 108
if("{{ lang }}" == "pl"){
292 muzer 109
    document.getElementById("lang").selectedIndex = 9
110
}
293 muzer 111
if("{{ lang }}" == "ru"){
292 muzer 112
    document.getElementById("lang").selectedIndex = 10
113
}
293 muzer 114
if("{{ lang }}" == "tr"){
292 muzer 115
    document.getElementById("lang").selectedIndex = 11
116
}
293 muzer 117
if("{{ lang }}" == "uk"){
118
    document.getElementById("lang").selectedIndex = 12
119
}
152 szabot 120
</script>
121
{% end %}
157 muzer 122
{% end %}