changeset 3354:201dbcf63a30

use translation for boolean property rendering [SF#1225152]
author Alexander Smishlajev <a1s@users.sourceforge.net>
date Wed, 22 Jun 2005 07:24:20 +0000
parents e27694724793
children 2913b42c0810
files CHANGES.txt roundup/cgi/templating.py
diffstat 2 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES.txt	Wed Jun 22 06:36:51 2005 +0000
+++ b/CHANGES.txt	Wed Jun 22 07:24:20 2005 +0000
@@ -15,6 +15,7 @@
 - fix name collision in roundup.cgi script (sf bug 1203795)
 - fix handling of invalid interval input
 - search locale files relative ro roundup installation path (sf bug 1219689)
+- use translation for boolean property rendering (sf bug 1225152)
 
 
 2005-05-02 0.8.3
--- a/roundup/cgi/templating.py	Wed Jun 22 06:36:51 2005 +0000
+++ b/roundup/cgi/templating.py	Wed Jun 22 07:24:20 2005 +0000
@@ -1328,7 +1328,7 @@
 
         if self._value is None:
             return ''
-        return self._value and "Yes" or "No"
+        return self._value and self._("Yes") or self._("No")
 
     def field(self):
         ''' Render a form edit field for the property
@@ -1347,15 +1347,15 @@
         if value:
             s = self.input(type="radio", name=self._formname, value="yes",
                 checked="checked")
-            s += 'Yes'
+            s += self._('Yes')
             s +=self.input(type="radio", name=self._formname, value="no")
-            s += 'No'
+            s += self._('No')
         else:
             s = self.input(type="radio", name=self._formname, value="yes")
-            s += 'Yes'
+            s += self._('Yes')
             s +=self.input(type="radio", name=self._formname, value="no",
                 checked="checked")
-            s += 'No'
+            s += self._('No')
         return s
 
 class DateHTMLProperty(HTMLProperty):

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