-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathlanguage.tpl
54 lines (54 loc) · 2.3 KB
/
language.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
%rebase('main_template', title='Web Translator - {} ({})'.format(lnginfo.name, lnginfo.isocode))
%from webtranslate import utils, data
<h1 class="eint-heading-icon eint-icon-drawer-closed">State of the {{lnginfo.name}} ({{lnginfo.isocode}}) language for all projects</h1>
% if len(prjdata) == 0:
Currently there are no projects that use the {{lnginfo.name}} ({{lnginfo.isocode}}) language, perhaps you can
translate some projects?
% else:
<table class="table table-condensed table-striped table-hover">
<thead>
<tr>
<th>Project</th>
<th><i class="icon-cog"></i> Action</th>
% for s in reversed(data.STATE_DISPLAY):
<th class="number">{{s.name}}</th>
% end
</tr>
</thead>
<tbody>
% for pmd, exists, lstate in prjdata:
<tr>
<td><a href="/translation/{{pmd.name}}/{{lnginfo.isocode}}">{{pmd.human_name}}</a></td>
% if exists:
% if utils.lang_needs_fixing(lstate):
<td><a href="/fix/{{pmd.name}}/{{lnginfo.isocode}}">Start fixing</a></td>
% else:
<td>Done!</td>
% end
% for s in reversed(data.STATE_DISPLAY):
<td class="number">{{lstate[s.code]}}</td>
% end
% else:
<td>
% if not utils.lang_is_empty(lstate):
<form style="margin-bottom: 0" action="/newlanguage/{{pmd.name}}" method="post" enctype="multipart/form-data">
<fieldset>
<input type="hidden" name="language_select" value="{{lnginfo.isocode}}"/>
<button class="btn btn-mini" type="submit">Start new</button>
</fieldset>
</form>
% end
</td>
% for s in reversed(data.STATE_DISPLAY):
% if lstate[s.code] > 0:
<td class="number">{{lstate[s.code]}}</td>
% else:
<td class="number"></td>
% end
% end
% end
</tr>
% end
</tbody>
</table>
% end