#2700 #2490 do not translate argument on custom_filter.xml (Benny)

svn: r11964
This commit is contained in:
Jérôme Rapinat 2009-02-11 14:02:13 +00:00
parent a34cf168f3
commit 41515d57cf
5 changed files with 13 additions and 12 deletions

View File

@ -195,8 +195,9 @@ class MyLesserEqualGreater(gtk.ComboBox):
cell = gtk.CellRendererText() cell = gtk.CellRendererText()
self.pack_start(cell, True) self.pack_start(cell, True)
self.add_attribute(cell, 'text', 0) self.add_attribute(cell, 'text', 0)
self.clist = [_('lesser than'), _('equal to'), _('greater than')] self.clist = ['lesser than', 'equal to', 'greater than']
for name in self.clist: self.clist_trans = [_('lesser than'), _('equal to'), _('greater than')]
for name in self.clist_trans:
store.append(row=[name]) store.append(row=[name])
self.set_active(default) self.set_active(default)
self.show() self.show()
@ -204,14 +205,14 @@ class MyLesserEqualGreater(gtk.ComboBox):
def get_text(self): def get_text(self):
active = self.get_active() active = self.get_active()
if active < 0: if active < 0:
return _('equal to') return 'equal to'
return self.clist[active] return self.clist[active]
def set_text(self, val): def set_text(self, val):
if val in self.clist: if val in self.clist:
self.set_active(self.clist.index(val)) self.set_active(self.clist.index(val))
else: else:
self.set_active(self.clist.index(_('equal to'))) self.set_active(self.clist.index('equal to'))
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

View File

@ -47,9 +47,9 @@ class HasGalleryBase(Rule):
def prepare(self, db): def prepare(self, db):
# things we want to do just once, not for every handle # things we want to do just once, not for every handle
if self.list[1] == _('lesser than'): if self.list[1] == 'lesser than':
self.count_type = 0 self.count_type = 0
elif self.list[1] == _('greater than'): elif self.list[1] == 'greater than':
self.count_type = 2 self.count_type = 2
else: else:
self.count_type = 1 # "equal to" self.count_type = 1 # "equal to"

View File

@ -50,9 +50,9 @@ class HasLDSBase(Rule):
def prepare(self, db): def prepare(self, db):
# things we want to do just once, not for every handle # things we want to do just once, not for every handle
if self.list[1] == _('lesser than'): if self.list[1] == 'lesser than':
self.count_type = 0 self.count_type = 0
elif self.list[1] == _('greater than'): elif self.list[1] == 'greater than':
self.count_type = 2 self.count_type = 2
else: else:
self.count_type = 1 # "equal to" self.count_type = 1 # "equal to"

View File

@ -56,9 +56,9 @@ class HasNoteBase(Rule):
def prepare(self, db): def prepare(self, db):
# things we want to do just once, not for every handle # things we want to do just once, not for every handle
if self.list[1] == _('lesser than'): if self.list[1] == 'lesser than':
self.count_type = 0 self.count_type = 0
elif self.list[1] == _('greater than'): elif self.list[1] == 'greater than':
self.count_type = 2 self.count_type = 2
else: else:
self.count_type = 1 # "equal to" self.count_type = 1 # "equal to"

View File

@ -48,9 +48,9 @@ class HasSourceBase(Rule):
def prepare(self, db): def prepare(self, db):
# things we want to do just once, not for every handle # things we want to do just once, not for every handle
if self.list[1] == _('lesser than'): if self.list[1] == 'lesser than':
self.count_type = 0 self.count_type = 0
elif self.list[1] == _('greater than'): elif self.list[1] == 'greater than':
self.count_type = 2 self.count_type = 2
else: else:
self.count_type = 1 # "equal to" self.count_type = 1 # "equal to"