Merge ~cjwatson/launchpad:more-datetime-hover-text into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: dc7ccfe7b800b14ab025baf2baf4994f33913f2d
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:more-datetime-hover-text
Merge into: launchpad:master
Diff against target: 1159 lines (+199/-186)
56 files modified
lib/lp/answers/templates/question-history.pt (+2/-5)
lib/lp/answers/templates/question-listing-detailed.pt (+1/-3)
lib/lp/answers/templates/question-listing.pt (+2/-5)
lib/lp/answers/templates/question-portlet-details.pt (+6/-9)
lib/lp/answers/templates/question-portlet-reopenings.pt (+3/-5)
lib/lp/answers/templates/questiontarget-portlet-latestquestions.pt (+3/-1)
lib/lp/app/browser/tales.py (+21/-0)
lib/lp/app/doc/displaying-dates.txt (+12/-0)
lib/lp/blueprints/browser/tests/test_specification.py (+1/-1)
lib/lp/blueprints/templates/hassprints-portlet-coming-sprints.pt (+3/-1)
lib/lp/blueprints/templates/specification-index.pt (+8/-6)
lib/lp/blueprints/templates/specificationtarget-portlet-latestspecs.pt (+2/-1)
lib/lp/blueprints/templates/sprint-listing-simple.pt (+2/-4)
lib/lp/bugs/templates/bugtarget-macros-filebug.pt (+1/-3)
lib/lp/bugs/templates/bugtarget-portlet-latestbugs.pt (+3/-1)
lib/lp/bugs/templates/bugtask-edit-form.pt (+10/-25)
lib/lp/bugs/templates/bugtracker-portlet-watches.pt (+2/-5)
lib/lp/bugs/templates/bugwatch-portlet-activity.pt (+1/-1)
lib/lp/bugs/templates/bugwatch-portlet-details.pt (+6/-15)
lib/lp/bugs/templates/cve-listing-detailed.pt (+4/-6)
lib/lp/code/browser/tests/test_branchmergeproposallisting.py (+4/-0)
lib/lp/code/templates/branch-index.pt (+5/-4)
lib/lp/code/templates/branch-listing.pt (+4/-8)
lib/lp/code/templates/branch-macros.pt (+2/-3)
lib/lp/code/templates/branch-messages.pt (+8/-8)
lib/lp/code/templates/branch-mirror-status.pt (+8/-6)
lib/lp/code/templates/branchmergeproposal-heading.pt (+3/-1)
lib/lp/code/templates/branchmergeproposal-index.pt (+2/-1)
lib/lp/code/templates/branchmergeproposal-listing.pt (+4/-2)
lib/lp/code/templates/branchmergeproposal-macros.pt (+2/-1)
lib/lp/code/templates/branchmergeproposal-pagelet-summary.pt (+2/-1)
lib/lp/code/templates/branchmergeproposal-vote-summary.pt (+4/-2)
lib/lp/code/templates/branchmergeproposal-votes.pt (+6/-3)
lib/lp/code/templates/codeimport-machine-index.pt (+2/-2)
lib/lp/code/templates/codeimport-machines.pt (+2/-2)
lib/lp/code/templates/codeimport-macros.pt (+3/-6)
lib/lp/code/templates/codereviewnewrevisions-header.pt (+1/-1)
lib/lp/code/templates/import-details.pt (+6/-9)
lib/lp/code/templates/sourcepackagerecipe-builds.pt (+4/-2)
lib/lp/registry/templates/announcement-macros.pt (+2/-1)
lib/lp/registry/templates/distributionsourcepackage-index.pt (+3/-3)
lib/lp/registry/templates/distroseriesdifferencecomment-latest-comment-fragment.pt (+1/-1)
lib/lp/registry/templates/product-index.pt (+2/-1)
lib/lp/registry/templates/product-portlet-packages.pt (+3/-1)
lib/lp/registry/templates/product-portlet-requires-subscription.pt (+1/-1)
lib/lp/registry/templates/productrelease-portlet-downloads.pt (+2/-1)
lib/lp/registry/templates/products-index.pt (+2/-1)
lib/lp/registry/templates/project-index.pt (+2/-1)
lib/lp/services/comments/templates/comment-header.pt (+1/-1)
lib/lp/services/oauth/templates/oauth-authorize.pt (+1/-1)
lib/lp/snappy/templates/snap-index.pt (+2/-2)
lib/lp/soyuz/templates/archive-index.pt (+4/-5)
lib/lp/soyuz/templates/distroseries-portlet-latestuploads.pt (+2/-1)
lib/lp/soyuz/templates/livefs-index.pt (+2/-1)
lib/lp/translations/templates/person-translations.pt (+2/-2)
lib/lp/translations/templates/translationimportqueueentry-portlet-details.pt (+2/-3)
Reviewer Review Type Date Requested Status
Ioana Lasc (community) Approve
Review via email: mp+401831@code.launchpad.net

Commit message

Show hover text more consistently on datetimes

Description of the change

Many places in Launchpad's UI showed approximate/display dates with the exact timestamp in a tooltip, but this was quite inconsistent. I added a couple more formatting helpers to encapsulate the common pattern for this, and arranged to use them in all the places where we previously showed only the approximate/display date and where the underlying datetime refers to an exact timestamp rather than an estimate.

A few tests required small adjustments to query counts, since the tooltips show timestamps in the user's local time if possible, and that requires a `PersonLocation` query.

To post a comment you must log in.
Revision history for this message
Ioana Lasc (ilasc) wrote :

nicely done!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/answers/templates/question-history.pt b/lib/lp/answers/templates/question-history.pt
2index a368a24..d2ea4cb 100644
3--- a/lib/lp/answers/templates/question-history.pt
4+++ b/lib/lp/answers/templates/question-history.pt
5@@ -27,11 +27,8 @@
6 <tbody>
7 <tr tal:repeat="message context/messages">
8 <td>
9- <span
10- tal:attributes="title message/datecreated/fmt:datetime"
11- tal:content="message/datecreated/fmt:approximatedate">
12- 2005-10-16
13- </span>
14+ <tal:created
15+ replace="structure message/datecreated/fmt:approximatedatetitle" />
16 </td>
17 <td><a tal:replace="structure message/owner/fmt:link">Foo Bar</a></td>
18 <td tal:content="message/action/title">Comment</td>
19diff --git a/lib/lp/answers/templates/question-listing-detailed.pt b/lib/lp/answers/templates/question-listing-detailed.pt
20index 8e56b20..a8368f2 100644
21--- a/lib/lp/answers/templates/question-listing-detailed.pt
22+++ b/lib/lp/answers/templates/question-listing-detailed.pt
23@@ -9,9 +9,7 @@
24 (<span tal:replace="context/status/title">Approved</span>)
25 <br />
26 <span class="registered">posted
27- <span
28- tal:attributes="title context/datecreated/fmt:datetime"
29- tal:replace="context/datecreated/fmt:displaydate">2005-10-05</span>
30+ <tal:created replace="structure context/datecreated/fmt:displaydatetitle" />
31 in
32 <span tal:replace="context/target/title">SmegConf</span>
33 </span>
34diff --git a/lib/lp/answers/templates/question-listing.pt b/lib/lp/answers/templates/question-listing.pt
35index 14afba6..de7aeec 100644
36--- a/lib/lp/answers/templates/question-listing.pt
37+++ b/lib/lp/answers/templates/question-listing.pt
38@@ -143,11 +143,8 @@
39 <td>
40 <span class="sortkey"
41 tal:content="question/datecreated/fmt:datetime" />
42- <span
43- tal:attributes="title question/datecreated/fmt:datetime"
44- tal:content="question/datecreated/fmt:approximatedate">
45- 2006-07-17
46- </span>
47+ <tal:created
48+ replace="structure question/datecreated/fmt:approximatedatetitle" />
49 </td>
50 <td><a tal:replace="structure question/owner/fmt:link">Foo Bar</a></td>
51 <td class="question-target"
52diff --git a/lib/lp/answers/templates/question-portlet-details.pt b/lib/lp/answers/templates/question-portlet-details.pt
53index 4270696..b63a3ea 100644
54--- a/lib/lp/answers/templates/question-portlet-details.pt
55+++ b/lib/lp/answers/templates/question-portlet-details.pt
56@@ -62,27 +62,24 @@
57 <dl tal:condition="context/answerer">
58 <dt>Solved:</dt>
59 <dd>
60- <span
61- tal:attributes="title context/date_solved/fmt:datetime"
62- tal:content="context/date_solved/fmt:approximatedate" />
63+ <tal:solved
64+ replace="structure context/date_solved/fmt:approximatedatetitle" />
65 </dd>
66 </dl>
67
68 <dl style="clear: both;">
69 <dt>Last query:</dt>
70 <dd>
71- <span
72- tal:attributes="title context/datelastquery/fmt:datetime"
73- tal:content="context/datelastquery/fmt:approximatedate" />
74+ <tal:last-query
75+ replace="structure context/datelastquery/fmt:approximatedatetitle" />
76 </dd>
77 </dl>
78
79 <dl>
80 <dt>Last reply:</dt>
81 <dd>
82- <span
83- tal:attributes="title context/datelastresponse/fmt:datetime"
84- tal:content="context/datelastresponse/fmt:approximatedate" />
85+ <tal:last-response
86+ replace="structure context/datelastresponse/fmt:approximatedatetitle" />
87 </dd>
88 </dl>
89 </div>
90diff --git a/lib/lp/answers/templates/question-portlet-reopenings.pt b/lib/lp/answers/templates/question-portlet-reopenings.pt
91index ad459ec..883504e 100644
92--- a/lib/lp/answers/templates/question-portlet-reopenings.pt
93+++ b/lib/lp/answers/templates/question-portlet-reopenings.pt
94@@ -9,11 +9,9 @@
95
96 <ul>
97 <li tal:repeat="reop context/reopenings">
98- <span
99- tal:attributes="title reop/datecreated/fmt:datetime"
100- tal:content="reop/datecreated/fmt:approximatedate">
101- 2005-10-05
102- </span> by
103+ <tal:created
104+ replace="structure reop/datecreated/fmt:approximatedatetitle" />
105+ by
106 <a tal:replace="structure reop/reopener/fmt:link">Foo Bar</a>
107 </li>
108 </ul>
109diff --git a/lib/lp/answers/templates/questiontarget-portlet-latestquestions.pt b/lib/lp/answers/templates/questiontarget-portlet-latestquestions.pt
110index 916cc82..8ce08c6 100644
111--- a/lib/lp/answers/templates/questiontarget-portlet-latestquestions.pt
112+++ b/lib/lp/answers/templates/questiontarget-portlet-latestquestions.pt
113@@ -16,7 +16,9 @@
114 href question/fmt:url;"
115 tal:content="question/title/fmt:shorten/80">question title</a>
116 <br /><span class="registered">
117- Posted <tal:when replace="question/datecreated/fmt:displaydate" />
118+ Posted
119+ <tal:when
120+ replace="structure question/datecreated/fmt:displaydatetitle" />
121 </span>
122 </li>
123 </ul>
124diff --git a/lib/lp/app/browser/tales.py b/lib/lp/app/browser/tales.py
125index 3020b39..17fd33f 100644
126--- a/lib/lp/app/browser/tales.py
127+++ b/lib/lp/app/browser/tales.py
128@@ -505,11 +505,13 @@ class NoneFormatter:
129
130 allowed_names = set([
131 'approximatedate',
132+ 'approximatedatetitle',
133 'approximateduration',
134 'break-long-words',
135 'date',
136 'datetime',
137 'displaydate',
138+ 'displaydatetitle',
139 'isodate',
140 'email-to-html',
141 'exactduration',
142@@ -2319,6 +2321,25 @@ class DateTimeFormatterAPI:
143 def isodate(self):
144 return self._datetime.isoformat()
145
146+ def displaydatetitle(self):
147+ # Like `displaydate`, but wrapped in an HTML element with `title` and
148+ # `datetime` attributes in order that browsers show the timestamp as
149+ # hover text. This is suitable for use when the underlying timestamp
150+ # is exact rather than being an estimate.
151+ return structured(
152+ '<time title="%s" datetime="%s">%s</time>',
153+ self.datetime(), self.isodate(), self.displaydate()).escapedtext
154+
155+ def approximatedatetitle(self):
156+ # Like `approximatedate`, but wrapped in an HTML element with `title`
157+ # and `datetime` attributes in order that browsers show the timestamp
158+ # as hover text. This is suitable for use when the underlying
159+ # timestamp is exact rather than being an estimate.
160+ return structured(
161+ '<time title="%s" datetime="%s">%s</time>',
162+ self.datetime(), self.isodate(),
163+ self.approximatedate()).escapedtext
164+
165 @staticmethod
166 def _yearDelta(old, new):
167 """Return the difference in years between two datetimes.
168diff --git a/lib/lp/app/doc/displaying-dates.txt b/lib/lp/app/doc/displaying-dates.txt
169index 22a6c0c..dbd2d54 100644
170--- a/lib/lp/app/doc/displaying-dates.txt
171+++ b/lib/lp/app/doc/displaying-dates.txt
172@@ -135,3 +135,15 @@ also expect the fmt:displaydate to change form, and become "on yyyy-mm-dd".
173 >>> test_tales('t/testfmt:displaydate', t=t)
174 'on 2015-01-13'
175
176+We have two more related TALES formatters, fmt:approximatedatetitle and
177+fmt:displaydatetitle. These act similarly to their siblings without
178+"title", but they wrap the time description in an HTML element with "title"
179+and "datetime" attributes in order that browsers show the timestamp as hover
180+text.
181+
182+ >>> print(test_tales('t/testfmt:approximatedatetitle', t=t))
183+ <time title="2015-01-13 15:35:00"
184+ datetime="2015-01-13T15:35:00">2015-01-13</time>
185+ >>> print(test_tales('t/testfmt:displaydatetitle', t=t))
186+ <time title="2015-01-13 15:35:00"
187+ datetime="2015-01-13T15:35:00">on 2015-01-13</time>
188diff --git a/lib/lp/blueprints/browser/tests/test_specification.py b/lib/lp/blueprints/browser/tests/test_specification.py
189index eef18d8..adfd2f2 100644
190--- a/lib/lp/blueprints/browser/tests/test_specification.py
191+++ b/lib/lp/blueprints/browser/tests/test_specification.py
192@@ -250,7 +250,7 @@ class TestSpecificationSet(BrowserTestCase):
193 product = self.factory.makeProduct()
194 removeSecurityProxy(product).official_blueprints = True
195 self.factory.makeSpecification(product=product)
196- limit = BrowsesWithQueryLimit(29, product.owner, rootsite='blueprints')
197+ limit = BrowsesWithQueryLimit(30, product.owner, rootsite='blueprints')
198 self.assertThat(product, limit)
199 login_celebrity('admin')
200 [self.factory.makeSpecification(product=product) for i in range(4)]
201diff --git a/lib/lp/blueprints/templates/hassprints-portlet-coming-sprints.pt b/lib/lp/blueprints/templates/hassprints-portlet-coming-sprints.pt
202index 7244eeb..c05b346 100644
203--- a/lib/lp/blueprints/templates/hassprints-portlet-coming-sprints.pt
204+++ b/lib/lp/blueprints/templates/hassprints-portlet-coming-sprints.pt
205@@ -17,7 +17,9 @@
206 tal:content="sprint/title" />
207 on <tal:when replace="sprint/time_starts/fmt:date" />
208 <br/><span class="registered">
209- Registered <tal:when replace="sprint/datecreated/fmt:displaydate" />
210+ Registered
211+ <tal:when
212+ replace="structure sprint/datecreated/fmt:displaydatetitle" />
213 </span>
214 </li>
215 </ul>
216diff --git a/lib/lp/blueprints/templates/specification-index.pt b/lib/lp/blueprints/templates/specification-index.pt
217index c832353..37528bf 100644
218--- a/lib/lp/blueprints/templates/specification-index.pt
219+++ b/lib/lp/blueprints/templates/specification-index.pt
220@@ -163,10 +163,11 @@
221
222 <dl id="started-by"
223 tal:attributes="class context/starter/css:select/visible/hidden">
224- <dt>Started by</dt>
225- <dd>
226- <tal:starter replace="structure context/starter/fmt:link" />
227- <tal:started_date replace="context/date_started/fmt:displaydate" />
228+ <dt>Started by</dt>
229+ <dd>
230+ <tal:starter replace="structure context/starter/fmt:link" />
231+ <tal:started_date
232+ replace="structure context/date_started/fmt:displaydatetitle" />
233 </dd>
234 </dl>
235
236@@ -174,8 +175,9 @@
237 tal:attributes="class context/completer/css:select/visible/hidden">
238 <dt>Completed by</dt>
239 <dd>
240- <tal:completer replace="structure context/completer/fmt:link" />
241- <tal:completed_date replace="context/date_completed/fmt:displaydate" />
242+ <tal:completer replace="structure context/completer/fmt:link" />
243+ <tal:completed_date
244+ replace="structure context/date_completed/fmt:displaydatetitle" />
245 </dd>
246 </dl>
247 </div>
248diff --git a/lib/lp/blueprints/templates/specificationtarget-portlet-latestspecs.pt b/lib/lp/blueprints/templates/specificationtarget-portlet-latestspecs.pt
249index 14b514d..6b9cea2 100644
250--- a/lib/lp/blueprints/templates/specificationtarget-portlet-latestspecs.pt
251+++ b/lib/lp/blueprints/templates/specificationtarget-portlet-latestspecs.pt
252@@ -16,7 +16,8 @@
253 <li tal:repeat="spec specs">
254 <a tal:replace="structure spec/fmt:link" />
255 <br /><span class="registered">
256- Registered <tal:when replace="spec/datecreated/fmt:displaydate" />
257+ Registered
258+ <tal:when replace="structure spec/datecreated/fmt:displaydatetitle" />
259 </span>
260 </li>
261 </ul>
262diff --git a/lib/lp/blueprints/templates/sprint-listing-simple.pt b/lib/lp/blueprints/templates/sprint-listing-simple.pt
263index 3c6dbf6..1daac1b 100644
264--- a/lib/lp/blueprints/templates/sprint-listing-simple.pt
265+++ b/lib/lp/blueprints/templates/sprint-listing-simple.pt
266@@ -9,9 +9,7 @@
267 background: url(/@@/meeting) center left no-repeat; padding-left: 18px;
268 "
269 >
270- <span
271- tal:attributes="title context/time_starts/fmt:datetime"
272- tal:content="context/time_starts/fmt:approximatedate"
273- >2005-10-05</span>:
274+ <tal:starts
275+ replace="structure context/time_starts/fmt:approximatedatetitle" />:
276 <a tal:attributes="href context/fmt:url" tal:content="context/title" /> </div>
277 </tal:root>
278diff --git a/lib/lp/bugs/templates/bugtarget-macros-filebug.pt b/lib/lp/bugs/templates/bugtarget-macros-filebug.pt
279index 1868d64..906664f 100644
280--- a/lib/lp/bugs/templates/bugtarget-macros-filebug.pt
281+++ b/lib/lp/bugs/templates/bugtarget-macros-filebug.pt
282@@ -322,9 +322,7 @@
283 replace="string: comments" />)
284 last updated
285 <tal:last-updated
286- content="bug/date_last_updated/fmt:approximatedate">
287- 2007-07-03
288- </tal:last-updated>
289+ replace="structure bug/date_last_updated/fmt:approximatedatetitle" />
290 <a class="sprite new-window view-bug-link action-icon"
291 target="_blank" tal:attributes="href bug/fmt:url"
292 >view this bug</a>
293diff --git a/lib/lp/bugs/templates/bugtarget-portlet-latestbugs.pt b/lib/lp/bugs/templates/bugtarget-portlet-latestbugs.pt
294index 7ab60fe..0a59db0 100644
295--- a/lib/lp/bugs/templates/bugtarget-portlet-latestbugs.pt
296+++ b/lib/lp/bugs/templates/bugtarget-portlet-latestbugs.pt
297@@ -12,7 +12,9 @@
298 <li tal:repeat="bugtask view/latestBugTasks">
299 <a tal:replace="structure bugtask/fmt:link" />
300 <br /><span class="registered">
301- Reported <tal:when replace="bugtask/datecreated/fmt:displaydate" />
302+ Reported
303+ <tal:when
304+ replace="structure bugtask/datecreated/fmt:displaydatetitle" />
305 </span>
306 </li>
307 </ul>
308diff --git a/lib/lp/bugs/templates/bugtask-edit-form.pt b/lib/lp/bugs/templates/bugtask-edit-form.pt
309index f41d53a..1e1a5e6 100644
310--- a/lib/lp/bugs/templates/bugtask-edit-form.pt
311+++ b/lib/lp/bugs/templates/bugtask-edit-form.pt
312@@ -63,51 +63,36 @@
313 <tr>
314 <th>When:</th>
315 <td>
316- <span
317- tal:attributes="title context/datecreated/fmt:datetime"
318- tal:content="context/datecreated/fmt:approximatedate">
319- 2006-12-13
320- </span>
321+ <tal:created
322+ replace="structure context/datecreated/fmt:approximatedatetitle" />
323 </td>
324 </tr>
325 <tr tal:condition="context/date_confirmed">
326 <th>Confirmed:</th>
327 <td>
328- <span
329- tal:attributes="title context/date_confirmed/fmt:datetime"
330- tal:content="context/date_confirmed/fmt:approximatedate">
331- 2006-12-13
332- </span>
333+ <tal:confirmed
334+ replace="structure context/date_confirmed/fmt:approximatedatetitle" />
335 </td>
336 </tr>
337 <tr tal:condition="context/date_assigned">
338 <th>Assigned:</th>
339 <td>
340- <span
341- tal:attributes="title context/date_assigned/fmt:datetime"
342- tal:content="context/date_assigned/fmt:approximatedate">
343- 2006-12-13
344- </span>
345+ <tal:assigned
346+ replace="structure context/date_assigned/fmt:approximatedatetitle" />
347 </td>
348 </tr>
349 <tr tal:condition="context/date_inprogress">
350 <th>Started work:</th>
351 <td>
352- <span
353- tal:attributes="title context/date_inprogress/fmt:datetime"
354- tal:content="context/date_inprogress/fmt:approximatedate">
355- 2006-12-13
356- </span>
357+ <tal:in-progress
358+ replace="structure context/date_inprogress/fmt:approximatedatetitle" />
359 </td>
360 </tr>
361 <tr tal:condition="context/date_closed">
362 <th>Completed:</th>
363 <td>
364- <span
365- tal:attributes="title context/date_closed/fmt:datetime"
366- tal:content="context/date_closed/fmt:approximatedate">
367- 2006-12-13
368- </span>
369+ <tal:closed
370+ replace="structure context/date_closed/fmt:approximatedatetitle" />
371 </td>
372 </tr>
373 </table>
374diff --git a/lib/lp/bugs/templates/bugtracker-portlet-watches.pt b/lib/lp/bugs/templates/bugtracker-portlet-watches.pt
375index 636be4f..b1afb0c 100644
376--- a/lib/lp/bugs/templates/bugtracker-portlet-watches.pt
377+++ b/lib/lp/bugs/templates/bugtracker-portlet-watches.pt
378@@ -46,11 +46,8 @@
379 </td>
380 <td><tal:status tal:replace="watch/remotestatus"/></td>
381 <td>
382- <span
383- tal:attributes="title watch/lastchecked/fmt:datetime"
384- tal:content="watch/lastchecked/fmt:approximatedate">
385- 13 Jan 2004
386- </span>
387+ <tal:last-checked
388+ replace="structure watch/lastchecked/fmt:approximatedatetitle" />
389 </td>
390 <td>
391 <span tal:content="watch/next_check/fmt:datetime">
392diff --git a/lib/lp/bugs/templates/bugwatch-portlet-activity.pt b/lib/lp/bugs/templates/bugwatch-portlet-activity.pt
393index 37b4426..2cba055 100644
394--- a/lib/lp/bugs/templates/bugwatch-portlet-activity.pt
395+++ b/lib/lp/bugs/templates/bugwatch-portlet-activity.pt
396@@ -40,7 +40,7 @@
397 <tal:oopsid condition="activity/oops_id">
398 (<tal:oops_link replace="structure activity/oops_id/fmt:oops-id" />)
399 </tal:oopsid>
400- <tal:time replace="activity/date/fmt:displaydate" />
401+ <tal:time replace="structure activity/date/fmt:displaydatetitle" />
402 </div>
403 </tal:activity>
404 </div>
405diff --git a/lib/lp/bugs/templates/bugwatch-portlet-details.pt b/lib/lp/bugs/templates/bugwatch-portlet-details.pt
406index f87c2b0..f55d69a 100644
407--- a/lib/lp/bugs/templates/bugwatch-portlet-details.pt
408+++ b/lib/lp/bugs/templates/bugwatch-portlet-details.pt
409@@ -31,21 +31,15 @@
410 <dl class="bugwatch-data">
411 <dt>Changed:</dt>
412 <dd>
413- <span
414- tal:attributes="title context/lastchanged/fmt:datetime"
415- tal:content="context/lastchanged/fmt:approximatedate">
416- 12 Jan 2004
417- </span>
418+ <tal:last-changed
419+ replace="structure context/lastchanged/fmt:approximatedatetitle" />
420 </dd>
421 </dl>
422 <dl class="bugwatch-data" id="bugwatch-lastchecked">
423 <dt>Checked:</dt>
424 <dd>
425- <span
426- tal:attributes="title context/lastchecked/fmt:datetime"
427- tal:content="context/lastchecked/fmt:approximatedate">
428- 13 Jan 2004
429- </span>
430+ <tal:last-checked
431+ replace="structure context/lastchecked/fmt:approximatedatetitle" />
432 </dd>
433 </dl>
434 <dl class="bugwatch-data" id="bugwatch-next_check">
435@@ -65,11 +59,8 @@
436 <dl class="bugwatch-data">
437 <dt>Created:</dt>
438 <dd>
439- <span
440- tal:attributes="title context/datecreated/fmt:datetime"
441- tal:content="context/datecreated/fmt:approximatedate">
442- 15 Jan 2003
443- </span>
444+ <tal:created
445+ replace="structure context/datecreated/fmt:approximatedatetitle" />
446 </dd>
447 </dl>
448 <dl class="bugwatch-data">
449diff --git a/lib/lp/bugs/templates/cve-listing-detailed.pt b/lib/lp/bugs/templates/cve-listing-detailed.pt
450index 9fb27d3..b847665 100644
451--- a/lib/lp/bugs/templates/cve-listing-detailed.pt
452+++ b/lib/lp/bugs/templates/cve-listing-detailed.pt
453@@ -11,13 +11,11 @@
454 </div>
455 <div>
456 Created
457- <span
458- tal:attributes="title context/datecreated/fmt:datetime"
459- tal:content="context/datecreated/fmt:displaydate">2005-10-12</span>
460+ <tal:created
461+ replace="structure context/datecreated/fmt:displaydatetitle" />
462 and modified
463- <span
464- tal:attributes="title context/datemodified/fmt:datetime"
465- tal:replace="context/datemodified/fmt:displaydate">2005-10-12</span>.
466+ <tal:modified
467+ replace="structure context/datemodified/fmt:displaydatetitle" />.
468 </div>
469 </div>
470 <hr />
471diff --git a/lib/lp/code/browser/tests/test_branchmergeproposallisting.py b/lib/lp/code/browser/tests/test_branchmergeproposallisting.py
472index 5bc790e..b083358 100644
473--- a/lib/lp/code/browser/tests/test_branchmergeproposallisting.py
474+++ b/lib/lp/code/browser/tests/test_branchmergeproposallisting.py
475@@ -31,6 +31,7 @@ from lp.code.interfaces.gitrepository import IGitRepositorySet
476 from lp.registry.enums import SharingPermission
477 from lp.registry.model.personproduct import PersonProduct
478 from lp.services.database.sqlbase import flush_database_caches
479+from lp.services.webapp.interfaces import IOpenLaunchBag
480 from lp.services.webapp.publisher import canonical_url
481 from lp.testing import (
482 admin_logged_in,
483@@ -973,6 +974,9 @@ class ActiveReviewsPerformanceMixin:
484 recorder1, view1 = self.createProductBMPsAndRecordQueries(base_bmps)
485 self.assertEqual(base_bmps, view1.proposal_count)
486 self.addDetail("r1tb", text_content(str(recorder1)))
487+ # Clear the LaunchBag so that the user's time zone is fetched again,
488+ # for fmt:displaydatetitle.
489+ getUtility(IOpenLaunchBag).clear()
490 recorder2, view2 = self.createProductBMPsAndRecordQueries(
491 base_bmps + added_bmps)
492 self.assertEqual(base_bmps + added_bmps, view2.proposal_count)
493diff --git a/lib/lp/code/templates/branch-index.pt b/lib/lp/code/templates/branch-index.pt
494index f9b9b72..cf84904 100644
495--- a/lib/lp/code/templates/branch-index.pt
496+++ b/lib/lp/code/templates/branch-index.pt
497@@ -57,10 +57,11 @@
498 <tal:registering metal:fill-slot="registering">
499 Created by
500 <tal:registrant replace="structure context/registrant/fmt:link" />
501- on
502- <tal:created-on replace="structure context/date_created/fmt:date" />
503- and last modified on
504- <tal:last-modified replace="structure context/date_last_modified/fmt:date" />
505+ <tal:created-on
506+ replace="structure context/date_created/fmt:displaydatetitle" />
507+ and last modified
508+ <tal:last-modified
509+ replace="structure context/date_last_modified/fmt:displaydatetitle" />
510 </tal:registering>
511
512
513diff --git a/lib/lp/code/templates/branch-listing.pt b/lib/lp/code/templates/branch-listing.pt
514index 15767ba..ed8a65c 100644
515--- a/lib/lp/code/templates/branch-listing.pt
516+++ b/lib/lp/code/templates/branch-listing.pt
517@@ -120,10 +120,8 @@ replace='structure string:&lt;script type="text/javascript"&gt;
518 tal:content="branch/date_created/fmt:datetime">
519 2005-02-12 13:45 EST
520 </span>
521- <span tal:attributes="title branch/date_created/fmt:datetime"
522- tal:content="branch/date_created/fmt:approximatedate">
523- sometime
524- </span>
525+ <tal:created
526+ replace="structure branch/date_created/fmt:approximatedatetitle" />
527 </td>
528 <td tal:condition="context/show_column/product|nothing">
529 <a tal:condition="branch/product"
530@@ -138,10 +136,8 @@ replace='structure string:&lt;script type="text/javascript"&gt;
531 tal:content="branch/date_last_modified/fmt:datetime">
532 2005-02-12 13:45 EST
533 </span>
534- <span tal:attributes="title branch/date_last_modified/fmt:datetime"
535- tal:content="branch/date_last_modified/fmt:approximatedate">
536- sometime
537- </span>
538+ <tal:last-modified
539+ replace="structure branch/date_last_modified/fmt:approximatedatetitle" />
540 </td>
541
542 <tal:no_commit condition="not: branch/last_commit">
543diff --git a/lib/lp/code/templates/branch-macros.pt b/lib/lp/code/templates/branch-macros.pt
544index a5f1600..54c94bf 100644
545--- a/lib/lp/code/templates/branch-macros.pt
546+++ b/lib/lp/code/templates/branch-macros.pt
547@@ -62,9 +62,8 @@
548 <div tal:condition="mergeproposal/queue_status/enumvalue:MERGED"
549 class="branchstatusMERGED">
550 Merged
551- <tal:merged replace="mergeproposal/date_merged/fmt:approximatedate">
552- 2007-06-04
553- </tal:merged>
554+ <tal:merged
555+ replace="structure mergeproposal/date_merged/fmt:approximatedatetitle" />
556 <tal:have-revision condition="mergeproposal/merged_revision">
557 at revision <tal:revision replace="mergeproposal/merged_revision"/>
558 </tal:have-revision>
559diff --git a/lib/lp/code/templates/branch-messages.pt b/lib/lp/code/templates/branch-messages.pt
560index 8a9838a..28216db 100644
561--- a/lib/lp/code/templates/branch-messages.pt
562+++ b/lib/lp/code/templates/branch-messages.pt
563@@ -31,11 +31,11 @@
564 <tal:mirrored-yet tal:condition="branch/last_mirrored">
565 This branch may be out of date, as Launchpad has not been able to
566 access between
567- <span tal:attributes="title branch/last_mirrored/fmt:datetime"
568- tal:content="branch/last_mirrored/fmt:approximatedate" />
569+ <tal:last-mirrored
570+ replace="structure branch/last_mirrored/fmt:approximatedatetitle" />
571 and
572- <span tal:attributes="title branch/last_mirror_attempt/fmt:datetime"
573- tal:content="branch/last_mirror_attempt/fmt:approximatedate" />.
574+ <tal:last-mirror-attempt
575+ replace="structure branch/last_mirror_attempt/fmt:approximatedatetitle" />.
576 </tal:mirrored-yet>
577 <tal:not-mirrored-yet tal:condition="not:branch/last_mirrored">
578 Launchpad has not been able to mirror this branch. The last attempt
579@@ -57,8 +57,8 @@
580 <tal:mirror-scheduled tal:condition="not:view/mirror_disabled">
581 Launchpad will try again
582 <tal:mirror-in-future tal:condition="not:view/in_mirror_queue">
583- <span tal:attributes="title branch/next_mirror_time/fmt:datetime"
584- tal:content="branch/next_mirror_time/fmt:approximatedate" />.
585+ <tal:next-mirror-time
586+ replace="structure branch/next_mirror_time/fmt:approximatedatetitle" />.
587 <tal:owner condition="branch/required:launchpad.Edit">
588 If you have fixed the problem, please ask Launchpad to try again.
589
590@@ -84,8 +84,8 @@
591 <tal:mirrored-yet tal:condition="branch/last_mirrored">
592 This branch may be out of date, because Launchpad has not been
593 able to access it since
594- <span tal:attributes="title branch/last_mirrored/fmt:datetime"
595- tal:content="branch/last_mirrored/fmt:approximatedate" />.
596+ <tal:last-mirrored
597+ replace="structure branch/last_mirrored/fmt:approximatedatetitle" />.
598 </tal:mirrored-yet>
599 <tal:not-mirrored-yet tal:condition="not:branch/last_mirrored">
600 This branch has not been mirrored, as Launchpad has been unable to
601diff --git a/lib/lp/code/templates/branch-mirror-status.pt b/lib/lp/code/templates/branch-mirror-status.pt
602index 36c5129..8d67741 100644
603--- a/lib/lp/code/templates/branch-mirror-status.pt
604+++ b/lib/lp/code/templates/branch-mirror-status.pt
605@@ -5,9 +5,10 @@
606 omit-tag="">
607 <dl id="last-mirrored">
608 <dt>Last mirrored:</dt>
609- <dd tal:attributes="title context/last_mirrored/fmt:datetime"
610- tal:condition="context/last_mirrored"
611- tal:content="context/last_mirrored/fmt:approximatedate"/>
612+ <dd tal:condition="context/last_mirrored">
613+ <tal:last-mirrored
614+ replace="structure context/last_mirrored/fmt:approximatedatetitle" />
615+ </dd>
616 <dd tal:condition="not:context/last_mirrored">Not mirrored yet</dd>
617 </dl>
618
619@@ -15,9 +16,10 @@
620 <dt>Next mirror:</dt>
621 <dd tal:condition="view/mirror_disabled">Disabled</dd>
622 <tal:mirror-enabled tal:condition="not:view/mirror_disabled">
623- <dd tal:attributes="title context/next_mirror_time/fmt:datetime"
624- tal:condition="not:view/in_mirror_queue"
625- tal:content="context/next_mirror_time/fmt:approximatedate"/>
626+ <dd tal:condition="not:view/in_mirror_queue">
627+ <tal:next-mirror-time
628+ replace="structure context/next_mirror_time/fmt:approximatedatetitle" />
629+ </dd>
630 <dd tal:condition="view/in_mirror_queue">As soon as possible</dd>
631 </tal:mirror-enabled>
632 </dl>
633diff --git a/lib/lp/code/templates/branchmergeproposal-heading.pt b/lib/lp/code/templates/branchmergeproposal-heading.pt
634index 5e5f757..69cd2ab 100644
635--- a/lib/lp/code/templates/branchmergeproposal-heading.pt
636+++ b/lib/lp/code/templates/branchmergeproposal-heading.pt
637@@ -6,7 +6,9 @@
638
639 <div>
640 <div style="float: right">
641- Proposed <tal:modified replace="context/date_created/fmt:displaydate" />
642+ Proposed
643+ <tal:modified
644+ replace="structure context/date_created/fmt:displaydatetitle" />
645
646 </div>
647 <tal:merge-fragment tal:replace="structure context/@@+link-summary" />
648diff --git a/lib/lp/code/templates/branchmergeproposal-index.pt b/lib/lp/code/templates/branchmergeproposal-index.pt
649index d29ee79..6ba4621 100644
650--- a/lib/lp/code/templates/branchmergeproposal-index.pt
651+++ b/lib/lp/code/templates/branchmergeproposal-index.pt
652@@ -56,7 +56,8 @@
653 <tal:registering metal:fill-slot="registering">
654 Proposed by
655 <tal:registrant replace="structure context/registrant/fmt:link"/>
656- <tal:modified replace="context/date_created/fmt:displaydate" />
657+ <tal:modified
658+ replace="structure context/date_created/fmt:displaydatetitle" />
659 </tal:registering>
660
661
662diff --git a/lib/lp/code/templates/branchmergeproposal-listing.pt b/lib/lp/code/templates/branchmergeproposal-listing.pt
663index 10ea94e..f1a40be 100644
664--- a/lib/lp/code/templates/branchmergeproposal-listing.pt
665+++ b/lib/lp/code/templates/branchmergeproposal-listing.pt
666@@ -45,7 +45,8 @@
667 tal:content="proposal/queue_status/title" />
668 <td>
669 <tal:registrant replace="structure proposal/registrant/fmt:link" />
670- <tal:date replace="proposal/date_review_requested/fmt:displaydate"/>
671+ <tal:date
672+ replace="structure proposal/date_review_requested/fmt:displaydatetitle" />
673 </td>
674
675 <td tal:condition="context/show_column/date_reviewed|nothing">
676@@ -54,7 +55,8 @@
677 tal:content="proposal/date_reviewed/fmt:datetime">
678 2005-02-12 13:45 EST
679 </span>
680- <tal:date replace="proposal/date_reviewed/fmt:approximatedate"/>
681+ <tal:date
682+ replace="structure proposal/date_reviewed/fmt:approximatedatetitle"/>
683 </td>
684 <td tal:condition="context/show_column/review|nothing">
685 <tal:review-vote define="comment proposal/reviewer_vote/comment|nothing">
686diff --git a/lib/lp/code/templates/branchmergeproposal-macros.pt b/lib/lp/code/templates/branchmergeproposal-macros.pt
687index c660572..627398b 100644
688--- a/lib/lp/code/templates/branchmergeproposal-macros.pt
689+++ b/lib/lp/code/templates/branchmergeproposal-macros.pt
690@@ -53,7 +53,8 @@
691 </td>
692 <td>
693 <tal:registrant replace="structure proposal/registrant/fmt:link" />
694- <tal:date replace="proposal/date_review_requested/fmt:displaydate"/>
695+ <tal:date
696+ replace="structure proposal/date_review_requested/fmt:displaydatetitle" />
697 </td>
698 <td style="text-align: right">
699 <tal:size replace='proposal/preview_diff/diff_lines_count' condition="proposal/preview_diff"/>
700diff --git a/lib/lp/code/templates/branchmergeproposal-pagelet-summary.pt b/lib/lp/code/templates/branchmergeproposal-pagelet-summary.pt
701index 09841d6..7cf4fa6 100644
702--- a/lib/lp/code/templates/branchmergeproposal-pagelet-summary.pt
703+++ b/lib/lp/code/templates/branchmergeproposal-pagelet-summary.pt
704@@ -59,7 +59,8 @@
705 <tal:reviewer replace="structure context/reviewer/fmt:link">
706 Some User
707 </tal:reviewer>
708- <tal:modified replace="context/date_reviewed/fmt:displaydate" />
709+ <tal:modified
710+ replace="structure context/date_reviewed/fmt:displaydatetitle" />
711 </td>
712 </tr>
713 <tr id="summary-row-3-approved-revision"
714diff --git a/lib/lp/code/templates/branchmergeproposal-vote-summary.pt b/lib/lp/code/templates/branchmergeproposal-vote-summary.pt
715index 8a7b051..7c3a906 100644
716--- a/lib/lp/code/templates/branchmergeproposal-vote-summary.pt
717+++ b/lib/lp/code/templates/branchmergeproposal-vote-summary.pt
718@@ -27,7 +27,8 @@
719 <tal:vote-tags condition="review/review_type_str">
720 (<tal:tag replace="review/review_type_str"/>)
721 </tal:vote-tags>
722- <tal:date replace="review/date_of_comment/fmt:displaydate" />
723+ <tal:date
724+ replace="structure review/date_of_comment/fmt:displaydatetitle" />
725 </dd>
726 <dd tal:repeat="review view/requested_reviews"
727 tal:attributes="id string:review-${review/reviewer/name}">
728@@ -39,7 +40,8 @@
729 (<tal:tag replace="review/review_type_str"/>)
730 </tal:vote-tags>
731 requested
732- <tal:date replace="review/date_requested/fmt:approximatedate"/>
733+ <tal:date
734+ replace="structure review/date_requested/fmt:approximatedatetitle" />
735 </dd>
736 <dd tal:condition="context/preview_diff"
737 tal:attributes="class string:popup-diff mp-${context/id}">
738diff --git a/lib/lp/code/templates/branchmergeproposal-votes.pt b/lib/lp/code/templates/branchmergeproposal-votes.pt
739index f6bb722..3c3f80b 100644
740--- a/lib/lp/code/templates/branchmergeproposal-votes.pt
741+++ b/lib/lp/code/templates/branchmergeproposal-votes.pt
742@@ -26,7 +26,8 @@
743 <td>
744 <tal:date-requested condition="review/show_date_requested">
745 <span tal:attributes="title string:Requested by ${review/registrant/displayname}">
746- <tal:date replace="review/date_requested/fmt:approximatedate"/>
747+ <tal:date
748+ replace="structure review/date_requested/fmt:approximatedatetitle" />
749 </span>
750 </tal:date-requested>
751 </td>
752@@ -35,7 +36,8 @@
753 tal:content="review/status_text">
754 Approved
755 </span>
756- <tal:date replace="review/date_of_comment/fmt:displaydate" />
757+ <tal:date
758+ replace="structure review/date_of_comment/fmt:displaydatetitle" />
759 <a tal:condition="review/can_change_review" href="+review">
760 <img src="/@@/edit" title="Vote again" alt="vote"/>
761 </a>
762@@ -55,7 +57,8 @@
763 <td>
764 <tal:date-requested condition="review/show_date_requested">
765 <span tal:attributes="title string:Requested by ${review/registrant/displayname}">
766- <tal:date replace="review/date_requested/fmt:approximatedate"/>
767+ <tal:date
768+ replace="structure review/date_requested/fmt:approximatedatetitle" />
769 </span>
770 </tal:date-requested>
771 </td>
772diff --git a/lib/lp/code/templates/codeimport-machine-index.pt b/lib/lp/code/templates/codeimport-machine-index.pt
773index 7237758..c72c416 100644
774--- a/lib/lp/code/templates/codeimport-machine-index.pt
775+++ b/lib/lp/code/templates/codeimport-machine-index.pt
776@@ -43,8 +43,8 @@
777 <tal:jobs repeat="job jobs">
778 <tr>
779 <td><tal:target replace="structure job/code_import/target/fmt:link"/></td>
780- <td>Started: <tal:started replace="job/date_started/fmt:approximatedate"/></td>
781- <td>Last heartbeat: <tal:heartbeat replace="job/heartbeat/fmt:approximatedate"/></td>
782+ <td>Started: <tal:started replace="structure job/date_started/fmt:approximatedatetitle"/></td>
783+ <td>Last heartbeat: <tal:heartbeat replace="structure job/heartbeat/fmt:approximatedatetitle"/></td>
784 </tr>
785 <tr tal:condition="job/logtail">
786 <td class="logtail" colspan="3"
787diff --git a/lib/lp/code/templates/codeimport-machines.pt b/lib/lp/code/templates/codeimport-machines.pt
788index e389eb6..c6068f3 100644
789--- a/lib/lp/code/templates/codeimport-machines.pt
790+++ b/lib/lp/code/templates/codeimport-machines.pt
791@@ -64,8 +64,8 @@
792 <tal:jobs repeat="job jobs">
793 <tr>
794 <td><tal:target replace="structure job/code_import/target/fmt:link"/></td>
795- <td>Started: <tal:started replace="job/date_started/fmt:approximatedate"/></td>
796- <td>Last heartbeat: <tal:heartbeat replace="job/heartbeat/fmt:approximatedate"/></td>
797+ <td>Started: <tal:started replace="structure job/date_started/fmt:approximatedatetitle"/></td>
798+ <td>Last heartbeat: <tal:heartbeat replace="structure job/heartbeat/fmt:approximatedatetitle"/></td>
799 </tr>
800 </tal:jobs>
801 </table>
802diff --git a/lib/lp/code/templates/codeimport-macros.pt b/lib/lp/code/templates/codeimport-macros.pt
803index d69d9a9..3e4d603 100644
804--- a/lib/lp/code/templates/codeimport-macros.pt
805+++ b/lib/lp/code/templates/codeimport-macros.pt
806@@ -11,14 +11,11 @@
807 <img tal:attributes="src python:view.iconForCodeImportResultStatus(result.status);
808 title result/status/title"/>
809 Import started
810- <tal:when replace="result/date_job_started/fmt:displaydate">
811- 4 hours ago
812- </tal:when>
813+ <tal:when replace="structure result/date_job_started/fmt:displaydatetitle" />
814 on <tal:machine replace="structure result/machine/fmt:link" />
815 and finished
816- <tal:when replace="result/date_job_finished/fmt:displaydate">
817- 3 hours ago
818- </tal:when>
819+ <tal:when
820+ replace="structure result/date_job_finished/fmt:displaydatetitle" />
821 taking
822 <tal:duration replace="result/job_duration/fmt:approximateduration">
823 five minutes
824diff --git a/lib/lp/code/templates/codereviewnewrevisions-header.pt b/lib/lp/code/templates/codereviewnewrevisions-header.pt
825index f80eded..50d766d 100644
826--- a/lib/lp/code/templates/codereviewnewrevisions-header.pt
827+++ b/lib/lp/code/templates/codereviewnewrevisions-header.pt
828@@ -5,6 +5,6 @@
829
830 <tal:source replace="structure context/source/fmt:link"/>
831 updated
832- <tal:date replace="context/date/fmt:displaydate" />
833+ <tal:date replace="structure context/date/fmt:displaydatetitle" />
834
835 </tal:root>
836diff --git a/lib/lp/code/templates/import-details.pt b/lib/lp/code/templates/import-details.pt
837index be10f0d..28cbb45 100644
838--- a/lib/lp/code/templates/import-details.pt
839+++ b/lib/lp/code/templates/import-details.pt
840@@ -102,9 +102,8 @@
841 An import is currently running on
842 <tal:machine content="structure job/machine/fmt:link" />,
843 and was started
844- <tal:date-started replace="job/date_started/fmt:displaydate">
845- 2 hours ago
846- </tal:date-started>.
847+ <tal:date-started
848+ replace="structure job/date_started/fmt:displaydatetitle" />.
849 <tal:is-logtail condition="job/logtail">
850 The last few lines of the job's output were:
851 <div class="logtail">
852@@ -124,9 +123,8 @@
853 </tal:requested-by-user>)</tal:requested-by>.
854 </tal:overdue>
855 <tal:not-overdue condition="not: job/isOverdue">
856- <tal:date-started replace="job/date_due/fmt:displaydate">
857- in 2 hours
858- </tal:date-started>.
859+ <tal:date-started
860+ replace="structure job/date_due/fmt:displaydatetitle" />.
861 <tal:button
862 condition="view/user"
863 replace="structure view/context/@@+request-import" />
864@@ -146,9 +144,8 @@
865 <tal:last-successful condition="code_import/date_last_successful">
866 <p>
867 Last successful import was
868- <tal:last-successful replace="code_import/date_last_successful/fmt:displaydate">
869- 2 hours ago
870- </tal:last-successful>.
871+ <tal:last-successful
872+ replace="structure code_import/date_last_successful/fmt:displaydatetitle" />.
873 </p>
874 </tal:last-successful>
875
876diff --git a/lib/lp/code/templates/sourcepackagerecipe-builds.pt b/lib/lp/code/templates/sourcepackagerecipe-builds.pt
877index 4be6686..158333e 100644
878--- a/lib/lp/code/templates/sourcepackagerecipe-builds.pt
879+++ b/lib/lp/code/templates/sourcepackagerecipe-builds.pt
880@@ -19,7 +19,8 @@
881 tal:attributes="href build/fmt:url"></a>
882 </td>
883 <td>
884- <tal:date replace="buildview/date/fmt:displaydate" />
885+ <tal:date
886+ replace="structure buildview/date/fmt:displaydatetitle" />
887 <tal:estimate condition="buildview/estimate">
888 (estimated)
889 </tal:estimate>
890@@ -48,7 +49,8 @@
891 tal:attributes="href binary/fmt:url">package - version</a>
892 </td>
893 <td>
894- <tal:date replace="binaryview/date/fmt:displaydate" />
895+ <tal:date
896+ replace="structure binaryview/date/fmt:displaydatetitle" />
897 <tal:estimate condition="binaryview/estimate">
898 (estimated)
899 </tal:estimate>
900diff --git a/lib/lp/registry/templates/announcement-macros.pt b/lib/lp/registry/templates/announcement-macros.pt
901index 07af6bc..7738d7b 100644
902--- a/lib/lp/registry/templates/announcement-macros.pt
903+++ b/lib/lp/registry/templates/announcement-macros.pt
904@@ -50,7 +50,8 @@
905 </strong>
906 <strong tal:condition="announcement/date_last_modified">
907 Updated
908- <span tal:replace="announcement/date_last_modified/fmt:displaydate" />.
909+ <tal:modified
910+ replace="structure announcement/date_last_modified/fmt:displaydatetitle" />.
911 </strong>
912 <a rel="nofollow" class="sprite external-link"
913 tal:condition="announcement/url"
914diff --git a/lib/lp/registry/templates/distributionsourcepackage-index.pt b/lib/lp/registry/templates/distributionsourcepackage-index.pt
915index 28a097a..c5bb171 100644
916--- a/lib/lp/registry/templates/distributionsourcepackage-index.pt
917+++ b/lib/lp/registry/templates/distributionsourcepackage-index.pt
918@@ -156,9 +156,9 @@
919 (<tal:component content="row/component"/>)
920 </td>
921 <td>
922- <tal:date_published condition="row/date_published">
923- <span tal:replace="row/date_published/fmt:approximatedate"/>
924- </tal:date_published>
925+ <tal:date_published
926+ condition="row/date_published"
927+ content="structure row/date_published/fmt:approximatedatetitle" />
928 <tal:not_published
929 condition="not: row/date_published"
930 content="string:(not published)"/>
931diff --git a/lib/lp/registry/templates/distroseriesdifferencecomment-latest-comment-fragment.pt b/lib/lp/registry/templates/distroseriesdifferencecomment-latest-comment-fragment.pt
932index 0298f1a..08e8add 100644
933--- a/lib/lp/registry/templates/distroseriesdifferencecomment-latest-comment-fragment.pt
934+++ b/lib/lp/registry/templates/distroseriesdifferencecomment-latest-comment-fragment.pt
935@@ -9,7 +9,7 @@
936 </tal:text>
937 <br />
938 <span class="greyed-out greylink"><tal:date
939- replace="context/comment_date/fmt:approximatedate">2005-09-16</tal:date>
940+ replace="structure context/comment_date/fmt:approximatedatetitle" />
941 by
942 <tal:author replace="structure context/comment_author/fmt:link" /></span>
943 </span>
944diff --git a/lib/lp/registry/templates/product-index.pt b/lib/lp/registry/templates/product-index.pt
945index 73d339b..7d60223 100644
946--- a/lib/lp/registry/templates/product-index.pt
947+++ b/lib/lp/registry/templates/product-index.pt
948@@ -7,7 +7,8 @@
949 i18n:domain="launchpad">
950 <tal:registering metal:fill-slot="registering">
951 Registered
952- <tal:created replace="context/datecreated/fmt:approximatedate" />
953+ <tal:created
954+ replace="structure context/datecreated/fmt:approximatedatetitle" />
955 by
956 <tal:registrant replace="structure context/registrant/fmt:link" />
957 </tal:registering>
958diff --git a/lib/lp/registry/templates/product-portlet-packages.pt b/lib/lp/registry/templates/product-portlet-packages.pt
959index 12959db..adeef6b 100644
960--- a/lib/lp/registry/templates/product-portlet-packages.pt
961+++ b/lib/lp/registry/templates/product-portlet-packages.pt
962@@ -27,7 +27,9 @@
963 tal:condition="release">
964 <strong>Version
965 <tal:version content="release/version">2.3</tal:version></strong>
966- uploaded <tal:date replace="release/dateuploaded/fmt:displaydate" />
967+ uploaded
968+ <tal:date
969+ replace="structure release/dateuploaded/fmt:displaydatetitle" />
970 </span>
971 </li>
972 </tal:pair>
973diff --git a/lib/lp/registry/templates/product-portlet-requires-subscription.pt b/lib/lp/registry/templates/product-portlet-requires-subscription.pt
974index 0bd703e..044b2c3 100644
975--- a/lib/lp/registry/templates/product-portlet-requires-subscription.pt
976+++ b/lib/lp/registry/templates/product-portlet-requires-subscription.pt
977@@ -16,7 +16,7 @@
978 <p tal:condition="context/commercial_subscription/date_expires | nothing">
979 <strong>Current subscription expires
980 <tal:date_expire
981- tal:replace="context/commercial_subscription/date_expires/fmt:displaydate"
982+ replace="structure context/commercial_subscription/date_expires/fmt:displaydatetitle"
983 />.</strong>
984 </p>
985
986diff --git a/lib/lp/registry/templates/productrelease-portlet-downloads.pt b/lib/lp/registry/templates/productrelease-portlet-downloads.pt
987index 508c664..8febf17 100644
988--- a/lib/lp/registry/templates/productrelease-portlet-downloads.pt
989+++ b/lib/lp/registry/templates/productrelease-portlet-downloads.pt
990@@ -17,7 +17,8 @@
991 </ul>
992
993 <div class="released">
994- released <tal:date replace="context/datereleased/fmt:displaydate" />
995+ released
996+ <tal:date replace="structure context/datereleased/fmt:displaydatetitle" />
997 </div>
998 </div
999 >
1000diff --git a/lib/lp/registry/templates/products-index.pt b/lib/lp/registry/templates/products-index.pt
1001index cbdd0fd..be22f03 100644
1002--- a/lib/lp/registry/templates/products-index.pt
1003+++ b/lib/lp/registry/templates/products-index.pt
1004@@ -137,7 +137,8 @@
1005 <td>
1006 <tal:link replace="structure product/fmt:link" />
1007 registered
1008- <tal:date replace="product/datecreated/fmt:displaydate" />
1009+ <tal:date
1010+ replace="structure product/datecreated/fmt:displaydatetitle" />
1011 </td>
1012 </tr>
1013 </tal:product>
1014diff --git a/lib/lp/registry/templates/project-index.pt b/lib/lp/registry/templates/project-index.pt
1015index 84c16b3..5248595 100644
1016--- a/lib/lp/registry/templates/project-index.pt
1017+++ b/lib/lp/registry/templates/project-index.pt
1018@@ -26,7 +26,8 @@
1019 <body>
1020 <tal:registering metal:fill-slot="registering">
1021 Registered
1022- <tal:created replace="context/datecreated/fmt:approximatedate" />
1023+ <tal:created
1024+ replace="structure context/datecreated/fmt:approximatedatetitle" />
1025 by
1026 <tal:registrant replace="structure context/registrant/fmt:link" />
1027 </tal:registering>
1028diff --git a/lib/lp/services/comments/templates/comment-header.pt b/lib/lp/services/comments/templates/comment-header.pt
1029index 49c164c..2d8cbe2 100644
1030--- a/lib/lp/services/comments/templates/comment-header.pt
1031+++ b/lib/lp/services/comments/templates/comment-header.pt
1032@@ -5,5 +5,5 @@
1033
1034 <tal:author replace="structure context/comment_author/fmt:link-display-name-id"/>
1035 <tal:has-body condition="context/has_body">wrote</tal:has-body>
1036- <tal:date replace="context/comment_date/fmt:displaydate" />
1037+ <tal:date replace="structure context/comment_date/fmt:displaydatetitle" />
1038 </tal:root>
1039diff --git a/lib/lp/services/oauth/templates/oauth-authorize.pt b/lib/lp/services/oauth/templates/oauth-authorize.pt
1040index 1ae4611..5eb5f0c 100644
1041--- a/lib/lp/services/oauth/templates/oauth-authorize.pt
1042+++ b/lib/lp/services/oauth/templates/oauth-authorize.pt
1043@@ -164,7 +164,7 @@
1044 <p tal:condition="view/token/date_expires">
1045 The integration you just authorized will expire
1046 <tal:date
1047- replace="structure view/token/date_expires/fmt:approximatedate" />.
1048+ replace="structure view/token/date_expires/fmt:approximatedatetitle" />.
1049 At that time, you'll have to re-authorize
1050 <strong
1051 tal:content="view/token/consumer/integrated_desktop_name">hostname</strong>,
1052diff --git a/lib/lp/snappy/templates/snap-index.pt b/lib/lp/snappy/templates/snap-index.pt
1053index ccbcf0c..48607a0 100644
1054--- a/lib/lp/snappy/templates/snap-index.pt
1055+++ b/lib/lp/snappy/templates/snap-index.pt
1056@@ -172,7 +172,7 @@
1057 </td>
1058 <td>
1059 <tal:date condition="request/date_finished"
1060- replace="request/date_finished/fmt:displaydate"/>
1061+ replace="structure request/date_finished/fmt:displaydatetitle"/>
1062 <tal:error-message condition="request/error_message">
1063 (<span tal:replace="request/error_message"/>)
1064 </tal:error-message>
1065@@ -192,7 +192,7 @@
1066 tal:attributes="href build/fmt:url"/>
1067 </td>
1068 <td class="datebuilt">
1069- <tal:date replace="build/date/fmt:displaydate"/>
1070+ <tal:date replace="structure build/date/fmt:displaydatetitle"/>
1071 <tal:estimate condition="build/estimate">
1072 (estimated)
1073 </tal:estimate>
1074diff --git a/lib/lp/soyuz/templates/archive-index.pt b/lib/lp/soyuz/templates/archive-index.pt
1075index d67a632..8f48a2a 100644
1076--- a/lib/lp/soyuz/templates/archive-index.pt
1077+++ b/lib/lp/soyuz/templates/archive-index.pt
1078@@ -134,8 +134,8 @@ sudo apt-get update
1079 <span style="color: red"
1080 tal:condition="not: dependency/dependency/enabled"
1081 >[disabled]</span>
1082- (included <span
1083- tal:replace="dependency/date_created/fmt:displaydate" />)
1084+ (included <tal:created
1085+ replace="structure dependency/date_created/fmt:displaydatetitle" />)
1086 </li>
1087 </ul>
1088 </div> <!--archive-dependencies -->
1089@@ -256,9 +256,8 @@ sudo apt-get update
1090 <span tal:replace="structure signer">Joe Bloggs</span>
1091 <tal:date_published
1092 condition="publishing/datepublished">
1093- (<span
1094- tal:replace="publishing/datepublished/fmt:approximatedate">
1095- 2007-08-01</span>)
1096+ (<tal:published
1097+ replace="structure publishing/datepublished/fmt:approximatedatetitle" />)
1098 </tal:date_published>
1099 </td>
1100 </tr>
1101diff --git a/lib/lp/soyuz/templates/distroseries-portlet-latestuploads.pt b/lib/lp/soyuz/templates/distroseries-portlet-latestuploads.pt
1102index 2c530a2..6028ca7 100644
1103--- a/lib/lp/soyuz/templates/distroseries-portlet-latestuploads.pt
1104+++ b/lib/lp/soyuz/templates/distroseries-portlet-latestuploads.pt
1105@@ -19,7 +19,8 @@
1106 tal:content="source/displayname" />
1107 <br /><span class="registered"> Upload by
1108 <a tal:replace="structure source/sourcepackagerelease/creator/fmt:link" />
1109- <tal:dateuploaded replace="source/dateuploaded/fmt:displaydate" />
1110+ <tal:dateuploaded
1111+ replace="structure source/dateuploaded/fmt:displaydatetitle" />
1112 </span>
1113 </li>
1114 </ul>
1115diff --git a/lib/lp/soyuz/templates/livefs-index.pt b/lib/lp/soyuz/templates/livefs-index.pt
1116index edadcd3..0d85422 100644
1117--- a/lib/lp/soyuz/templates/livefs-index.pt
1118+++ b/lib/lp/soyuz/templates/livefs-index.pt
1119@@ -75,7 +75,8 @@
1120 tal:attributes="href build/fmt:url"/>
1121 </td>
1122 <td>
1123- <tal:date replace="buildview/date/fmt:displaydate"/>
1124+ <tal:date
1125+ replace="structure buildview/date/fmt:displaydatetitle"/>
1126 <tal:estimate condition="buildview/estimate">
1127 (estimated)
1128 </tal:estimate>
1129diff --git a/lib/lp/translations/templates/person-translations.pt b/lib/lp/translations/templates/person-translations.pt
1130index 89cb290..0b512e8 100644
1131--- a/lib/lp/translations/templates/person-translations.pt
1132+++ b/lib/lp/translations/templates/person-translations.pt
1133@@ -38,8 +38,8 @@
1134 Last translation activity by
1135 <tal:name replace="context/displayname">Foo Bar</tal:name>
1136 was
1137- <tal:date replace="view/latest_activity/date/fmt:displaydate">
1138- on 2009-10-12</tal:date>.
1139+ <tal:date
1140+ replace="structure view/latest_activity/date/fmt:displaydatetitle" />.
1141 </tal:active>
1142 <tal:inactive tal:condition="not: view/latest_activity">
1143 No translation activities recorded for
1144diff --git a/lib/lp/translations/templates/translationimportqueueentry-portlet-details.pt b/lib/lp/translations/templates/translationimportqueueentry-portlet-details.pt
1145index 0a48a43..4c1d13a 100644
1146--- a/lib/lp/translations/templates/translationimportqueueentry-portlet-details.pt
1147+++ b/lib/lp/translations/templates/translationimportqueueentry-portlet-details.pt
1148@@ -40,9 +40,8 @@
1149 <a tal:replace="structure context/importer/fmt:link">
1150 Arne Goetje
1151 </a>
1152- <tal:upload_date replace="context/dateimported/fmt:displaydate">
1153- 2010-02-10
1154- </tal:upload_date>.
1155+ <tal:upload_date
1156+ replace="structure context/dateimported/fmt:displaydatetitle" />.
1157 <tal:status_change replace="view/status_change_date">
1158 Entry last changed on 2010-02-12.
1159 </tal:status_change>

Subscribers

People subscribed via source and target branches

to status/vote changes: