Skip to content

Commit d0f137a

Browse files
author
Alexander Smishlajev
committed
i18n markup
1 parent 14916f8 commit d0f137a

File tree

7 files changed

+48
-42
lines changed

7 files changed

+48
-42
lines changed

templates/minimal/html/_generic.collision.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
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">
7-
There has been a collision. Another user updated this node while you were
8-
editing. Please <a tal:attributes="href context/designator">reload</a>
6+
<td class="content" metal:fill-slot="content" i18n:translate="
7+
There has been a collision. Another user updated this node
8+
while you were 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>
11-
</tal:block>
12+
</tal:block>

templates/minimal/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/minimal/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/minimal/html/home.html

Lines changed: 5 additions & 4 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">Tracker home</title>
3-
<span metal:fill-slot="body_title" tal:omit-tag="python:1">Tracker home</span>
2+
<title metal:fill-slot="head_title" i18n:translate="">Tracker home</title>
3+
<span metal:fill-slot="body_title" tal:omit-tag="python:1"
4+
i18n:translate="">Tracker home</span>
45
<td class="content" metal:fill-slot="content">
56

67
<!--
@@ -11,10 +12,10 @@
1112
-->
1213

1314
<tal:block tal:define="anon python:request.user.username == 'anonymous'">
14-
<p tal:condition="not:anon" class="help">
15+
<p tal:condition="not:anon" class="help" i18n:translate="">
1516
Please select from one of the menu options on the right.
1617
</p>
17-
<p tal:condition="anon" class="help">
18+
<p tal:condition="anon" class="help" i18n:translate="">
1819
Please log in or register.
1920
</p>
2021
</tal:block>

templates/minimal/html/page.html

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,28 @@
3030
<span tal:replace="structure request/indexargs_form" />
3131
</form>
3232
<a tal:condition="python:request.user.hasPermission('Web Registration')"
33-
href="user?@template=register">Register</a>
33+
href="user?@template=register" i18n:translate="">Register</a>
3434
</p>
3535

3636
<p class="userblock" tal:condition="python:request.user.username != 'anonymous'">
37-
<b>Hello,</b><br><b tal:content="request/user/username">username</b><br>
38-
<a tal:attributes="href string:user${request/user/id}">My Details</a><br>
37+
<b i18n:translate="">Hello,<br><span i18n:name="user"
38+
tal:content="request/user/username">username</span></b><br>
39+
<a tal:attributes="href string:user${request/user/id}"
40+
i18n:translate="">My Details</a><br>
3941
<a tal:attributes="href python:request.indexargs_href('',
40-
{'@action':'logout'})">Logout</a>
42+
{'@action':'logout'})" i18n:translate="">Logout</a>
4143
</p>
4244

4345
<p class="classblock"
4446
tal:condition="python:request.user.username != 'anonymous'">
45-
<b>Administration</b><br>
47+
<b i18n:translate="">Administration</b><br>
4648
<a tal:condition="python:request.user.hasPermission('Edit', None)"
47-
href="home?@template=classlist">Class List</a><br>
49+
href="home?@template=classlist" i18n:translate="">Class List</a><br>
4850
<a tal:condition="python:request.user.hasPermission('View', 'user')
4951
or request.user.hasPermission('Edit', 'user')"
50-
href="user" >User List</a><br>
52+
href="user" i18n:translate="">User List</a><br>
5153
<a tal:condition="python:request.user.hasPermission('Edit', 'user')"
52-
href="user?@template=item">Add User</a>
54+
href="user?@template=item" i18n:translate="">Add User</a>
5355
</p>
5456
</td>
5557
<td>

templates/minimal/html/user.index.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<!-- dollarId: user.index,v 1.3 2002/07/09 05:29:51 richard Exp dollar-->
22
<tal:block metal:use-macro="templates/page/macros/icing">
3-
<title metal:fill-slot="head_title">User listing</title>
4-
<span metal:fill-slot="body_title" tal:omit-tag="python:1">User listing</span>
3+
<title metal:fill-slot="head_title" i18n:translate="">User listing</title>
4+
<span metal:fill-slot="body_title" tal:omit-tag="python:1"
5+
i18n:translate="">User listing</span>
56
<td class="content" metal:fill-slot="content">
67

7-
<span tal:condition="not:context/is_view_ok">
8-
You are not allowed to view this page.
9-
</span>
8+
<span tal:condition="not:context/is_view_ok"
9+
i18n:translate="">You are not allowed to view this page.</span>
1010

1111
<table width="100%" tal:condition="context/is_view_ok" class="list">
1212
<tr>
13-
<th>Username</th>
14-
<th>Email address</th>
13+
<th i18n:translate="">Username</th>
14+
<th i18n:translate="">Email address</th>
1515
</tr>
1616
<tr tal:repeat="user context/list"
1717
tal:attributes="class python:['normal', 'alt'][repeat['user'].index%6/3]">

templates/minimal/html/user.item.html

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,47 @@
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">User editing</title>
3+
<title metal:fill-slot="head_title" i18n:translate="">User editing</title>
44
<span metal:fill-slot="body_title" tal:omit-tag="python:1">
5-
User<span tal:replace="context/id" />
6-
<tal:x tal:condition="context/is_edit_ok">Editing</tal:x>
5+
<tal:x tal:condition="context/is_edit_ok" i18n:translate="">User<span
6+
tal:replace="context/id" i18n:name="id"/> Editing</tal:x>
7+
<tal:x tal:condition="not:context/is_edit_ok" i18n:translate="">User<span
8+
tal:replace="context/id" i18n:name="id"/></tal:x>
79
</span>
810
<td class="content" metal:fill-slot="content">
9-
<span tal:condition="python:not (context.is_view_ok() or context.is_edit_ok())">
10-
You are not allowed to view this page.
11-
</span>
11+
<span tal:condition="python:not (context.is_view_ok() or context.is_edit_ok())"
12+
i18n:translate="">You are not allowed to view this page.</span>
1213

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

1617

1718
<table class="form">
1819
<tr>
19-
<th>Login Name</th>
20+
<th i18n:translate="">Login Name</th>
2021
<td tal:content="structure context/username/field">username</td>
2122
</tr>
2223
<tr>
23-
<th>Login Password</th>
24+
<th i18n:translate="">Login Password</th>
2425
<td tal:content="structure context/password/field">password</td>
2526
</tr>
2627
<tr>
27-
<th>Confirm Password</th>
28+
<th i18n:translate="">Confirm Password</th>
2829
<td tal:content="structure context/password/confirm">password</td>
2930
</tr>
3031
<tr tal:condition="python:request.user.hasPermission('Web Roles')">
31-
<th>Roles</th>
32+
<th i18n:translate="">Roles</th>
3233
<td tal:condition="context/id"
3334
tal:content="structure context/roles/field">roles</td>
3435
<td tal:condition="not:context/id">
3536
<input name="roles" tal:attributes="value db/config/NEW_WEB_USER_ROLES">
3637
</td>
3738
</tr>
3839
<tr>
39-
<th>E-mail address</th>
40+
<th i18n:translate="">E-mail address</th>
4041
<td tal:content="structure context/address/field">address</td>
4142
</tr>
4243
<tr>
43-
<th>Alternate E-mail addresses<br>One address per line</th>
44+
<th i18n:translate="">Alternate E-mail addresses<br>One address per line</th>
4445
<td tal:content="structure context/alternate_addresses/multiline">alternate_addresses</td>
4546
</tr>
4647

@@ -56,11 +57,11 @@
5657

5758
<table class="form" tal:condition="context/is_only_view_ok">
5859
<tr>
59-
<th>Login Name</th>
60+
<th i18n:translate="">Login Name</th>
6061
<td tal:content="context/username">username</td>
6162
</tr>
6263
<tr>
63-
<th>E-mail address</th>
64+
<th i18n:translate="">E-mail address</th>
6465
<td tal:content="context/address/email">address</td>
6566
</tr>
6667
</table>

0 commit comments

Comments
 (0)