Translate state.name in motion log message.

This commit is contained in:
Emanuel Schuetze 2013-11-22 10:16:15 +01:00
parent 94abda60b5
commit 301bc8ac7c
2 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ class ItemForm(CleanHtmlFormMixin, CssClassMixin, forms.ModelForm):
max_length=5,
required=False,
label=ugettext_lazy("Duration"),
help_text=ugettext_lazy('Input format: HH:MM or MM'))
help_text=ugettext_lazy('Input format: HH:MM or M or MM or MMM'))
class Meta:
model = Item

View File

@ -661,7 +661,7 @@ class MotionSetStateView(SingleObjectMixin, RedirectView):
if success:
self.object.save(update_fields=['state', 'identifier'])
self.object.write_log(
message_list=[ugettext_noop('State changed to'), ' %s' % self.object.state.name], # TODO: Change string to 'State set to ...'
message_list=[ugettext_noop('State changed to'), ' ', self.object.state.name], # TODO: Change string to 'State set to ...'
person=self.request.user)
messages.success(request,
_('The state of the motion was set to %s.')