My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions

Issue 69 attachment: 0002-Added-translation-tag-to-a-few-hardcoded-strings.patch (8.9 KB)

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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
From 5f8f077692fd41d478178ad62449a51563ee20af Mon Sep 17 00:00:00 2001
From: Alcides Fonseca <me@alcidesfonseca.com>
Date: Sat, 1 Aug 2009 23:10:24 +0100
Subject: [PATCH 2/3] Added translation tag to a few hardcoded strings

---
templates/forum/reply.html | 2 +-
templates/forum/thread.html | 12 ++++++------
templates/forum/thread_list.html | 30 +++++++++++++++---------------
templates/forum/updatesubs.html | 18 +++++++++---------
4 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/templates/forum/reply.html b/templates/forum/reply.html
index efb0206..6c4e32c 100644
--- a/templates/forum/reply.html
+++ b/templates/forum/reply.html
@@ -5,7 +5,7 @@

{% block pagetitle %}{% blocktrans with thread.title as title %}Reply to Thread "{{ title }}"{% endblocktrans %}{% endblock %}

-{% block breadcrumbs %}{% for title, url in thread.forum.get_url_name %} &raquo; <a href='{{ url }}'>{{ title }}</a>{% endfor %} &raquo; <a href='{{ thread.get_absolute_url }}'>{{ thread.title|escape }}</a> &raquo; Reply{% endblock %}
+{% block breadcrumbs %}{% for title, url in thread.forum.get_url_name %} &raquo; <a href='{{ url }}'>{{ title }}</a>{% endfor %} &raquo; <a href='{{ thread.get_absolute_url }}'>{{ thread.title|escape }}</a> &raquo; {% trans "Reply" %}{% endblock %}


{% block content %}
diff --git a/templates/forum/thread.html b/templates/forum/thread.html
index 1e43542..67565fa 100644
--- a/templates/forum/thread.html
+++ b/templates/forum/thread.html
@@ -5,7 +5,7 @@
{% block pagetitle %}{{ forum.title }} &raquo; {{ thread.title|escape }}{% endblock %}


-{% block breadcrumbs %}{% for title, url in thread.forum.get_url_name %} &raquo; <a href='{{ url }}'>{{ title }}</a>{% endfor %} &raquo; <a href='{{ thread.get_absolute_url }}'>{{ thread.title|escape }}</a> ({{ thread.posts }} post{{ thread.posts|pluralize }}){% endblock %}
+{% block breadcrumbs %}{% for title, url in thread.forum.get_url_name %} &raquo; <a href='{{ url }}'>{{ title }}</a>{% endfor %} &raquo; <a href='{{ thread.get_absolute_url }}'>{{ thread.title|escape }}</a> ({{ thread.posts }} {% trans "post" %}{{ thread.posts|pluralize }}){% endblock %}

{% block content %}

@@ -31,18 +31,18 @@ by <strong>{{ post.author }}</strong></th>
{% endif %}

{% if request.user.is_authenticated %}<p><a href="{% url forum_subscriptions %}">{% trans "Update Subscriptions" %}</a></p>{% endif %}
-<h2>Post a Reply</h2>
+<h2>{% trans "Post a Reply" %}</h2>
{% if thread.closed %}
-<p>Sorry, this thread is closed. No further replies are permitted.</p>
+<p>{% trans "Sorry, this thread is closed. No further replies are permitted." %}</p>
{% else %}
{% if user.is_authenticated %}
<form method='post' action='reply/'>
-<p><label>Posting As</label><span>{{ user.username }}</span></p>
+<p><label>{% trans "Posting as" %}</label><span>{{ user.username }}</span></p>
{{ form.as_p }}
-<input type='submit' value='Submit' />
+<input type='submit' value='{% trans "Reply" %}' />
</form>
{% else %}
-<p>Please login to post a reply.</p>
+<p>{% trans "Please login to post." %}</p>
{% endif %}
{% endif %}

diff --git a/templates/forum/thread_list.html b/templates/forum/thread_list.html
index 769fba7..a02d2eb 100644
--- a/templates/forum/thread_list.html
+++ b/templates/forum/thread_list.html
@@ -10,7 +10,7 @@

{% block pagetitle %}{{ forum.title }}{% endblock %}

-{% block breadcrumbs %} {% for title, url in forum.get_url_name %} &raquo; <a href='{{ url }}'>{{ title }}</a> {% endfor %} ({{ forum.threads }} thread{{ forum.threads|pluralize }}, {{ forum.posts }} post{{ forum.posts|pluralize }}){% endblock %}
+{% block breadcrumbs %} {% for title, url in forum.get_url_name %} &raquo; <a href='{{ url }}'>{{ title }}</a> {% endfor %} ({{ forum.threads }} {% trans "thread" %}{{ forum.threads|pluralize }}, {{ forum.posts }} {% trans "post" %}{{ forum.posts|pluralize }}){% endblock %}


{% block content %}
@@ -18,16 +18,16 @@
{% if child_forums %}
<table id='djangoForumList'>
<tr>
-<th>Sub-Forum</th>
-<th>Last Post</th>
+<th>{% trans "Sub-forum" %}</th>
+<th>{% trans "Last Post" %}</th>
</tr>

{% for subforum in child_forums %}
<tr>
-<td class='djangoForumListDetails'><p><strong><a href='{{ subforum.get_absolute_url }}'>{{ subforum.title }}</a></strong><br /><span class='djangoForumStats'>{{ subforum.threads }} thread{{ subforum.threads|pluralize }}, {{ subforum.posts }} post{{ subforum.posts|pluralize }}</span></p>
+<td class='djangoForumListDetails'><p><strong><a href='{{ subforum.get_absolute_url }}'>{{ subforum.title }}</a></strong><br /><span class='djangoForumStats'>{{ subforum.threads }} {% trans "thread" %}{{ subforum.threads|pluralize }}, {{ subforum.posts }} {% trans "post" %}{{ subforum.posts|pluralize }}</span></p>
<p>{{ subforum.description }}</p></td>
{% with subforum.forum_latest_post as latest_post %}
-<td class='djangoForumListLastPost'>{% if latest_post %}{{ latest_post.time|timesince }} ago by {{ latest_post.author }} (<a href='{{ latest_post.get_absolute_url }}'>view</a>){% else %}No Posts{% endif %}</td>
+<td class='djangoForumListLastPost'>{% if latest_post %}{{ latest_post.time|timesince }} {% trans "ago by" %} {{ latest_post.author }} (<a href='{{ latest_post.get_absolute_url }}'>{% trans "view" %}</a>){% else %}{% trans "No Posts" %}{% endif %}</td>
{% endwith %}
</tr>
{% endfor %}
@@ -38,19 +38,19 @@
<table id='djangoForumThreadList'>

<tr>
-<th>Thread</th>
-<th style='width: 50px;'>Posts</th>
-<th style='width: 50px;'>Views</th>
-<th style='width: 220px;'>Last Post</th>
+<th>{% trans "Thread" %}</th>
+<th style='width: 50px;'>{% trans "Posts" %}</th>
+<th style='width: 50px;'>{% trans "Views" %}</th>
+<th style='width: 220px;'>{% trans "Last Post" %}</th>
</tr>

{% for t in thread_list %}
<tr>
-<td>{% if t.sticky %}Sticky {% endif %}<a href='{{ t.get_absolute_url }}'>{{ t.title|escape }}</a>{% if t.closed %} (Closed){% endif %}</td>
+<td>{% if t.sticky %}Sticky {% endif %}<a href='{{ t.get_absolute_url }}'>{{ t.title|escape }}</a>{% if t.closed %} {% trans "(Closed)" %}{% endif %}</td>
<td style='width: 50px;'>{{ t.posts }}</td>
<td style='width: 50px;'>{{ t.views }}</td>
{% with t.thread_latest_post as latest_post %}
-<td style='width: 220px;' class='djangoForumThreadLastPost'>{{ latest_post.time|timesince }} ago by {{ latest_post.author }} (<a href='{{ latest_post.get_absolute_url }}'>view</a>)</td>
+<td style='width: 220px;' class='djangoForumThreadLastPost'>{{ latest_post.time|timesince }} {% trans "ago by" %} {{ latest_post.author }} (<a href='{{ latest_post.get_absolute_url }}'>view</a>)</td>
{% endwith %}
</tr>
{% endfor %}
@@ -66,15 +66,15 @@
</ul>
{% endif %}

-<h2>Create a Thread</h2>
+<h2>{% trans "Create a Thread" %}</h2>
{% if user.is_authenticated %}
<form method='post' action='new/'>
-<p><label>Posting As</label><span>{{ user.username }}</span></p>
+<p><label>{% trans "Posting As" %}</label><span>{{ user.username }}</span></p>
{{ form.as_p }}
-<p><input type='submit' value='Post' /></p>
+<p><input type='submit' value='{% trans "Post" %}' /></p>
</form>
{% else %}
-<p>Please login to create a thread.</p>
+<p>{% trans "Please login to create a thread." %}</p>
{% endif %}

{% endblock %}
diff --git a/templates/forum/updatesubs.html b/templates/forum/updatesubs.html
index 557bac7..22e880f 100644
--- a/templates/forum/updatesubs.html
+++ b/templates/forum/updatesubs.html
@@ -1,37 +1,37 @@
{% extends "forum_base.html" %}
-{% block title %}Update Thread Subscriptions{% endblock %}
-{% block pagetitle %}Update Thread Subscriptions{% endblock %}
+{% block title %}{% trans "Update Thread Subscriptions" %}{% endblock %}
+{% block pagetitle %}{% trans "Update Thread Subscriptions" %}{% endblock %}


{% block content %}

{% if user.is_authenticated %}
{% if not subs %}
-<p>No subscriptions.</p>
+<p>{% trans "No subscriptions." %}</p>
{% else %}
<form method='post' action='./'>
<table id='djangoForumThreadList'>

<tr>
-<th>Forum</th>
-<th>Thread</th>
-<th>Subscribed</th>
+<th>{% trans "Forum" %}</th>
+<th>{% trans "Thread" %}</th>
+<th>{% trans "Subscribed" %}</th>
</tr>

{% for s in subs %}
<tr>
<td><a href='{{ s.thread.forum.get_absolute_url }}'>{{ s.thread.forum.title }}</a></td>
-<td>{% if s.thread.sticky %}Sticky {% endif %}<a href='{{ s.thread.get_absolute_url }}'>{{ s.thread.title|escape }}</a>{% if s.thread.closed %} (Closed){% endif %}</td>
+<td>{% if s.thread.sticky %}{% trans "Sticky" %} {% endif %}<a href='{{ s.thread.get_absolute_url }}'>{{ s.thread.title|escape }}</a>{% if s.thread.closed %} {% trans "(Closed)" %}{% endif %}</td>
<td><input type='checkbox' checked='checked' name='{{ s.thread.id }}' /></td>
</tr>
{% endfor %}
</table>

-<p><input type='submit' value='Update Subscriptions' name="updatesubs" /></p>
+<p><input type='submit' value='{% trans "Update Subscriptions" %}' name="updatesubs" /></p>
</form>
{% endif %}
{% else %}
-<p>Please login to update your forum subscriptions.</p>
+<p>{% trans "Please login to update your forum subscriptions." %}</p>
{% endif %}

{% endblock %}
--
1.6.1.2

Powered by Google Project Hosting