Skip to content

Commit 6cdcca4

Browse files
author
Alexander Smishlajev
committed
i18n markup
1 parent 27be7f5 commit 6cdcca4

File tree

9 files changed

+155
-121
lines changed

9 files changed

+155
-121
lines changed

templates/classic/html/_generic.collision.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
tal:content="python:context._classname.capitalize()+' Edit Collision'"></title>
44
<span metal:fill-slot="body_title" tal:omit-tag="python:1"
55
tal:content="python:context._classname.capitalize()+' Edit Collision'"></span>
6-
<td class="content" metal:fill-slot="content">
6+
<td class="content" metal:fill-slot="content" i18n:translate="
77
There has been a collision. Another user updated this node while you were
8-
editing. Please <a tal:attributes="href context/designator">reload</a>
8+
editing. Please <a href='${context}'>reload</a>
99
the node and review your edits.
10+
"><span tal:replace="context/designator" i18n:name="context" />
1011
</td>
1112
</tal:block>
1213

templates/classic/html/_generic.help.html

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2-
<html>
2+
<html tal:define="property request/form/property/value" >
33
<head>
44
<link rel="stylesheet" type="text/css" href="@@file/style.css" />
55
<meta http-equiv="Content-Type"
66
tal:attributes="content string:text/html;; charset=${request/client/charset}" />
77
<tal:block tal:condition="python:request.form.has_key('property')">
8-
<title tal:content="string:${request/form/property/value} help">Property</title>
9-
<script language="Javascript" type="text/javascript"
8+
<title i18n:translate=""><span tal:replace="property" i18n:name="property" /> help</title>
9+
<script language="Javascript" type="text/javascript"
1010
tal:content="structure string:
1111
// this is the name of the field in the original form that we're working on
12-
field = '${request/form/property/value}';" >
12+
field = '${property}';" >
1313
</script>
14-
<script src="@@file/help_controls.js" type="text/javascript"><!--
14+
<script src="@@file/help_controls.js" type="text/javascript"><!--
1515
//--></script>
1616
</tal:block>
1717
</head>
@@ -20,16 +20,18 @@
2020
tal:define="start python:int(request.form['@startwith'].value);
2121
batch python:utils.Batch(context.list(), 500, start);
2222
props python:request.form['properties'].value.split(',')">
23-
23+
2424
<div id="classhelp-controls">
25-
<!--input type="button" name="btn_clear"
25+
<!--input type="button" name="btn_clear"
2626
value="Clear" onClick="clearList()"/ -->
2727
<input type="text" name="text_preview" size="24" class="preview"
2828
onchange="reviseList(this.value);"/>
29-
<input type="button" name="btn_reset"
30-
value=" Cancel " onclick="resetList(); window.close();"/>
29+
<input type="button" name="btn_reset"
30+
value=" Cancel " onclick="resetList(); window.close();"
31+
i18n:attributes="value" />
3132
<input type="button" name="btn_apply" class="apply"
32-
value=" Apply " onclick="updateList(); window.close();"/>
33+
value=" Apply " onclick="updateList(); window.close();"
34+
i18n:attributes="value" />
3335
</div>
3436

3537
<table class="classhelp">
@@ -40,7 +42,7 @@
4042
<tr tal:repeat="item batch">
4143
<tal:block tal:define="attr python:item[props[0]]">
4244
<td>
43-
<input type="checkbox" name="check"
45+
<input type="checkbox" name="check"
4446
onclick="updatePreview();"
4547
tal:attributes="value attr; id string:id_$attr" />
4648
</td>
@@ -60,14 +62,18 @@
6062
<tr class="navigation">
6163
<th>
6264
<a tal:define="prev batch/previous" tal:condition="prev"
63-
tal:attributes="href string:${request/classname}?@template=help&@startwith=${prev/first}&property=${request/form/property/value}&properties=${request/form/properties/value}">&lt;&lt; previous</a>
65+
tal:attributes="href string:${request/classname}?@template=help&@startwith=${prev/first}&property=${property}&properties=${request/form/properties/value}"
66+
i18n:translate="">&lt;&lt; previous</a>
6467
&nbsp;
6568
</th>
66-
<th tal:content="python: '%d...%d out of %d'%(batch.start,
67-
batch.start+batch.length-1, batch.sequence_length)">current</th>
69+
<th i18n:translate=""><span tal:replace="batch/start" i18n:name="start"
70+
/>..<span tal:replace="python: batch.start + batch.length -1" i18n:name="end"
71+
/> out of <span tal:replace="batch/sequence_length" i18n:name="total"
72+
/></th>
6873
<th>
6974
<a tal:define="next batch/next" tal:condition="next"
70-
tal:attributes="href string:${request/classname}?@template=help&@startwith=${next/first}&property=${request/form/property/value}&properties=${request/form/properties/value}">next &gt;&gt;</a>
75+
tal:attributes="href string:${request/classname}?@template=help&@startwith=${next/first}&property=${property}&properties=${request/form/properties/value}"
76+
i18n:translate="">next &gt;&gt;</a>
7177
&nbsp;
7278
</th>
7379
</tr>

templates/classic/html/_generic.item.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
tal:content="python:context._classname.capitalize()+' editing'"></span>
66
<td class="content" metal:fill-slot="content">
77

8-
<span tal:condition="python:not (context.is_view_ok() or context.is_edit_ok())">
9-
You are not allowed to view this page.
10-
</span>
8+
<span tal:condition="python:not (context.is_view_ok() or context.is_edit_ok())"
9+
tal:omit-tag="python:1" i18n:translate=""
10+
>You are not allowed to view this page.</span>
1111

1212
<form method="POST" onSubmit="return submit_once()"
1313
enctype="multipart/form-data" tal:condition="context/is_edit_ok"

templates/classic/html/file.index.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<!-- dollarId: file.index,v 1.4 2002/01/23 05:10:27 richard Exp dollar-->
22
<tal:block metal:use-macro="templates/page/macros/icing">
3-
<title metal:fill-slot="head_title">
4-
List of files - <span tal:replace="config/TRACKER_NAME" />
5-
</title>
6-
<span metal:fill-slot="body_title" tal:omit-tag="python:1">List of files</span>
3+
<title metal:fill-slot="head_title" i18n:translate=""
4+
>List of files - <span tal:replace="config/TRACKER_NAME" i18n:name="tracker" /></title>
5+
<span metal:fill-slot="body_title" tal:omit-tag="python:1"
6+
i18n:translate="">List of files</span>
77
<td class="content" metal:fill-slot="content">
88

99
<table class="otherinfo">
10-
<tr><th style="padding-right: 10">Download</th>
11-
<th style="padding-right: 10">Content Type</th>
12-
<th style="padding-right: 10">Uploaded By</th>
13-
<th style="padding-right: 10">Date</th>
10+
<tr><th style="padding-right: 10" i18n:translate="">Download</th>
11+
<th style="padding-right: 10" i18n:translate="">Content Type</th>
12+
<th style="padding-right: 10" i18n:translate="">Uploaded By</th>
13+
<th style="padding-right: 10" i18n:translate="">Date</th>
1414
</tr>
1515
<tr tal:repeat="file context/list">
1616
<td>

templates/classic/html/file.item.html

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
<tal:block metal:use-macro="templates/page/macros/icing">
2-
<title metal:fill-slot="head_title">File display</title>
3-
<span metal:fill-slot="body_title" tal:omit-tag="python:1">File display</span>
2+
<title metal:fill-slot="head_title" i18n:translate="">File display</title>
3+
<span metal:fill-slot="body_title" tal:omit-tag="python:1"
4+
i18n:translate="">File display</span>
45

56
<td class="content" metal:fill-slot="content">
67

7-
<span tal:condition="python:not (context.is_view_ok() or context.is_edit_ok())">
8-
You are not allowed to view this page.
9-
</span>
8+
<span tal:condition="python:not (context.is_view_ok() or context.is_edit_ok())"
9+
tal:omit-tag="python:1" i18n:translate=""
10+
>You are not allowed to view this page.</span>
1011

1112
<form method="POST" onSubmit="return submit_once()"
1213
enctype="multipart/form-data" tal:condition="context/is_edit_ok"
1314
tal:attributes="action context/designator">
1415

1516
<table class="form">
1617
<tr>
17-
<th>Name</th>
18+
<th i18n:translate="">Name</th>
1819
<td tal:content="structure context/name/field"></td>
1920
</tr>
2021
<tr>
21-
<th>Content Type</th>
22+
<th i18n:translate="">Content Type</th>
2223
<td tal:content="structure context/type/field"></td>
2324
</tr>
2425

@@ -37,15 +38,16 @@
3738
</form>
3839

3940
<a tal:condition="python:context.id and context.is_view_ok()"
40-
tal:attributes="href string:file${context/id}/${context/name}">download</a>
41+
tal:attributes="href string:file${context/id}/${context/name}"
42+
i18n:translate="">download</a>
4143

4244
<table class="form" tal:condition="context/is_only_view_ok">
4345
<tr>
44-
<th>Name</th>
46+
<th i18n:translate="">Name</th>
4547
<td tal:content="context/name"></td>
4648
</tr>
4749
<tr>
48-
<th>Content Type</th>
50+
<th i18n:translate="">Content Type</th>
4951
<td tal:content="context/type"></td>
5052
</tr>
5153
</table>

templates/classic/html/home.classlist.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<tal:block metal:use-macro="templates/page/macros/icing">
2-
<title metal:fill-slot="head_title">List of classes</title>
3-
<span metal:fill-slot="body_title" tal:omit-tag="python:1">List of classes</span>
2+
<title metal:fill-slot="head_title" i18n:translate="">List of classes</title>
3+
<span metal:fill-slot="body_title" tal:omit-tag="python:1"
4+
i18n:translate="">List of classes</span>
45
<td class="content" metal:fill-slot="content">
56
<table class="classlist">
67

templates/classic/html/issue.index.html

Lines changed: 36 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
<!-- dollarId: issue.index,v 1.2 2001/07/29 04:07:37 richard Exp dollar-->
22
<tal:block metal:use-macro="templates/page/macros/icing">
3-
<title metal:fill-slot="head_title">
4-
List of issues - <span tal:replace="config/TRACKER_NAME" />
5-
</title>
6-
<span metal:fill-slot="body_title" tal:omit-tag="python:1">List of issues</span>
3+
<title metal:fill-slot="head_title" i18n:translate=""
4+
>List of issues - <span tal:replace="config/TRACKER_NAME"
5+
i18n:name="tracker" /></title>
6+
<span metal:fill-slot="body_title" tal:omit-tag="python:1"
7+
i18n:translate="">List of issues</span>
78
<td class="content" metal:fill-slot="content">
89

9-
<tal:block tal:condition="not:context/is_view_ok">
10-
You are not allowed to view this page.
11-
</tal:block>
10+
<span tal:condition="not:context/is_view_ok"
11+
tal:omit-tag="python:1" i18n:translate=""
12+
>You are not allowed to view this page.</span>
1213

1314
<tal:block tal:define="batch request/batch" tal:condition="context/is_view_ok">
1415
<table class="list">
1516
<tr>
16-
<th tal:condition="request/show/priority">Priority</th>
17-
<th tal:condition="request/show/id">ID</th>
18-
<th tal:condition="request/show/creation">Creation</th>
19-
<th tal:condition="request/show/activity">Activity</th>
20-
<th tal:condition="request/show/actor">Actor</th>
21-
<th tal:condition="request/show/topic">Topic</th>
22-
<th tal:condition="request/show/title">Title</th>
23-
<th tal:condition="request/show/status">Status</th>
24-
<th tal:condition="request/show/creator">Creator</th>
25-
<th tal:condition="request/show/assignedto">Assigned&nbsp;To</th>
17+
<th tal:condition="request/show/priority" i18n:translate="">Priority</th>
18+
<th tal:condition="request/show/id" i18n:translate="">ID</th>
19+
<th tal:condition="request/show/creation" i18n:translate="">Creation</th>
20+
<th tal:condition="request/show/activity" i18n:translate="">Activity</th>
21+
<th tal:condition="request/show/actor" i18n:translate="">Actor</th>
22+
<th tal:condition="request/show/topic" i18n:translate="">Topic</th>
23+
<th tal:condition="request/show/title" i18n:translate="">Title</th>
24+
<th tal:condition="request/show/status" i18n:translate="">Status</th>
25+
<th tal:condition="request/show/creator" i18n:translate="">Creator</th>
26+
<th tal:condition="request/show/assignedto" i18n:translate="">Assigned&nbsp;To</th>
2627
</tr>
2728
<tal:block tal:repeat="i batch">
2829
<tr tal:define="group python:request.group[1]"
@@ -65,15 +66,19 @@
6566
<th>
6667
<a tal:define="prev batch/previous" tal:condition="prev"
6768
tal:attributes="href python:request.indexargs_href(request.classname,
68-
{'@startwith':prev.first, '@pagesize':prev.size})">&lt;&lt; previous</a>
69+
{'@startwith':prev.first, '@pagesize':prev.size})"
70+
i18n:translate="">&lt;&lt; previous</a>
6971
&nbsp;
7072
</th>
71-
<th tal:content="python: '%d...%d out of %d'%(batch.start,
72-
batch.start+batch.length-1, batch.sequence_length)">current</th>
73+
<th i18n:translate=""><span tal:replace="batch/start" i18n:name="start"
74+
/>..<span tal:replace="python: batch.start + batch.length -1" i18n:name="end"
75+
/> out of <span tal:replace="batch/sequence_length" i18n:name="total"
76+
/></th>
7377
<th>
7478
<a tal:define="next batch/next" tal:condition="next"
7579
tal:attributes="href python:request.indexargs_href(request.classname,
76-
{'@startwith':next.first, '@pagesize':next.size})">next &gt;&gt;</a>
80+
{'@startwith':next.first, '@pagesize':next.size})"
81+
i18n:translate="">next &gt;&gt;</a>
7782
&nbsp;
7883
</th>
7984
</tr>
@@ -83,42 +88,42 @@
8388
</table>
8489

8590
<a tal:attributes="href python:request.indexargs_url('issue',
86-
{'@action':'export_csv'})">Download as CSV</a>
91+
{'@action':'export_csv'})" i18n:translate="">Download as CSV</a>
8792

8893
<form method="GET" class="index-controls"
8994
tal:attributes="action request/classname">
90-
95+
9196
<table class="form">
9297
<tr tal:condition="batch">
93-
<th>Sort on:</th>
98+
<th i18n:translate="">Sort on:</th>
9499
<td>
95100
<select name="@sort">
96-
<option value="">- nothing -</option>
101+
<option value="" i18n:translate="">- nothing -</option>
97102
<option tal:repeat="col context/properties"
98103
tal:attributes="value col/_name;
99104
selected python:col._name == request.sort[1]"
100105
tal:content="col/_name">column</option>
101106
</select>
102107
</td>
103-
<th>Descending:</th>
108+
<th i18n:translate="">Descending:</th>
104109
<td><input type="checkbox" name="@sortdir"
105-
tal:attributes="checked python:request.sort[0] == '-'">
110+
tal:attributes="checked python:request.sort[0] == '-'">
106111
</td>
107112
</tr>
108113
<tr>
109-
<th>Group on:</th>
114+
<th i18n:translate="">Group on:</th>
110115
<td>
111116
<select name="@group">
112-
<option value="">- nothing -</option>
117+
<option value="" i18n:translate="">- nothing -</option>
113118
<option tal:repeat="col context/properties"
114119
tal:attributes="value col/_name;
115120
selected python:col._name == request.group[1]"
116121
tal:content="col/_name">column</option>
117122
</select>
118123
</td>
119-
<th>Descending:</th>
124+
<th i18n:translate="">Descending:</th>
120125
<td><input type="checkbox" name="@groupdir"
121-
tal:attributes="checked python:request.group[0] == '-'">
126+
tal:attributes="checked python:request.group[0] == '-'">
122127
</td>
123128
</tr>
124129
<tr><td colspan="4">

0 commit comments

Comments
 (0)