Update translation and fix loginmixin required for dashboard view

This commit is contained in:
M.Ravi 2017-10-01 23:06:51 +02:00
parent cf45a9ac75
commit 68cbfdd393
2 changed files with 22 additions and 7 deletions

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-09-29 20:14+0000\n"
"POT-Creation-Date: 2017-10-01 20:57+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -629,7 +629,8 @@ msgstr "Um eine neue VM zu erzeugen, klicke \"Neue VM erzeugen\""
msgid ""
"To access your VM, <a href=\"%(create_ssh_url)s\">add your SSH key here</a>"
msgstr ""
"Um auf Deine VM zuzugreifen, <a href=\"%(create_ssh_url)s\">füge Deinen SSH-Key hinzu</a>"
"Um auf Deine VM zuzugreifen, <a href=\"%(create_ssh_url)s\">füge Deinen SSH-"
"Key hinzu</a>"
msgid "CREATE VM"
msgstr "NEUE VM"
@ -688,6 +689,16 @@ msgid "In order to create a VM, you need to create/upload your SSH KEY first."
msgstr ""
"Um eine VM zu erstellen musst du zuerst einen SSH-Key erstellen / hochladen."
msgid "Error."
msgstr "Fehler"
msgid ""
"There was a payment related error. On close of this popup, you will be "
"redirected back to the payment page."
msgstr ""
"Es ist ein Fehler bei der Zahlung betreten. Du wirst nach dem "
"Schliessen vom Popup zur Bezahlseite weitergeleitet"
msgid "Thank you for the order."
msgstr "Danke für Deine Bestellung."
@ -724,6 +735,10 @@ msgstr "Fehler beenden VM"
msgid "Virtual Machine Cancellation"
msgstr "VM Kündigung"
msgid "There was an error processing your request. Please try again."
msgstr "Es gab einen Fehler bei der Bearbeitung Deine Anfrage. Bitte"
" versuche es noch einmal."
#~ msgid "VM %(VM_ID)s terminated successfully"
#~ msgstr "VM %(VM_ID)s erfolgreich beendet"

View file

@ -60,8 +60,9 @@ CONNECTION_ERROR = "Your VMs cannot be displayed at the moment due to a \
minutes."
class DashboardView(View):
class DashboardView(LoginRequiredMixin, View):
template_name = "hosting/dashboard.html"
login_url = reverse_lazy('hosting:login')
def get_context_data(self, **kwargs):
context = {}
@ -1143,9 +1144,8 @@ def forbidden_view(request, exception=None, reason=''):
Handle 403 error
"""
logger.error(str(exception) if exception else None)
logger.error('Reason = {reason}'.format(reason=reason))
err_msg = _('There was an error processing your request. Please try '
'again. Details: {reason}'.format(reason=reason))
'again.')
messages.add_message(request, messages.ERROR, err_msg)
return HttpResponseRedirect(
request.get_full_path()
)
return HttpResponseRedirect(request.get_full_path())