Skip to content

Commit 1bc2f97

Browse files
author
Alexander Smishlajev
committed
use translation for boolean property rendering [SF#1225152]
1 parent 449b479 commit 1bc2f97

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
@@ -15,6 +15,7 @@ Fixed:
1515
- fix name collision in roundup.cgi script (sf bug 1203795)
1616
- fix handling of invalid interval input
1717
- search locale files relative ro roundup installation path (sf bug 1219689)
18+
- use translation for boolean property rendering (sf bug 1225152)
1819

1920

2021
2005-05-02 0.8.3

roundup/cgi/templating.py

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

13291329
if self._value is None:
13301330
return ''
1331-
return self._value and "Yes" or "No"
1331+
return self._value and self._("Yes") or self._("No")
13321332

13331333
def field(self):
13341334
''' Render a form edit field for the property
@@ -1347,15 +1347,15 @@ def field(self):
13471347
if value:
13481348
s = self.input(type="radio", name=self._formname, value="yes",
13491349
checked="checked")
1350-
s += 'Yes'
1350+
s += self._('Yes')
13511351
s +=self.input(type="radio", name=self._formname, value="no")
1352-
s += 'No'
1352+
s += self._('No')
13531353
else:
13541354
s = self.input(type="radio", name=self._formname, value="yes")
1355-
s += 'Yes'
1355+
s += self._('Yes')
13561356
s +=self.input(type="radio", name=self._formname, value="no",
13571357
checked="checked")
1358-
s += 'No'
1358+
s += self._('No')
13591359
return s
13601360

13611361
class DateHTMLProperty(HTMLProperty):

0 commit comments

Comments
 (0)