Use 'Not rated" for zero in all rating spin boxes

This commit is contained in:
Kovid Goyal 2016-04-30 07:38:20 +05:30
parent cfe6ad37a1
commit 22af52874f
3 changed files with 4 additions and 2 deletions

View File

@ -134,7 +134,7 @@ class Rating(Int):
w = self.widgets[1]
w.setRange(0, 5)
w.setSuffix(' '+_('star(s)'))
w.setSpecialValueText(_('Unrated'))
w.setSpecialValueText(_('Not rated'))
def setter(self, val):
if val is None:
@ -794,7 +794,7 @@ class BulkRating(BulkBase):
self.make_widgets(parent, QSpinBox)
self.main_widget.setRange(0, 5)
self.main_widget.setSuffix(' '+_('star(s)'))
self.main_widget.setSpecialValueText(_('Unrated'))
self.main_widget.setSpecialValueText(_('Not rated'))
self.main_widget.setSingleStep(1)
def setter(self, val):

View File

@ -189,6 +189,7 @@ class RatingDelegate(QStyledItemDelegate, UpdateEditorGeometry): # {{{
sb.setMinimum(0)
sb.setMaximum(5)
sb.setSuffix(' ' + _('stars'))
sb.setSpecialValueText(_('Not rated'))
return sb
def get_required_width(self, editor, style, fm):

View File

@ -1242,6 +1242,7 @@ class RatingEdit(make_undoable(QSpinBox), ToMetadataMixin): # {{{
self.setWhatsThis(self.TOOLTIP)
self.setMaximum(5)
self.setSuffix(' ' + _('stars'))
self.setSpecialValueText(_('Not rated'))
@dynamic_property
def current_val(self):