Skip to content

Commit 111989d

Browse files
author
Richard Jones
committed
add language to the "request" template var
1 parent 9694833 commit 111989d

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

CHANGES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
This file contains the changes to the Roundup system over time. The entries
22
are given with the most recent entry first.
33

4-
2008-02-07 1.4.2
4+
2008-02-08 1.4.2
55
Feature:
66
- New config option in mail section: ignore_alternatives allows to
77
ignore alternatives besides the text/plain part used for the content

doc/announcement.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
I'm proud to release version 1.4.2 of Roundup.
22

33
New Features in 1.4.2:
4+
45
- New config option in mail section: ignore_alternatives allows to
56
ignore alternatives besides the text/plain part used for the content
67
of a message in multipart/alternative attachments.
@@ -12,6 +13,7 @@ New Features in 1.4.2:
1213
properties with a "name" attribute) (thanks Martin v. Löwis)
1314

1415
And things fixed:
16+
1517
- Searching date range by supplying just a date as the filter spec
1618
- Handle no time.tzset under Windows (sf #1825643)
1719
- Fix race condition in file storage transaction commit (sf #1883580)

doc/customizing.txt

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Customising Roundup
33
===================
44

5-
:Version: $Revision: 1.222 $
5+
:Version: $Revision: 1.223 $
66

77
.. This document borrows from the ZopeBook section on ZPT. The original is at:
88
http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
@@ -1875,10 +1875,15 @@ The following variables are available to templates.
18751875
- the current index information (``filterspec``, ``filter`` args,
18761876
``properties``, etc) parsed out of the form.
18771877
- methods for easy filterspec link generation
1878-
- *user*, the current user item as an HTMLItem instance
1879-
- *form*
1878+
- "form"
18801879
The current CGI form information as a mapping of form argument name
1881-
to value
1880+
to value (specifically a cgi.FieldStorage)
1881+
- "env" the CGI environment variables
1882+
- "base" the base URL for this instance
1883+
- "user" a HTMLItem instance for the current user
1884+
- "language" as determined by the browser or config
1885+
- "classname" the current classname (possibly None)
1886+
- "template" the current template (suffix, also possibly None)
18821887
**config**
18831888
This variable holds all the values defined in the tracker config.ini
18841889
file (eg. TRACKER_NAME, etc.)

roundup/cgi/templating.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2140,6 +2140,7 @@ class HTMLRequest(HTMLInputMixin):
21402140
- "env" the CGI environment variables
21412141
- "base" the base URL for this instance
21422142
- "user" a HTMLItem instance for this user
2143+
- "language" as determined by the browser or config
21432144
- "classname" the current classname (possibly None)
21442145
- "template" the current template (suffix, also possibly None)
21452146
@@ -2166,6 +2167,7 @@ def __init__(self, client):
21662167
self.env = client.env
21672168
self.base = client.base
21682169
self.user = HTMLItem(client, 'user', client.userid)
2170+
self.language = client.language
21692171

21702172
# store the current class name and action
21712173
self.classname = client.classname

0 commit comments

Comments
 (0)