Commit 2937f3c4 by Bach Dániel

dashboard: fix tx notifications

parent 04cbc0b5
...@@ -441,7 +441,7 @@ class TransferTemplateOwnershipView(TransferOwnershipView): ...@@ -441,7 +441,7 @@ class TransferTemplateOwnershipView(TransferOwnershipView):
confirm_view = TransferTemplateOwnershipConfirmView confirm_view = TransferTemplateOwnershipConfirmView
model = InstanceTemplate model = InstanceTemplate
notification_msg = ugettext_noop( notification_msg = ugettext_noop(
'%(user)s offered you to take the ownership of ' '%(owner)s offered you to take the ownership of '
'his/her template called %(instance)s. ' 'his/her template called %(instance)s. '
'<a href="%(token)s" ' '<a href="%(token)s" '
'class="btn btn-success btn-small">Accept</a>') 'class="btn btn-success btn-small">Accept</a>')
......
...@@ -610,7 +610,7 @@ class TransferOwnershipView(CheckedDetailView, DetailView): ...@@ -610,7 +610,7 @@ class TransferOwnershipView(CheckedDetailView, DetailView):
new_owner.profile.notify( new_owner.profile.notify(
ugettext_noop('Ownership offer'), ugettext_noop('Ownership offer'),
self.notification_msg, self.notification_msg,
{'instance': obj, 'token': token_path}) {'instance': obj, 'token': token_path, 'owner': request.user})
except Profile.DoesNotExist: except Profile.DoesNotExist:
messages.error(request, _('Can not notify selected user.')) messages.error(request, _('Can not notify selected user.'))
else: else:
...@@ -665,8 +665,8 @@ class TransferOwnershipConfirmView(LoginRequiredMixin, View): ...@@ -665,8 +665,8 @@ class TransferOwnershipConfirmView(LoginRequiredMixin, View):
old.profile.notify( old.profile.notify(
ugettext_noop('Ownership accepted'), ugettext_noop('Ownership accepted'),
ugettext_noop('Your ownership offer of %(instance)s has been ' ugettext_noop('Your ownership offer of %(instance)s has been '
'accepted by %(user)s.'), 'accepted by %(owner)s.'),
{'instance': instance}) {'instance': instance, 'owner': request.user})
return redirect(instance.get_absolute_url()) return redirect(instance.get_absolute_url())
def get_instance(self, key, user): def get_instance(self, key, user):
......
...@@ -1297,7 +1297,7 @@ class TransferInstanceOwnershipView(TransferOwnershipView): ...@@ -1297,7 +1297,7 @@ class TransferInstanceOwnershipView(TransferOwnershipView):
confirm_view = TransferInstanceOwnershipConfirmView confirm_view = TransferInstanceOwnershipConfirmView
model = Instance model = Instance
notification_msg = ugettext_noop( notification_msg = ugettext_noop(
'%(user)s offered you to take the ownership of ' '%(owner)s offered you to take the ownership of '
'his/her virtual machine called %(instance)s. ' 'his/her virtual machine called %(instance)s. '
'<a href="%(token)s" ' '<a href="%(token)s" '
'class="btn btn-success btn-small">Accept</a>') 'class="btn btn-success btn-small">Accept</a>')
......
...@@ -2686,11 +2686,11 @@ msgstr "" ...@@ -2686,11 +2686,11 @@ msgstr ""
#: dashboard/views/template.py:444 #: dashboard/views/template.py:444
#, python-format #, python-format
msgid "" msgid ""
"%(user)s offered you to take the ownership of his/her template called " "%(owner)s offered you to take the ownership of his/her template called "
"%(instance)s. <a href=\"%(token)s\" class=\"btn btn-success btn-" "%(instance)s. <a href=\"%(token)s\" class=\"btn btn-success btn-"
"small\">Accept</a>" "small\">Accept</a>"
msgstr "" msgstr ""
"%(user)s át kívánja ruházni %(instance)s nevű sablonját Önre. <a " "%(owner)s át kívánja ruházni %(instance)s nevű sablonját Önre. <a "
"href=\"%(token)s\" class=\"btn btn-success btn-small\">Elfogadás</a>" "href=\"%(token)s\" class=\"btn btn-success btn-small\">Elfogadás</a>"
#: dashboard/views/user.py:150 #: dashboard/views/user.py:150
...@@ -2856,8 +2856,8 @@ msgstr "Átruházás elfogadva" ...@@ -2856,8 +2856,8 @@ msgstr "Átruházás elfogadva"
#: dashboard/views/util.py:667 #: dashboard/views/util.py:667
#, python-format #, python-format
msgid "Your ownership offer of %(instance)s has been accepted by %(user)s." msgid "Your ownership offer of %(instance)s has been accepted by %(owner)s."
msgstr "%(instance)s gépre vonatkozó átruházási ajánlatát elfogadta %(user)s." msgstr "%(instance)s gépre vonatkozó átruházási ajánlatát elfogadta %(owner)s."
#: dashboard/views/util.py:716 #: dashboard/views/util.py:716
msgid "Only the owners can delete the selected object." msgid "Only the owners can delete the selected object."
...@@ -2924,11 +2924,11 @@ msgstr "tulajdon átruházása" ...@@ -2924,11 +2924,11 @@ msgstr "tulajdon átruházása"
#: dashboard/views/vm.py:1300 #: dashboard/views/vm.py:1300
#, python-format #, python-format
msgid "" msgid ""
"%(user)s offered you to take the ownership of his/her virtual machine called" "%(owner)s offered you to take the ownership of his/her virtual machine called"
" %(instance)s. <a href=\"%(token)s\" class=\"btn btn-success btn-" " %(instance)s. <a href=\"%(token)s\" class=\"btn btn-success btn-"
"small\">Accept</a>" "small\">Accept</a>"
msgstr "" msgstr ""
"%(user)s át kívánja ruházni %(instance)s nevű virtuális gépét Önre. <a " "%(owner)s át kívánja ruházni %(instance)s nevű virtuális gépét Önre. <a "
"href=\"%(token)s\" class=\"btn btn-success btn-small\">Elfogadás</a>" "href=\"%(token)s\" class=\"btn btn-success btn-small\">Elfogadás</a>"
#: firewall/fields.py:42 #: firewall/fields.py:42
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment