Skip to content

Commit d469f0f

Browse files
author
Alexander Smishlajev
committed
use translation for boolean property rendering [SF#1225152]
1 parent 87d2eb8 commit d469f0f

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Fixed:
88
- fix name collision in roundup.cgi script (sf bug 1203795)
99
- fix handling of invalid interval input
1010
- search locale files relative ro roundup installation path (sf bug 1219689)
11+
- use translation for boolean property rendering (sf bug 1225152)
1112

1213

1314
2005-05-02 0.8.3

roundup/cgi/templating.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,7 +1327,7 @@ def plain(self):
13271327

13281328
if self._value is None:
13291329
return ''
1330-
return self._value and "Yes" or "No"
1330+
return self._value and self._("Yes") or self._("No")
13311331

13321332
def field(self):
13331333
''' Render a form edit field for the property
@@ -1346,15 +1346,15 @@ def field(self):
13461346
if value:
13471347
s = self.input(type="radio", name=self._formname, value="yes",
13481348
checked="checked")
1349-
s += 'Yes'
1349+
s += self._('Yes')
13501350
s +=self.input(type="radio", name=self._formname, value="no")
1351-
s += 'No'
1351+
s += self._('No')
13521352
else:
13531353
s = self.input(type="radio", name=self._formname, value="yes")
1354-
s += 'Yes'
1354+
s += self._('Yes')
13551355
s +=self.input(type="radio", name=self._formname, value="no",
13561356
checked="checked")
1357-
s += 'No'
1357+
s += self._('No')
13581358
return s
13591359

13601360
class DateHTMLProperty(HTMLProperty):

0 commit comments

Comments
 (0)