Updated signup and email confirmation views to work with translation

This commit is contained in:
M.Ravi 2017-06-17 19:38:22 +05:30
parent e63e014588
commit ab50e58a72
2 changed files with 213 additions and 165 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-05-30 13:47+0000\n" "POT-Creation-Date: 2017-06-17 19:32+0530\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"
@ -18,72 +18,66 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: hosting/forms.py:63 #: forms.py:28
msgid "Your account is not activated yet."
msgstr ""
#: forms.py:65
msgid "Paste here your public key" msgid "Paste here your public key"
msgstr "Fügen Sie Ihren public key ein" msgstr "Fügen Sie Ihren public key ein"
#: hosting/templates/hosting/base_short.html:68 #: templates/hosting/base_short.html:67
#: hosting/templates/hosting/base_short.html:139
msgid "My Virtual Machines" msgid "My Virtual Machines"
msgstr "Meine virtuellen Maschinen" msgstr "Meine virtuellen Maschinen"
#: hosting/templates/hosting/base_short.html:73 #: templates/hosting/base_short.html:72 templates/hosting/orders.html.py:12
#: hosting/templates/hosting/base_short.html:145
#: hosting/templates/hosting/orders.html:12
msgid "My Orders" msgid "My Orders"
msgstr "Meine Bestellungen" msgstr "Meine Bestellungen"
#: hosting/templates/hosting/base_short.html:78 #: templates/hosting/base_short.html:81
#: hosting/templates/hosting/base_short.html:152
msgid "Keys" msgid "Keys"
msgstr "Schlüssel" msgstr "Schlüssel"
#: hosting/templates/hosting/base_short.html:83 #: templates/hosting/base_short.html:86
#: hosting/templates/hosting/base_short.html:158
msgid "Notifications " msgid "Notifications "
msgstr "Benachrichtigungen" msgstr "Benachrichtigungen"
#: hosting/templates/hosting/base_short.html:90 #: templates/hosting/base_short.html:89
msgid "Logout" msgid "Logout"
msgstr "Abmeleden" msgstr "Abmeleden"
#: hosting/templates/hosting/base_short.html:95 #: templates/hosting/base_short.html:94
msgid "How it works" msgid "How it works"
msgstr "Wie es funktioniert" msgstr "Wie es funktioniert"
#: hosting/templates/hosting/base_short.html:98 #: templates/hosting/base_short.html:97
msgid "Your infrastructure" msgid "Your infrastructure"
msgstr "Ihre Infrastruktur" msgstr "Ihre Infrastruktur"
#: hosting/templates/hosting/base_short.html:101 #: templates/hosting/base_short.html:100
msgid "Our inftrastructure" msgid "Our inftrastructure"
msgstr "Unsere Infrastruktur" msgstr "Unsere Infrastruktur"
#: hosting/templates/hosting/base_short.html:104 #: templates/hosting/base_short.html:103
msgid "Pricing" msgid "Pricing"
msgstr "Preise" msgstr "Preise"
#: hosting/templates/hosting/base_short.html:107 #: templates/hosting/base_short.html:106
msgid "Contact" msgid "Contact"
msgstr "Kontakt" msgstr "Kontakt"
#: hosting/templates/hosting/base_short.html:110 #: templates/hosting/base_short.html:109
#: hosting/templates/hosting/login.html:32 #: templates/hosting/confirm_reset_password.html:38
#: hosting/templates/hosting/login.html:41 #: templates/hosting/login.html:17 templates/hosting/login.html.py:26
#: hosting/templates/hosting/reset_password.html:31 #: templates/hosting/reset_password.html:32 templates/hosting/signup.html:30
#: hosting/templates/hosting/signup.html:30
msgid "Login" msgid "Login"
msgstr "Anmelden" msgstr "Anmelden"
#: hosting/templates/hosting/base_short.html:134 #: templates/hosting/bill_detail.html:11 templates/hosting/order_detail.html:23
msgid "Home"
msgstr "Home"
#: templates/hosting/bill_detail.html:11 templates/hosting/order_detail.html:10
msgid "Invoice" msgid "Invoice"
msgstr "Rechnung" msgstr "Rechnung"
#: templates/hosting/bill_detail.html:11 templates/hosting/order_detail.html:10 #: templates/hosting/bill_detail.html:11 templates/hosting/order_detail.html:23
msgid "Order #" msgid "Order #"
msgstr "Rechnung #" msgstr "Rechnung #"
@ -144,8 +138,7 @@ msgstr ""
msgid "Customers" msgid "Customers"
msgstr "Kunden" msgstr "Kunden"
#: hosting/templates/hosting/bills.html:16 #: templates/hosting/bills.html:16 templates/hosting/user_keys.html.py:25
#: hosting/templates/hosting/virtual_machine_key.html:42
msgid "Name" msgid "Name"
msgstr "" msgstr ""
@ -157,19 +150,19 @@ msgstr ""
msgid "View Bill" msgid "View Bill"
msgstr "Rechnung anzeigen" msgstr "Rechnung anzeigen"
#: templates/hosting/bills.html:41 templates/hosting/orders.html.py:83 #: templates/hosting/bills.html:41 templates/hosting/orders.html.py:82
#: templates/hosting/virtual_machines.html:70 #: templates/hosting/virtual_machines.html:70
msgid "previous" msgid "previous"
msgstr "vorherige" msgstr "vorherige"
#: templates/hosting/bills.html:47 templates/hosting/orders.html.py:89 #: templates/hosting/bills.html:47 templates/hosting/orders.html.py:88
#: templates/hosting/virtual_machines.html:76 #: templates/hosting/virtual_machines.html:76
msgid "next" msgid "next"
msgstr "nächste" msgstr "nächste"
#: templates/hosting/confirm_reset_password.html:10 #: templates/hosting/confirm_reset_password.html:10
#: templates/hosting/login.html:9 templates/hosting/reset_password.html.py:9 #: templates/hosting/login.html:12 templates/hosting/reset_password.html:10
#: templates/hosting/signup.html:8 #: templates/hosting/signup.html:9 templates/hosting/signup_validate.html:9
msgid "Your VM hosted in Switzerland" msgid "Your VM hosted in Switzerland"
msgstr "Ihre VM in der Schweiz" msgstr "Ihre VM in der Schweiz"
@ -177,38 +170,43 @@ msgstr "Ihre VM in der Schweiz"
msgid "Set your new password" msgid "Set your new password"
msgstr "Setzen Ihr neues Passwort" msgstr "Setzen Ihr neues Passwort"
#: hosting/templates/hosting/confirm_reset_password.html:28 #: templates/hosting/confirm_reset_password.html:29
#: hosting/templates/hosting/reset_password.html:22 #: templates/hosting/reset_password.html:23
msgid "Reset" msgid "Reset"
msgstr "Zurücksetzen" msgstr "Zurücksetzen"
#: hosting/templates/hosting/confirm_reset_password.html:32 #: templates/hosting/confirm_reset_password.html:35
#: hosting/templates/hosting/reset_password.html:28 #: templates/hosting/reset_password.html:29 templates/hosting/signup.html:27
#: hosting/templates/hosting/signup.html:27
msgid "Already have an account ?" msgid "Already have an account ?"
msgstr "Besitzen sie bereits ein Bentzerkonto" msgstr "Besitzen sie bereits ein Bentzerkonto"
#: hosting/templates/hosting/confirm_reset_password.html:32 #: templates/hosting/create_virtual_machine.html:20
msgid "Log in"
msgstr "Anmelden"
#: hosting/templates/hosting/create_virtual_machine.html:19
msgid "New Virtual Machine" msgid "New Virtual Machine"
msgstr "Neue virtuelle Maschine" msgstr "Neue virtuelle Maschine"
#: hosting/templates/hosting/create_virtual_machine.html:24 #: templates/hosting/create_virtual_machine.html:28
msgid "Select VM Template:" #, fuzzy
#| msgid "Select VM Template:"
msgid "Step 1. Select VM Template:"
msgstr "Wählen Sie eine Vorlage" msgstr "Wählen Sie eine Vorlage"
#: hosting/templates/hosting/create_virtual_machine.html:32 #: templates/hosting/create_virtual_machine.html:42
msgid "Select VM Configuration:" #, fuzzy
#| msgid "Select VM Configuration:"
msgid "Step2. Select VM Configuration"
msgstr "Wählen Sie eine Konfiguration" msgstr "Wählen Sie eine Konfiguration"
#: hosting/templates/hosting/create_virtual_machine.html:39 #: templates/hosting/create_virtual_machine.html:59
#, fuzzy
#| msgid "Pricing"
msgid "Price "
msgstr "Preise"
#: templates/hosting/create_virtual_machine.html:59
msgid "CHF/Month" msgid "CHF/Month"
msgstr "CHF/Monat" msgstr "CHF/Monat"
#: templates/hosting/create_virtual_machine.html:45 #: templates/hosting/create_virtual_machine.html:61
msgid "Start VM" msgid "Start VM"
msgstr "Start VM" msgstr "Start VM"
@ -236,21 +234,16 @@ msgstr ""
msgid "The %(site_name)s team" msgid "The %(site_name)s team"
msgstr "" msgstr ""
#: hosting/templates/hosting/login.html:26 #: templates/hosting/login.html:34
msgid "You haven been logged out"
msgstr "Sie wurden abgmeldet"
#: hosting/templates/hosting/login.html:49
msgid "Don't have an account yet ? " msgid "Don't have an account yet ? "
msgstr "Besitzen Sie kein Benutzerkonto?" msgstr "Besitzen Sie kein Benutzerkonto?"
#: hosting/templates/hosting/login.html:52 #: templates/hosting/login.html:37 templates/hosting/signup.html.py:13
#: hosting/templates/hosting/signup.html:13 #: templates/hosting/signup.html:21 views.py:223
#: hosting/templates/hosting/signup.html:21
msgid "Sign up" msgid "Sign up"
msgstr "Registrieren" msgstr "Registrieren"
#: hosting/templates/hosting/login.html:54 #: templates/hosting/login.html:39
msgid "Forgot your password ? " msgid "Forgot your password ? "
msgstr "Passwort vergessen?" msgstr "Passwort vergessen?"
@ -278,47 +271,42 @@ msgstr "Als gelesen markieren"
msgid "All notifications" msgid "All notifications"
msgstr "Alle Benachrichtigungen" msgstr "Alle Benachrichtigungen"
#: templates/hosting/order_detail.html:16 #: templates/hosting/order_detail.html:29
#: templates/hosting/order_detail.html:24 #: templates/hosting/order_detail.html:37
msgid "Billed To:" msgid "Billed To:"
msgstr "" msgstr ""
#: templates/hosting/order_detail.html:26 #: templates/hosting/order_detail.html:39
msgid "Status:" msgid "Status:"
msgstr "" msgstr ""
#: templates/hosting/order_detail.html:38 #: templates/hosting/order_detail.html:51
msgid "Payment Method:" msgid "Payment Method:"
msgstr "Bezahlmethode" msgstr "Bezahlmethode"
#: templates/hosting/order_detail.html:49 #: templates/hosting/order_detail.html:62
msgid "Order summary" msgid "Order summary"
msgstr "Bestellungsübersicht" msgstr "Bestellungsübersicht"
#: hosting/templates/hosting/order_detail.html:52 #: templates/hosting/order_detail.html:65 templates/hosting/payment.html:17
#: hosting/templates/hosting/payment.html:17 #: templates/hosting/virtual_machine_detail.html:76
#: hosting/templates/hosting/virtual_machine_detail.html:75
msgid "Cores" msgid "Cores"
msgstr "Prozessorkerne" msgstr "Prozessorkerne"
#: hosting/templates/hosting/order_detail.html:54 #: templates/hosting/order_detail.html:67 templates/hosting/payment.html:20
#: hosting/templates/hosting/payment.html:20
#: hosting/templates/hosting/virtual_machine_detail.html:81
#: templates/hosting/order_detail.html:54
#: templates/hosting/virtual_machine_detail.html:82 #: templates/hosting/virtual_machine_detail.html:82
msgid "Memory" msgid "Memory"
msgstr "Arbeitsspeicher" msgstr "Arbeitsspeicher"
#: hosting/templates/hosting/order_detail.html:56 #: templates/hosting/order_detail.html:69 templates/hosting/payment.html:23
#: hosting/templates/hosting/payment.html:23
msgid "Disk space" msgid "Disk space"
msgstr "Festplattenkapazität" msgstr "Festplattenkapazität"
#: templates/hosting/order_detail.html:58 #: templates/hosting/order_detail.html:71
msgid "Total" msgid "Total"
msgstr "" msgstr ""
#: templates/hosting/order_detail.html:64 #: templates/hosting/order_detail.html:77
msgid "Finish Configuration" msgid "Finish Configuration"
msgstr "Konfiguration beenden" msgstr "Konfiguration beenden"
@ -330,10 +318,9 @@ msgstr "Datum"
msgid "Amount" msgid "Amount"
msgstr "Betrag" msgstr "Betrag"
#: hosting/templates/hosting/orders.html:19 #: templates/hosting/orders.html:19 templates/hosting/user_keys.html.py:27
#: hosting/templates/hosting/virtual_machine_detail.html:30 #: templates/hosting/virtual_machine_detail.html:30
#: hosting/templates/hosting/virtual_machine_key.html:44 #: templates/hosting/virtual_machines.html:31
#: hosting/templates/hosting/virtual_machines.html:31
msgid "Status" msgid "Status"
msgstr "" msgstr ""
@ -349,59 +336,104 @@ msgstr "Abgelehnt"
msgid "View Detail" msgid "View Detail"
msgstr "Details anzeigen" msgstr "Details anzeigen"
#: templates/hosting/orders.html:41 #: templates/hosting/orders.html:40
msgid "Cancel Order" msgid "Cancel Order"
msgstr "Bestellung stornieren" msgstr "Bestellung stornieren"
#: templates/hosting/orders.html:56 #: templates/hosting/orders.html:55
msgid "Do You want do delete your order?" msgid "Do You want to delete your order?"
msgstr "Wollen Sie ihre Bestellung löschen?" msgstr "Wollen Sie ihre Bestellung löschen?"
#: templates/hosting/orders.html:64 #: templates/hosting/orders.html:63 templates/hosting/user_keys.html.py:62
msgid "Close" msgid "Close"
msgstr "Schliessen" msgstr "Schliessen"
#: templates/hosting/orders.html:66 #: templates/hosting/orders.html:65 templates/hosting/user_keys.html.py:64
msgid "Delete" msgid "Delete"
msgstr "Löschen" msgstr "Löschen"
#: hosting/templates/hosting/payment.html:12 #: templates/hosting/payment.html:12
msgid "Billing Amount" msgid "Billing Amount"
msgstr "Rechnungsbetrag" msgstr "Rechnungsbetrag"
#: hosting/templates/hosting/payment.html:35 #: templates/hosting/payment.html:35
msgid "Billing Address" msgid "Billing Address"
msgstr "Rechnungsadresse" msgstr "Rechnungsadresse"
#: hosting/templates/hosting/payment.html:49 #: templates/hosting/payment.html:49
msgid "Payment Details" msgid "Payment Details"
msgstr "Rechnungsdetails" msgstr "Rechnungsdetails"
#: hosting/templates/hosting/payment.html:61 #: templates/hosting/payment.html:62
#: hosting/templates/hosting/payment.html:103
msgid "Submit Payment" msgid "Submit Payment"
msgstr "Betrag überweisen" msgstr "Betrag überweisen"
#: hosting/templates/hosting/payment.html:70 #: templates/hosting/payment.html:81
msgid "CARD NUMBER" msgid "CARD NUMBER"
msgstr "Kreditkartennummer" msgstr "Kreditkartennummer"
#: hosting/templates/hosting/payment.html:75 #: templates/hosting/payment.html:86
msgid "Valid Card Number" msgid "Valid Card Number"
msgstr "Gültige Kreditkartennummer" msgstr "Gültige Kreditkartennummer"
#: hosting/templates/hosting/payment.html:84 #: templates/hosting/payment.html:95
msgid "EXPIRATION DATE" msgid "EXPIRATION DATE"
msgstr "Ablaufdatum" msgstr "Ablaufdatum"
#: hosting/templates/hosting/payment.html:95 #: templates/hosting/payment.html:106
msgid "CV CODE" msgid "CV CODE"
msgstr "CV Code" msgstr "CV Code"
#: hosting/templates/hosting/reset_password.html:14 #: templates/hosting/reset_password.html:15
msgid "Reset your password" msgid "Reset your password"
msgstr "Passwort zurücksetzen" msgstr "Passwort zurücksetzen"
#: templates/hosting/user_key.html:11 templates/hosting/user_keys.html.py:9
msgid "Access Key"
msgstr "Zugriffsschlüssel"
#: templates/hosting/user_key.html:24
msgid "Upload your own key. "
msgstr "Laden Sie ihren Schlüssel hoch"
#: templates/hosting/user_key.html:28
msgid "Or generate a new key pair."
msgstr "Oder erstellen Sie ein neues Schlüsselpaar"
#: templates/hosting/user_key.html:30
msgid "Generate Key Pair"
msgstr "Schlüsselpaar generieren"
#: templates/hosting/user_key.html:40
msgid "Warning!"
msgstr "Achtung!"
#: templates/hosting/user_key.html:40
msgid "You can download your SSH private key once. Don't lost your key"
msgstr ""
"Sie können ihren privaten SSH Schlüssel nur einmal herunterladen. Bewaren "
"Sie ihn sicher auf."
#: templates/hosting/user_keys.html:18
msgid "Add Key"
msgstr ""
#: templates/hosting/user_keys.html:26
msgid "Created at"
msgstr "Erstellt am"
#: templates/hosting/user_keys.html:42
#, fuzzy
#| msgid "Delete"
msgid "Delete Key"
msgstr "Löschen"
#: templates/hosting/user_keys.html:55
#, fuzzy
#| msgid "Do You want do delete your order?"
msgid "Do You want to delete this key?"
msgstr "Wollen Sie ihre Bestellung löschen?"
#: templates/hosting/virtual_machine_detail.html:19 #: templates/hosting/virtual_machine_detail.html:19
msgid "Settings" msgid "Settings"
msgstr "Einstellungen" msgstr "Einstellungen"
@ -446,68 +478,6 @@ msgstr "Sind Sie sicher, dass Sie ihre virtuelle Maschine beenden wollen "
msgid "Cancel" msgid "Cancel"
msgstr "Beenden" msgstr "Beenden"
#: templates/hosting/virtual_machine_key.html:11
msgid "Access Key"
msgstr "Zugriffsschlüssel"
#: hosting/templates/hosting/virtual_machine_key.html:25
msgid "Upload your own key. "
msgstr "Laden Sie ihren Schlüssel hoch"
#: hosting/templates/hosting/virtual_machine_key.html:29
msgid "Upload Key"
msgstr "Schlüssel hochladen"
#: hosting/templates/hosting/virtual_machine_key.html:33
msgid "Or generate a new key pair."
msgstr "Oder erstellen Sie ein neues Schlüsselpaar"
#: hosting/templates/hosting/virtual_machine_key.html:31
msgid "Generate Key Pair"
msgstr "Schlüsselpaar generieren"
#: hosting/templates/hosting/virtual_machine_key.html:40
msgid ""
"Use your created key to access to the machine. If you lost it, contact us."
msgstr ""
"Verwenden Sie Ihren privaten SSH Schlüssel um sich mit Ihren Maschinen zu "
"verbinden. Falls Sie ihn verloren haben kontaktieren Sie uns."
#: hosting/templates/hosting/virtual_machine_key.html:43
msgid "Created at"
msgstr "Erstellt am"
#: hosting/templates/hosting/virtual_machine_key.html:66
#: hosting/templates/hosting/virtual_machine_key.html:79
msgid "Warning!"
msgstr "Achtung!"
#: hosting/templates/hosting/virtual_machine_key.html:66
msgid "You can download your SSH private key once. Don't lost your key"
msgstr ""
"Sie können ihren privaten SSH Schlüssel nur einmal herunterladen. Bewaren "
"Sie ihn sicher auf."
#: hosting/templates/hosting/virtual_machine_key.html:74
msgid "Copy to Clipboard"
msgstr "Kopieren"
#: hosting/templates/hosting/virtual_machine_key.html:75
msgid "Download"
msgstr ""
#: hosting/templates/hosting/virtual_machine_key.html:79
msgid ""
"Your SSH private key was already generated and downloaded, if you lost it, "
"contact us. "
msgstr ""
"Ihr privater SSH Schlüssel wurde bereits generiert und heruntergeladen, "
"falls Sie ihn verloren haben kontaktieren Sie uns."
#: hosting/templates/hosting/virtual_machine_key.html:82
msgid "Generate my key"
msgstr "Generiere meinen Schlüssel"
#: templates/hosting/virtual_machines.html:9 #: templates/hosting/virtual_machines.html:9
msgid "Virtual Machines" msgid "Virtual Machines"
msgstr "Virtuelle Maschinen" msgstr "Virtuelle Maschinen"
@ -527,3 +497,68 @@ msgstr ""
#: templates/hosting/virtual_machines.html:30 #: templates/hosting/virtual_machines.html:30
msgid "Ipv6" msgid "Ipv6"
msgstr "" msgstr ""
#: views.py:213 views.py:232
msgid "login"
msgstr "einloggen"
#: views.py:217
msgid ""
"Thank you for signing up. We have sent an email to you. Please follow the "
"instructions in it to activate your account. Once activated, you can login "
"using"
msgstr ""
"Danke für deine Anmeldung. Wir haben dir eine E-Mail geschickt. Bitte folge "
"den Anweisungen um deinen Account zu aktivieren. Danach kannst du dich über "
"diesen"
#: views.py:218 views.py:243
msgid "Go back to"
msgstr ""
#: views.py:233
msgid "Account activation"
msgstr "Accountaktivierung"
#: views.py:236
msgid "Your account has been activated."
msgstr "Dein Account wurde aktiviert."
#: views.py:237
msgid "You can now"
msgstr "Du kannst dich nun"
#: views.py:242
msgid "Sorry. Your request is invalid."
msgstr ""
#~ msgid "Home"
#~ msgstr "Home"
#~ msgid "Log in"
#~ msgstr "Anmelden"
#~ msgid "You haven been logged out"
#~ msgstr "Sie wurden abgmeldet"
#~ msgid "Upload Key"
#~ msgstr "Schlüssel hochladen"
#~ msgid ""
#~ "Use your created key to access to the machine. If you lost it, contact us."
#~ msgstr ""
#~ "Verwenden Sie Ihren privaten SSH Schlüssel um sich mit Ihren Maschinen zu "
#~ "verbinden. Falls Sie ihn verloren haben kontaktieren Sie uns."
#~ msgid "Copy to Clipboard"
#~ msgstr "Kopieren"
#~ msgid ""
#~ "Your SSH private key was already generated and downloaded, if you lost "
#~ "it, contact us. "
#~ msgstr ""
#~ "Ihr privater SSH Schlüssel wurde bereits generiert und heruntergeladen, "
#~ "falls Sie ihn verloren haben kontaktieren Sie uns."
#~ msgid "Generate my key"
#~ msgstr "Generiere meinen Schlüssel"

View File

@ -210,11 +210,17 @@ class SignupValidateView(TemplateView):
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
context = super(SignupValidateView, self).get_context_data(**kwargs) context = super(SignupValidateView, self).get_context_data(**kwargs)
login_url = reverse('hosting:login') login_url = '<a href="' + reverse('hosting:login') + '">' + str(_('login')) +'</a>'
message= _("Thank you for signing up. We have sent an email to you. Please follow the instructions in it to activate your account. Once activated, you can login using ") + '<a href="' + login_url +'">login</a>' home_url = '<a href="' + reverse('datacenterlight:index') + '">Data Center Light</a>'
section_title='Sign up' message='{signup_success_message} {lurl}</a> \
<br />{go_back} {hurl}.'.format(
signup_success_message = _('Thank you for signing up. We have sent an email to you. Please follow the instructions in it to activate your account. Once activated, you can login using'),
go_back = _('Go back to'),
lurl = login_url,
hurl = home_url
)
context['message'] = mark_safe(message) context['message'] = mark_safe(message)
context['section_title'] = section_title context['section_title'] = _('Sign up')
return context return context
class SignupValidatedView(SignupValidateView): class SignupValidatedView(SignupValidateView):
@ -223,13 +229,20 @@ class SignupValidatedView(SignupValidateView):
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
context = super(SignupValidateView, self).get_context_data(**kwargs) context = super(SignupValidateView, self).get_context_data(**kwargs)
validated = CustomUser.validate_url(self.kwargs['validate_slug']) validated = CustomUser.validate_url(self.kwargs['validate_slug'])
login_url = reverse('hosting:login') login_url = '<a href="' + reverse('hosting:login') + '">' + str(_('login')) +'</a>'
section_title=_('Account activation')
if validated: if validated:
message= _("Your account has been activated. You can now ") + '<a href="' + login_url +'">login</a>' message='{account_activation_string} <br /> {login_string} {lurl}.'.format(
section_title=_('Account activation') account_activation_string = _("Your account has been activated."),
login_string = _("You can now"),
lurl = login_url)
else: else:
message= _("Sorry. Your request is invalid.") + '<a href="' + login_url +'">login</a>' home_url = '<a href="' + reverse('datacenterlight:index') + '">Data Center Light</a>'
section_title=_('Account activation') message = '{sorry_message} <br />{go_back_to} {hurl}'.format(
sorry_message = _("Sorry. Your request is invalid."),
go_back_to = _('Go back to'),
hurl = home_url
)
context['message'] = mark_safe(message) context['message'] = mark_safe(message)
context['section_title'] = section_title context['section_title'] = section_title
return context return context