changeset 3968:5857cd1a0db9

add language to the "request" template var
author Richard Jones <richard@users.sourceforge.net>
date Tue, 19 Feb 2008 23:45:33 +0000
parents b1e81ad3fa6a
children 905faf52a51f
files CHANGES.txt doc/announcement.txt doc/customizing.txt roundup/cgi/templating.py
diffstat 4 files changed, 14 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES.txt	Thu Feb 07 05:01:42 2008 +0000
+++ b/CHANGES.txt	Tue Feb 19 23:45:33 2008 +0000
@@ -1,7 +1,7 @@
 This file contains the changes to the Roundup system over time. The entries
 are given with the most recent entry first.
 
-2008-02-07 1.4.2
+2008-02-08 1.4.2
 Feature:
 - New config option in mail section: ignore_alternatives allows to
   ignore alternatives besides the text/plain part used for the content
--- a/doc/announcement.txt	Thu Feb 07 05:01:42 2008 +0000
+++ b/doc/announcement.txt	Tue Feb 19 23:45:33 2008 +0000
@@ -1,6 +1,7 @@
 I'm proud to release version 1.4.2 of Roundup.
 
 New Features in 1.4.2:
+
 - New config option in mail section: ignore_alternatives allows to
   ignore alternatives besides the text/plain part used for the content
   of a message in multipart/alternative attachments.
@@ -12,6 +13,7 @@
   properties with a "name" attribute) (thanks Martin v. Löwis)
 
 And things fixed:
+
 - Searching date range by supplying just a date as the filter spec
 - Handle no time.tzset under Windows (sf #1825643)
 - Fix race condition in file storage transaction commit (sf #1883580)
--- a/doc/customizing.txt	Thu Feb 07 05:01:42 2008 +0000
+++ b/doc/customizing.txt	Tue Feb 19 23:45:33 2008 +0000
@@ -2,7 +2,7 @@
 Customising Roundup
 ===================
 
-:Version: $Revision: 1.222 $
+:Version: $Revision: 1.223 $
 
 .. This document borrows from the ZopeBook section on ZPT. The original is at:
    http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
@@ -1875,10 +1875,15 @@
    - the current index information (``filterspec``, ``filter`` args,
      ``properties``, etc) parsed out of the form. 
    - methods for easy filterspec link generation
-   - *user*, the current user item as an HTMLItem instance
-   - *form*
+   - "form"
      The current CGI form information as a mapping of form argument name
-     to value
+     to value (specifically a cgi.FieldStorage)
+   - "env" the CGI environment variables
+   - "base" the base URL for this instance
+   - "user" a HTMLItem instance for the current user
+   - "language" as determined by the browser or config
+   - "classname" the current classname (possibly None)
+   - "template" the current template (suffix, also possibly None)
 **config**
   This variable holds all the values defined in the tracker config.ini
   file (eg. TRACKER_NAME, etc.)
--- a/roundup/cgi/templating.py	Thu Feb 07 05:01:42 2008 +0000
+++ b/roundup/cgi/templating.py	Tue Feb 19 23:45:33 2008 +0000
@@ -2140,6 +2140,7 @@
     - "env" the CGI environment variables
     - "base" the base URL for this instance
     - "user" a HTMLItem instance for this user
+    - "language" as determined by the browser or config
     - "classname" the current classname (possibly None)
     - "template" the current template (suffix, also possibly None)
 
@@ -2166,6 +2167,7 @@
         self.env = client.env
         self.base = client.base
         self.user = HTMLItem(client, 'user', client.userid)
+        self.language = client.language
 
         # store the current class name and action
         self.classname = client.classname

Roundup Issue Tracker: http://roundup-tracker.org/