Getting vm name properly in hosting views

This commit is contained in:
M.Ravi 2017-09-02 21:35:57 +02:00
parent 50431542f8
commit 8f2655bda2
2 changed files with 15 additions and 12 deletions

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-09-02 15:26+0000\n" "POT-Creation-Date: 2017-09-02 19:31+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -195,12 +195,13 @@ msgstr "Support / Kontakt"
#, python-format #, python-format
msgid "" msgid ""
"You have ordered a new virtual machine!<br/>\n" "You have ordered a new virtual machine!\n"
"Your order of [%(vm.name)s] has been charged.<br/><br/>\n" "<br/>\n"
"Your order of [%(vm_name)s] has been charged.<br/><br/>\n"
"You can view your invoice by clicking the button below.<br/><br/>\n" "You can view your invoice by clicking the button below.<br/><br/>\n"
msgstr "" msgstr ""
"Du hast eine neue virtuelle Maschine bestellt!<br/>\n" "Du hast eine neue virtuelle Maschine bestellt!<br/>\n"
"Deine Bestellung von [%(vm.name)s] wurde erhoben.<br/><br/>\n" "Deine Bestellung von [%(vm_name)s] wurde erhoben.<br/><br/>\n"
"Um die Rechnung zu sehen, klicke auf den Button unten.<br/><br/>\n" "Um die Rechnung zu sehen, klicke auf den Button unten.<br/><br/>\n"
msgid "View Invoice" msgid "View Invoice"
@ -209,14 +210,16 @@ msgstr "Zur Rechnung"
#, python-format #, python-format
msgid "" msgid ""
"You have ordered a new virtual machine!\n" "You have ordered a new virtual machine!\n"
"Your order of [%(vm.name)s] has been charged.\n" "Your order of [%(vm_name)s] has been charged.\n"
"\n" "\n"
"You can view your invoice by clicking the link below.\n" "You can view your invoice by clicking the link below.\n"
"\n" "\n"
msgstr "" msgstr ""
"Du hast eine neue virtuelle Maschine bestellt!\n" "Du hast eine neue virtuelle Maschine bestellt!\n"
"Deine Bestellung von [%(vm.name)s] wurde erhoben.\n\n" "Deine Bestellung von [%(vm_name)s] wurde erhoben.\n"
"Um die Rechnung zu sehen, klicke auf den Button unten.\n\n" "\n"
"Um die Rechnung zu sehen, klicke auf den Button unten.\n"
"\n"
msgid "Password Reset" msgid "Password Reset"
msgstr "Passwort zurücksetzen" msgstr "Passwort zurücksetzen"
@ -560,9 +563,9 @@ msgstr ""
msgid "Invalid credit card" msgid "Invalid credit card"
msgstr "Ungültige Kreditkarte" msgstr "Ungültige Kreditkarte"
#, python-brace-format #, python-format
msgid "Your New VM {vm_name} at Data Center Light" msgid "Your New VM %(vm_name)s at Data Center Light"
msgstr "Deine neue VM {vm_name} bei Data Center Light" msgstr "Deine neue VM %(vm_name)s bei Data Center Light"
msgid "Confirm Order" msgid "Confirm Order"
msgstr "Bestellung Bestätigen" msgstr "Bestellung Bestätigen"

View file

@ -659,8 +659,8 @@ class PaymentVMView(LoginRequiredMixin, FormView):
'base_url': "{0}://{1}".format(request.scheme, 'base_url': "{0}://{1}".format(request.scheme,
request.get_host()), request.get_host()),
'page_header': _( 'page_header': _(
'Your New VM {vm_name} at Data Center Light'.format( 'Your New VM %(vm_name)s at Data Center Light') % {
vm_name=vm.get('name'))) 'vm_name': vm.get('name')}
} }
email_data = { email_data = {
'subject': context.get('page_header'), 'subject': context.get('page_header'),