diff --git a/taskapp/handle.py b/taskapp/handle.py index 5e1cb91..a5f3b91 100644 --- a/taskapp/handle.py +++ b/taskapp/handle.py @@ -21,16 +21,19 @@ def handle(task, author, recipient, abon_group): # Если задача завершена elif task.state == 'F': text = _('Task completed') - # Меняем телефон назначения на телефон автора, т.к. при завершении + # Меняем цель назначения на автора, т.к. при завершении # идёт оповещение автору о выполнении dst_account = author - fulltext="%s: %s. " % (text, task.abon.get_full_name()) + fulltext="%s:\n%s\n" % (text, task.abon.get_full_name()) + fulltext += _('locality %s.\n') % abon_group.title if task.abon: - fulltext += _('address %s. telephone %s. ') % ( - task.abon.street.name if task.abon.street is not None else '', task.abon.telephone + fulltext += _('address %s %s.\ntelephone %s\n') % ( + task.abon.street.name if task.abon.street is not None else '<'+_('not chosen')+'>', + task.abon.house, + task.abon.telephone ) - fulltext += _('locality %s. Task type - %s.') % (abon_group.title, task.get_mode_display()) - fulltext += task.descr if task.descr else _('Not assigned') + fulltext += _('Task type - %s.\n') % task.get_mode_display() + fulltext += task.descr if task.descr else '' send_notify(fulltext, dst_account) except ChatException as e: raise TaskException(e) diff --git a/taskapp/locale/ru/LC_MESSAGES/django.po b/taskapp/locale/ru/LC_MESSAGES/django.po index b0ce0b0..960b576 100644 --- a/taskapp/locale/ru/LC_MESSAGES/django.po +++ b/taskapp/locale/ru/LC_MESSAGES/django.po @@ -33,13 +33,16 @@ msgstr "Задача завершена" #: taskapp/handle.py:29 #, python-format -msgid "address %s. telephone %s. " -msgstr "по адресу %s тел. %s. " +msgid "address %s %s.\ntelephone %s\n" +msgstr "адрес: %s %s\nтел. %s\n" #: taskapp/handle.py:32 #, python-format -msgid "locality %s. Task type - %s. " -msgstr "с. %s. Тип задачи - %s. " +msgid "locality %s.\n" +msgstr "с. %s.\n" + +msgid "Task type - %s.\n" +msgstr "Тип задачи - %s.\n" #: taskapp/handle.py:33 taskapp/templates/taskapp/view.html.py:34 msgid "Not assigned"