Skip to content

Commit a38fcec

Browse files
author
Alexander Smishlajev
committed
i18n markup
1 parent b6f3ded commit a38fcec

File tree

9 files changed

+181
-143
lines changed

9 files changed

+181
-143
lines changed

templates/classic/html/msg.index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<tal:block metal:use-macro="templates/page/macros/icing">
2-
<title metal:fill-slot="head_title">
3-
List of messages -
4-
<span tal:replace="config/TRACKER_NAME" />
5-
</title>
6-
<span metal:fill-slot="body_title" tal:omit-tag="python:1">Message listing</span>
2+
<title metal:fill-slot="head_title" i18n:translate=""
3+
>List of messages - <span tal:replace="config/TRACKER_NAME"
4+
i18n:name="tracker"/></title>
5+
<span metal:fill-slot="body_title" tal:omit-tag="python:1"
6+
i18n:translate="">Message listing</span>
77
<td class="content" metal:fill-slot="content">
88
<table class="messages" tal:condition="request/filter">
9-
<tr><th colspan=2 class="header">Messages</th></tr>
9+
<tr><th colspan=2 class="header" i18n:translate="">Messages</th></tr>
1010
<tal:block tal:repeat="msg context/list">
1111
<tr>
1212
<th tal:content="string:Author: ${msg/author}">author</th>

templates/classic/html/msg.item.html

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,58 @@
11
<!-- dollarId: msg.item,v 1.3 2002/05/22 00:32:34 richard Exp dollar-->
22
<tal:block metal:use-macro="templates/page/macros/icing">
3-
<title metal:fill-slot="head_title">
4-
<span tal:condition="context/id" tal:replace="string:Message ${context/id}" />
5-
<tal:x tal:condition="not:context/id">New Message</tal:x>
6-
- <span tal:replace="config/TRACKER_NAME" />
7-
</title>
8-
<span metal:fill-slot="body_title" tal:omit-tag="python:1">
9-
Message<span tal:replace="context/id" />
10-
<tal:x tal:condition="context/is_edit_ok">Editing</tal:x>
11-
</span>
3+
<title metal:fill-slot="head_title">
4+
<tal:block condition="context/id" i18n:translate=""
5+
>Message <span tal:replace="context/id" i18n:name="id"
6+
/> - <span tal:replace="config/TRACKER_NAME" i18n:name="tracker"
7+
/></tal:block>
8+
<tal:block condition="not:context/id" i18n:translate=""
9+
>New Message - <span tal:replace="config/TRACKER_NAME" i18n:name="tracker"
10+
/></tal:block>
11+
</title>
12+
<tal:block metal:fill-slot="body_title">
13+
<span tal:condition="python: not (context.id or context.is_edit_ok())"
14+
tal:omit-tag="python:1" i18n:translate="">New Message</span>
15+
<span tal:condition="python: not context.id and context.is_edit_ok()"
16+
tal:omit-tag="python:1" i18n:translate="">New Message Editing</span>
17+
<span tal:condition="python: context.id and not context.is_edit_ok()"
18+
tal:omit-tag="python:1" i18n:translate="">Message<tal:x
19+
replace="context/id" i18n:name="id" /></span>
20+
<span tal:condition="python: context.id and context.is_edit_ok()"
21+
tal:omit-tag="python:1" i18n:translate="">Message<tal:x
22+
replace="context/id" i18n:name="id" /> Editing</span>
23+
</tal:block>
1224
<td class="content" metal:fill-slot="content">
1325
<table class="form">
1426

1527
<tr>
16-
<th>Author</th>
28+
<th i18n:translate="">Author</th>
1729
<td tal:content="context/author"></td>
1830
</tr>
1931

2032
<tr>
21-
<th>Recipients</th>
33+
<th i18n:translate="">Recipients</th>
2234
<td tal:content="context/recipients"></td>
2335
</tr>
2436

2537
<tr>
26-
<th>Date</th>
38+
<th i18n:translate="">Date</th>
2739
<td tal:content="context/date"></td>
2840
</tr>
2941
</table>
3042

3143
<table class="messages">
32-
<tr><th colspan=2 class="header">Content</th></tr>
44+
<tr><th colspan=2 class="header" i18n:translate="">Content</th></tr>
3345
<tr>
3446
<td class="content" colspan=2><pre tal:content="structure context/content/hyperlinked"></pre></td>
3547
</tr>
3648
</table>
3749

3850
<table class="files" tal:condition="context/files">
39-
<tr><th colspan="2" class="header">Files</th></tr>
40-
<tr><th>File name</th><th>Uploaded</th></tr>
51+
<tr><th colspan="2" class="header" i18n:translate="">Files</th></tr>
52+
<tr>
53+
<th i18n:translate="">File name</th>
54+
<th i18n:translate="">Uploaded</th>
55+
</tr>
4156
<tr tal:repeat="file context/files">
4257
<td>
4358
<a tal:attributes="href string:file${file/id}/${file/name}"

templates/classic/html/page.html

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ <h2><span metal:define-slot="body_title">body title</span></h2>
2525
<tr>
2626
<td rowspan="2" valign="top" class="sidebar">
2727
<p class="classblock">
28-
<b>Your Queries</b> (<a href="query?@template=edit">edit</a>)<br>
28+
<span i18n:translate=""
29+
><b>Your Queries</b> (<a href="query?@template=edit">edit</a>)</span><br>
2930
<tal:block tal:repeat="qs request/user/queries">
3031
<a tal:attributes="href string:${qs/klass}?${qs/url}"
3132
tal:content="qs/name">link</a><br>
@@ -35,63 +36,70 @@ <h2><span metal:define-slot="body_title">body title</span></h2>
3536
<form method="POST" tal:attributes="action request/base">
3637
<p class="classblock"
3738
tal:condition="python:request.user.hasPermission('View', 'issue')">
38-
<b>Issues</b><br>
39+
<b i18n:translate="">Issues</b><br>
3940
<a tal:condition="python:request.user.hasPermission('Edit', 'issue')"
40-
href="issue?@template=item">Create New<br></a>
41-
<a href="issue?@sort=-activity&@group=priority&@filter=status,assignedto&@columns=id,activity,title,creator,status&status=-1,1,2,3,4,5,6,7&assignedto=-1">Show Unassigned</a><br>
42-
<a href="issue?@sort=-activity&@group=priority&@filter=status&@columns=id,activity,title,creator,assignedto,status&status=-1,1,2,3,4,5,6,7">Show All</a><br>
43-
<a href="issue?@template=search">Search</a><br>
44-
<input type="submit" style="padding: 0" value="Show issue:"><input size="4" type="text" name="@number">
41+
href="issue?@template=item" i18n:translate="">Create New</a><br>
42+
<a href="issue?@sort=-activity&@group=priority&@filter=status,assignedto&@columns=id,activity,title,creator,status&status=-1,1,2,3,4,5,6,7&assignedto=-1"
43+
i18n:translate="">Show Unassigned</a><br>
44+
<a href="issue?@sort=-activity&@group=priority&@filter=status&@columns=id,activity,title,creator,assignedto,status&status=-1,1,2,3,4,5,6,7"
45+
i18n:translate="">Show All</a><br>
46+
<a href="issue?@template=search" i18n:translate="">Search</a><br>
47+
<input type="submit" style="padding: 0" value="Show issue:"
48+
i18n:attributes="value"><input size="4" type="text" name="@number">
4549
<input type="hidden" name="@type" value="issue">
4650
<input type="hidden" name="@action" value="show">
4751
</p>
4852
</form>
4953

5054
<p class="classblock"
5155
tal:condition="python:request.user.hasPermission('Edit', 'keyword')">
52-
<b>Keywords</b><br>
53-
<a href="keyword?@template=item">Create New<br></a>
56+
<b i18n:translate="">Keywords</b><br>
57+
<a href="keyword?@template=item" i18n:translate="">Create New</a><br>
5458
<a tal:condition="db/keyword/list"
55-
href="keyword?@template=item">Edit Existing<br></a>
59+
href="keyword?@template=item" i18n:translate="">Edit Existing</a><br>
5660
</p>
5761

5862
<p class="classblock"
5963
tal:condition="python:request.user.hasPermission('View', 'user')">
60-
<b>Administration</b><br>
64+
<b i18n:translate="">Administration</b><br>
6165
<tal:block tal:condition="python:request.user.hasPermission('Edit', None)">
62-
<a href="home?@template=classlist">Class List</a><br>
66+
<a href="home?@template=classlist" i18n:translate="">Class List</a><br>
6367
</tal:block>
6468
<a tal:condition="python:request.user.hasPermission('View', 'user')
6569
or request.user.hasPermission('Edit', 'user')"
66-
href="user" >User List</a><br>
70+
href="user" i18n:translate="">User List</a><br>
6771
<a tal:condition="python:request.user.hasPermission('Edit', 'user')"
68-
href="user?@template=item">Add User</a>
72+
href="user?@template=item" i18n:translate="">Add User</a>
6973
</p>
7074

7175
<form method="POST" tal:condition="python:request.user.username=='anonymous'"
7276
tal:attributes="action request/base">
7377
<p class="userblock">
74-
<b>Login</b><br>
78+
<b i18n:translate="">Login</b><br>
7579
<input size="10" name="__login_name"><br>
7680
<input size="10" type="password" name="__login_password"><br>
7781
<input type="submit" name="@action" value="Login"><br>
7882
<span tal:replace="structure request/indexargs_form" />
7983
<a href="user?@template=register"
80-
tal:condition="python:request.user.hasPermission('Web Registration')">Register<br></a>
81-
<a href="user?@template=forgotten">Lost&nbsp;your&nbsp;login?</a><br>
84+
tal:condition="python:request.user.hasPermission('Web Registration')"
85+
i18n:translate="">Register</a><br>
86+
<a href="user?@template=forgotten" i18n:translate="">Lost&nbsp;your&nbsp;login?</a><br>
8287
</p>
8388
</form>
84-
89+
8590
<p class="userblock" tal:condition="python:request.user.username != 'anonymous'">
86-
<b>Hello,</b> <b tal:content="request/user/username">username</b><br>
87-
<a tal:attributes="href string:issue?@sort=-activity&@group=priority&@filter=status,assignedto&@columns=id,activity,title,creator,status&status=-1,1,2,3,4,5,6,7&assignedto=${request/user/id}">My Issues</a><br>
88-
<a tal:attributes="href string:user${request/user/id}">My Details</a><br>
91+
<b i18n:translate="">Hello, <span i18n:name="user"
92+
tal:replace="request/user/username">username</span></b><br>
93+
<a tal:attributes="href string:issue?@sort=-activity&@group=priority&@filter=status,assignedto&@columns=id,activity,title,creator,status&status=-1,1,2,3,4,5,6,7&assignedto=${request/user/id}" i18n:translate="">My Issues</a><br>
94+
<a tal:attributes="href string:user${request/user/id}"
95+
i18n:translate="">My Details</a><br>
8996
<a tal:attributes="href python:request.indexargs_href('',
90-
{'@action':'logout'})">Logout</a>
97+
{'@action':'logout'})" i18n:translate="">Logout</a>
9198
</p>
9299
<p class="userblock">
93-
<b>Help</b><br>
94-
<a href="http://roundup.sourceforge.net/doc-0.7/">Roundup docs</a>
100+
<b i18n:translate="">Help</b><br>
101+
<a href="http://roundup.sourceforge.net/doc-0.7/"
102+
i18n:translate="">Roundup docs</a>
95103
</p>
96104
</td>
97105
<td>
@@ -128,7 +136,7 @@ <h2><span metal:define-slot="body_title">body title</span></h2>
128136
</td>
129137

130138
<td metal:define-macro="search_popup">
131-
<!--
139+
<!--
132140
context needs to specify the popup "columns" as a comma-separated
133141
string (eg. "id,title" or "id,name,description") as well as name
134142
-->
@@ -141,9 +149,9 @@ <h2><span metal:define-slot="body_title">body title</span></h2>
141149
<td metal:define-macro="search_select">
142150
<select tal:attributes="name name"
143151
tal:define="value python:request.form.getvalue(name)">
144-
<option value="">don't care</option>
152+
<option value="" i18n:translate="">don't care</option>
145153
<tal:block metal:define-slot="extra_options"></tal:block>
146-
<option value="">------------</option>
154+
<option value="" i18n:translate="">------------</option>
147155
<option tal:repeat="s python:db[db_klass].list()"
148156
tal:attributes="value s/id; selected python:value == s.id"
149157
tal:content="python:s[db_content]"></option>
@@ -161,7 +169,7 @@ <h2><span metal:define-slot="body_title">body title</span></h2>
161169
<li metal:define-slot="no_value_item">
162170
<input type="checkbox" value="-1" tal:attributes="name name;
163171
id string:$name--1; checked python:value == '-1'" />
164-
<label tal:attributes="for string:$name--1">no value</label>
172+
<label tal:attributes="for string:$name--1" i18n:translate="">no value</label>
165173
</li>
166174
</ul>
167175
</td>

templates/classic/html/query.edit.html

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
<!-- dollarId: user.item,v 1.7 2002/08/16 04:29:04 richard Exp dollar-->
22
<tal:block metal:use-macro="templates/page/macros/icing">
3-
<title metal:fill-slot="head_title">
4-
"Your Queries" Editing
5-
- <span tal:replace="config/TRACKER_NAME" />
6-
</title>
7-
<span metal:fill-slot="body_title" tal:omit-tag="python:1">
8-
"Your Queries" Editing
9-
</span>
3+
<title metal:fill-slot="head_title" i18n:translate=""
4+
>"Your Queries" Editing - <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="">"Your Queries" Editing</span>
108

119
<td class="content" metal:fill-slot="content">
1210

13-
<span tal:condition="not:context/is_edit_ok">
14-
You are not allowed to edit queries.
15-
</span>
11+
<span tal:condition="not:context/is_edit_ok"
12+
i18n:translate="">You are not allowed to edit queries.</span>
1613

1714
<script language="javascript">
1815
// This exists solely because I can't figure how to get the & into an
@@ -28,10 +25,10 @@
2825
<table class="list" width="100%"
2926
tal:define="uid request/user/id; mine request/user/queries">
3027

31-
<tr><th>Query</th>
32-
<th>Include in "Your Queries"</th>
33-
<th>Edit</th>
34-
<th>Private to you?</th>
28+
<tr><th i18n:translate="">Query</th>
29+
<th i18n:translate="">Include in "Your Queries"</th>
30+
<th i18n:translate="">Edit</th>
31+
<th i18n:translate="">Private to you?</th>
3532
<th>&nbsp;</th>
3633
</tr>
3734

@@ -44,17 +41,17 @@
4441
<td metal:define-macro="include">
4542
<select tal:condition="python:query.id not in mine"
4643
tal:attributes="name string:user${uid}@add@queries">
47-
<option value="">leave out</option>
48-
<option tal:attributes="value query/id">include</option>
44+
<option value="" i18n:translate="">leave out</option>
45+
<option tal:attributes="value query/id" i18n:translate="">include</option>
4946
</select>
5047
<select tal:condition="python:query.id in mine"
5148
tal:attributes="name string:user${uid}@remove@queries">
52-
<option value="">leave in</option>
53-
<option tal:attributes="value query/id">remove</option>
49+
<option value="" i18n:translate="">leave in</option>
50+
<option tal:attributes="value query/id" i18n:translate="">remove</option>
5451
</select>
5552
</td>
5653

57-
<td colspan="3">[query is retired]</td>
54+
<td colspan="3" i18n:translate="">[query is retired]</td>
5855

5956
<!-- <td> maybe offer "restore" some day </td> -->
6057
</tal:block>
@@ -67,19 +64,19 @@
6764

6865
<td metal:use-macro="template/macros/include" />
6966

70-
<td><a tal:attributes="href string:query${query/id}">edit</a></td>
67+
<td><a tal:attributes="href string:query${query/id}" i18n:translate="">edit</a></td>
7168

7269
<td>
7370
<select tal:attributes="name string:query${query/id}@private_for">
7471
<option tal:attributes="selected python:query.private_for == uid;
75-
value uid">yes</option>
72+
value uid" i18n:translate="">yes</option>
7673
<option tal:attributes="selected python:query.private_for == None"
77-
value="-1">no</option>
74+
value="-1" i18n:translate="">no</option>
7875
</select>
7976
</td>
8077

8178
<td>
82-
<input type="button" value="Delete"
79+
<input type="button" value="Delete" i18n:attributes="value"
8380
tal:attributes="onClick python:'''retire('%s')'''%query.id">
8481
</td>
8582
</tr>
@@ -90,13 +87,13 @@
9087
tal:content="query/name">query</a></td>
9188

9289
<td metal:use-macro="template/macros/include" />
93-
<td colspan="3">[not yours to edit]</td>
90+
<td colspan="3" i18n:translate="">[not yours to edit]</td>
9491
</tr>
9592

9693
<tr><td colspan="5">
9794
<input type="hidden" name="@action" value="edit">
9895
<input type="hidden" name="@template" value="edit">
99-
<input type="submit" value="Save Selection">
96+
<input type="submit" value="Save Selection" i18n:attributes="value">
10097
</td></tr>
10198

10299
</table>
Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,42 @@
11
<!-- dollarId: user.item,v 1.7 2002/08/16 04:29:04 richard Exp dollar-->
22
<tal:block metal:use-macro="templates/page/macros/icing">
3-
<title metal:fill-slot="head_title">Password reset request</title>
4-
<span metal:fill-slot="body_title" tal:omit-tag="python:1">Password reset request</span>
3+
<title metal:fill-slot="head_title" i18n:translate="">Password reset request</title>
4+
<span metal:fill-slot="body_title" tal:omit-tag="python:1"
5+
i18n:translate="">Password reset request</span>
56
<td class="content" metal:fill-slot="content">
67

7-
<p>You have two options if you have forgotten your password. If you
8-
know the email address you registered with, enter it below.</p>
8+
<p i18n:translate="">You have two options if you have forgotten your password.
9+
If you know the email address you registered with, enter it below.</p>
910

1011
<form method="POST" onSubmit="return submit_once()"
1112
tal:attributes="action context/designator">
1213
<table class="form">
1314
<tr>
14-
<th>Email Address:</th>
15+
<th i18n:translate="">Email Address:</th>
1516
<td><input name="address"></td>
1617
</tr>
1718
<tr>
1819
<td>&nbsp;</td>
1920
<td>
2021
<input type="hidden" name="@action" value="passrst">
2122
<input type="hidden" name="@template" value="forgotten">
22-
<input type="submit" value="Request password reset">
23+
<input type="submit" value="Request password reset"
24+
i18n:attributes="value">
2325
</td>
2426
</tr>
2527
</table>
2628

27-
<p>Or, if you know your username, then enter it below.</p>
29+
<p i18n:translate="">Or, if you know your username, then enter it below.</p>
2830

2931
<table class="form">
30-
<tr><th>Username:</th> <td><input name="username"></td> </tr>
31-
<tr><td></td><td><input type="submit" value="Request password reset"></td></tr>
32+
<tr><th i18n:translate="">Username:</th> <td><input name="username"></td> </tr>
33+
<tr><td></td><td><input type="submit" value="Request password reset"
34+
i18n:attributes="value"></td></tr>
3235
</table>
3336
</form>
3437

35-
<p>A confirmation email will be sent to you - please follow the
36-
instructions
37-
within it to complete the reset process.</p>
38+
<p i18n:translate="">A confirmation email will be sent to you -
39+
please follow the instructions within it to complete the reset process.</p>
3840
</td>
3941

4042
</tal:block>

0 commit comments

Comments
 (0)