From 8f2655bda240e1a7e940f44b6a3f65ce710c2868 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sat, 2 Sep 2017 21:35:57 +0200 Subject: [PATCH] Getting vm name properly in hosting views --- hosting/locale/de/LC_MESSAGES/django.po | 23 +++++++++++++---------- hosting/views.py | 4 ++-- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 86af85f3..4a837fcc 100644 --- a/hosting/locale/de/LC_MESSAGES/django.po +++ b/hosting/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\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" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -195,12 +195,13 @@ msgstr "Support / Kontakt" #, python-format msgid "" -"You have ordered a new virtual machine!
\n" -"Your order of [%(vm.name)s] has been charged.

\n" +"You have ordered a new virtual machine!\n" +"
\n" +"Your order of [%(vm_name)s] has been charged.

\n" "You can view your invoice by clicking the button below.

\n" msgstr "" "Du hast eine neue virtuelle Maschine bestellt!
\n" -"Deine Bestellung von [%(vm.name)s] wurde erhoben.

\n" +"Deine Bestellung von [%(vm_name)s] wurde erhoben.

\n" "Um die Rechnung zu sehen, klicke auf den Button unten.

\n" msgid "View Invoice" @@ -209,14 +210,16 @@ msgstr "Zur Rechnung" #, python-format msgid "" "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" "You can view your invoice by clicking the link below.\n" "\n" msgstr "" "Du hast eine neue virtuelle Maschine bestellt!\n" -"Deine Bestellung von [%(vm.name)s] wurde erhoben.\n\n" -"Um die Rechnung zu sehen, klicke auf den Button unten.\n\n" +"Deine Bestellung von [%(vm_name)s] wurde erhoben.\n" +"\n" +"Um die Rechnung zu sehen, klicke auf den Button unten.\n" +"\n" msgid "Password Reset" msgstr "Passwort zurücksetzen" @@ -560,9 +563,9 @@ msgstr "" msgid "Invalid credit card" msgstr "Ungültige Kreditkarte" -#, python-brace-format -msgid "Your New VM {vm_name} at Data Center Light" -msgstr "Deine neue VM {vm_name} bei Data Center Light" +#, python-format +msgid "Your New VM %(vm_name)s at Data Center Light" +msgstr "Deine neue VM %(vm_name)s bei Data Center Light" msgid "Confirm Order" msgstr "Bestellung Bestätigen" diff --git a/hosting/views.py b/hosting/views.py index 128bd4db..92a40fac 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -659,8 +659,8 @@ class PaymentVMView(LoginRequiredMixin, FormView): 'base_url': "{0}://{1}".format(request.scheme, request.get_host()), 'page_header': _( - 'Your New VM {vm_name} at Data Center Light'.format( - vm_name=vm.get('name'))) + 'Your New VM %(vm_name)s at Data Center Light') % { + 'vm_name': vm.get('name')} } email_data = { 'subject': context.get('page_header'),