Skip to content
Snippets Groups Projects
Commit 898ece4a authored by Christian Dresen's avatar Christian Dresen
Browse files

Implementes Translation System

parent 60fc0d56
No related branches found
No related tags found
No related merge requests found
......@@ -25,11 +25,11 @@
</component>
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="main.py" pinned="false" current-in-tab="true">
<file leaf-file-name="main.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/warpauthWeb/views/main.py">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.24392936">
<caret line="13" column="4" selection-start-line="13" selection-start-column="4" selection-end-line="13" selection-end-column="4" />
<state vertical-scroll-proportion="0.0">
<caret line="10" column="0" selection-start-line="10" selection-start-column="0" selection-end-line="10" selection-end-column="0" />
<folding>
<element signature="e#0#35#0" expanded="true" />
</folding>
......@@ -37,6 +37,74 @@
</provider>
</entry>
</file>
<file leaf-file-name="login.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/warpauthWeb/views/login.py">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="33" column="0" selection-start-line="33" selection-start-column="0" selection-end-line="33" selection-end-column="0" />
<folding>
<element signature="e#0#35#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="about.html" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/warpauthWeb/templates/about.html">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-0.65384614">
<caret line="1" column="0" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="change_password.html" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/warpauthWeb/templates/reset_password/change_password.html">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-7.1923075">
<caret line="11" column="54" selection-start-line="11" selection-start-column="44" selection-end-line="11" selection-end-column="54" />
<folding>
<element signature="e#748#773#0#HTML" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="token_gen.html" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/warpauthWeb/templates/reset_password/token_gen.html">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-3.2692308">
<caret line="5" column="40" selection-start-line="5" selection-start-column="40" selection-end-line="5" selection-end-column="40" />
<folding>
<element signature="e#674#699#0#HTML" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="login.html" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/warpauthWeb/templates/login.html">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-0.0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="1" selection-end-column="15" />
<folding>
<element signature="n#style#0;n#label#1;n#form#0;n#!!top" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="base.html" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/warpauthWeb/templates/base.html">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="1.486014">
<caret line="53" column="88" selection-start-line="53" selection-start-column="88" selection-end-line="53" selection-end-column="88" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
......@@ -51,12 +119,9 @@
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/warpauth/wsgi.py" />
<option value="$PROJECT_DIR$/warpauthWeb/templates/about.html" />
<option value="$PROJECT_DIR$/warpauthWeb/templates/main.html" />
<option value="$PROJECT_DIR$/warpauthWeb/templates/reset_password.html" />
<option value="$PROJECT_DIR$/warpauth/settings.py" />
<option value="$PROJECT_DIR$/warpauthWeb/templates/reset_password/token_gen.html" />
<option value="$PROJECT_DIR$/warpauthWeb/templates/reset_password/change_password.html" />
<option value="$PROJECT_DIR$/warpauthWeb/models.py" />
<option value="$PROJECT_DIR$/warpauthWeb/views.py" />
<option value="$PROJECT_DIR$/warpauthWeb/views/reset_password.py" />
......@@ -64,9 +129,13 @@
<option value="$PROJECT_DIR$/warpauthWeb/urls.py" />
<option value="$PROJECT_DIR$/warpauthWeb/util.py" />
<option value="$PROJECT_DIR$/warpauth/urls.py" />
<option value="$PROJECT_DIR$/warpauthWeb/templates/login.html" />
<option value="$PROJECT_DIR$/warpauthWeb/templates/base.html" />
<option value="$PROJECT_DIR$/warpauthWeb/views/main.py" />
<option value="$PROJECT_DIR$/warpauthWeb/views/login.py" />
<option value="$PROJECT_DIR$/warpauthWeb/templates/login.html" />
<option value="$PROJECT_DIR$/warpauthWeb/templates/reset_password/change_password.html" />
<option value="$PROJECT_DIR$/warpauthWeb/templates/reset_password/token_gen.html" />
<option value="$PROJECT_DIR$/warpauthWeb/templates/about.html" />
</list>
</option>
</component>
......@@ -174,6 +243,28 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="web" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="web" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="warpauthWeb" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="templates" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="reset_password" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="web" />
......@@ -501,7 +592,7 @@
<editor active="true" />
<layout>
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32976446" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="File Transfer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32869378" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
......@@ -555,32 +646,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/warpauthWeb/templates/about.html">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/warpauthWeb/templates/reset_password/token_gen.html">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-13.076923">
<caret line="20" column="23" selection-start-line="14" selection-start-column="10" selection-end-line="20" selection-end-column="23" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/warpauthWeb/templates/reset_password/change_password.html">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-9.807693">
<caret line="15" column="41" selection-start-line="15" selection-start-column="41" selection-end-line="15" selection-end-column="41" />
<folding>
<element signature="e#254#309#0#HTML" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/warpauth/__init__.py">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
......@@ -621,16 +686,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/warpauthWeb/views/login.py">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="32" column="0" selection-start-line="32" selection-start-column="0" selection-end-line="32" selection-end-column="0" />
<folding>
<element signature="e#0#35#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/warpauthWeb/views/reset_password.py">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
......@@ -691,44 +746,81 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/warpauthWeb/templates/login.html">
<entry file="file://$PROJECT_DIR$/warpauthWeb/urls.py">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-5.230769">
<caret line="8" column="9" selection-start-line="8" selection-start-column="9" selection-end-line="8" selection-end-column="9" />
<state vertical-scroll-proportion="0.07505519">
<caret line="4" column="26" selection-start-line="4" selection-start-column="26" selection-end-line="4" selection-end-column="26" />
<folding>
<element signature="n#style#0;n#form#0;n#!!top" expanded="true" />
<element signature="n#style#0;n#label#1;n#form#0;n#!!top" expanded="true" />
<element signature="e#0#32#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/warpauthWeb/templates/base.html">
<entry file="file://$PROJECT_DIR$/warpauthWeb/views/main.py">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-15.692307">
<caret line="26" column="134" selection-start-line="26" selection-start-column="134" selection-end-line="26" selection-end-column="134" />
<folding />
<state vertical-scroll-proportion="0.0">
<caret line="10" column="0" selection-start-line="10" selection-start-column="0" selection-end-line="10" selection-end-column="0" />
<folding>
<element signature="e#0#35#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/warpauthWeb/urls.py">
<entry file="file://$PROJECT_DIR$/warpauthWeb/views/login.py">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.07505519">
<caret line="4" column="26" selection-start-line="4" selection-start-column="26" selection-end-line="4" selection-end-column="26" />
<state vertical-scroll-proportion="0.0">
<caret line="33" column="0" selection-start-line="33" selection-start-column="0" selection-end-line="33" selection-end-column="0" />
<folding>
<element signature="e#0#32#0" expanded="true" />
<element signature="e#0#35#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/warpauthWeb/views/main.py">
<entry file="file://$PROJECT_DIR$/warpauthWeb/templates/reset_password/token_gen.html">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.24392936">
<caret line="13" column="4" selection-start-line="13" selection-start-column="4" selection-end-line="13" selection-end-column="4" />
<state vertical-scroll-proportion="-3.2692308">
<caret line="5" column="40" selection-start-line="5" selection-start-column="40" selection-end-line="5" selection-end-column="40" />
<folding>
<element signature="e#0#35#0" expanded="true" />
<element signature="e#674#699#0#HTML" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/warpauthWeb/templates/reset_password/change_password.html">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-7.1923075">
<caret line="11" column="54" selection-start-line="11" selection-start-column="44" selection-end-line="11" selection-end-column="54" />
<folding>
<element signature="e#748#773#0#HTML" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/warpauthWeb/templates/login.html">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-0.0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="1" selection-end-column="15" />
<folding>
<element signature="n#style#0;n#label#1;n#form#0;n#!!top" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/warpauthWeb/templates/about.html">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-0.65384614">
<caret line="1" column="0" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/warpauthWeb/templates/base.html">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="1.486014">
<caret line="53" column="88" selection-start-line="53" selection-start-column="88" selection-end-line="53" selection-end-column="88" />
<folding />
</state>
</provider>
</entry>
</component>
</project>
\ No newline at end of file
{% extends "base.html" %} {% block content %}
{% extends "base.html" %}
{% load i18n %}
{% block content %}
{% endblock %}
\ No newline at end of file
......@@ -4,20 +4,20 @@
{% block content %}
<form class="form-signin" style="max-width: 330px; margin: 0 auto; padding: 40px">
{% csrf_token %}
<h2 class="form-signin-heading">Please sign in</h2>
<label for="inputUser">User</label>
<input name="username" type="user" id="inputUser" class="form-control" placeholder="User" required autofocus>
<h2 class="form-signin-heading">{% trans "Please sign in" %}</h2>
<label for="inputUser">{% trans "Username" %}</label>
<input name="username" type="user" id="inputUser" class="form-control" placeholder="{% trans "Username" %}" required autofocus>
<label for="inputPassword" style="padding-top:10px;">Password</label>
<input name="password" type="password" id="inputPassword" class="form-control" placeholder="Password" required>
<label for="inputPassword" style="padding-top:10px;">{% trans "Password" %}</label>
<input name="password" type="password" id="inputPassword" class="form-control" placeholder="{% trans "Password" %}" required>
{% if fail == True %}
<div class="alert alert-warning alert-dismissible" role="alert">
<strong>Invalid email or password.</strong>
<strong>{% trans "Invalid email or password." %}</strong>
</div>
{% else %}
<br>
{% endif %}
<button class="btn btn-lg btn-primary btn-block" type="submit" formmethod="post" class="btn btn-default">Sign in</button>
<button class="btn btn-lg btn-primary btn-block" type="submit" formmethod="post" class="btn btn-default">{% trans "Sign in" %}</button>
<a class="btn" href="/reset_password">{% trans "Forgot Password?" %}</a>
</form>
{% endblock %}
{% extends "base.html" %} {% block content %}
{% extends "base.html" %}
{% load i18n %}
{% block content %}
{% if token_error %}
<h2 class="form-signin-heading">The Token was invalid</h2>
<h2 class="form-signin-heading">{% trans "The Token is invalid" %}</h2>
{% elif request.POST and not form_error%}
{{ request.POST }}
{% else %}
<form class="form" style="max-width: 330px; margin: 0 auto; padding: 40px">
{% csrf_token %}
<h2 class="form-signin-heading">Please enter your new Password for user {{ username }}</h2>
<label for="inputPassword" class="sr-only">Password</label>
<input name="password" type="password" id="inputPassword" class="form-control" placeholder="Password" required autofocus>
<label for="inputPassword2" class="sr-only">Repeat Password</label>
<input name="password2" type="password" id="inputPassword2" class="form-control" placeholder="Repeat Password" required>
<h2 class="form-signin-heading">{% trans "Please enter your new Password for user" %} {{ username }}</h2>
<label for="inputPassword">{% trans "Password" %}</label>
<input name="password" type="password" id="inputPassword" class="form-control" placeholder="{% trans "Password" %}" required autofocus>
<label for="inputPassword2" style="padding-top:10px;">{% trans "Repeat Password" %}</label>
<input name="password2" type="password" id="inputPassword2" class="form-control" placeholder="{% trans "Repeat Password" %}" required>
{% if form_error == True %}
<div class="alert alert-warning alert-dismissible" role="alert">
<strong>Passwords didnt match.</strong>
<strong>{% trans "Passwords did not match" %}</strong>
</div>
{% else %}
<br>
{% endif %}
<button class="btn btn-lg btn-primary btn-block" type="submit" formmethod="post" class="btn btn-default">Reset Password</button>
<button class="btn btn-lg btn-primary btn-block" type="submit" formmethod="post" class="btn btn-default">{% trans "Reset Password" %}</button>
</form>
{% endif %}
......
{% extends "base.html" %} {% block content %}
{% extends "base.html" %}
{% load i18n %}
{% block content %}
{% if request.POST %}
<h2 class="form-signin-heading">If your informations were right, you've got an Email</h2>
<h2 class="form-signin-heading">{% trans "If your information were right, you've got an Email" %}</h2>
{% else %}
<form class="form" style="max-width: 330px; margin: 0 auto; padding: 40px">
{% csrf_token %}
<h2 class="form-signin-heading">Please enter your Email address</h2>
<label for="inputUser" class="sr-only">Username</label>
<input name="username" type="text" id="inputPassword" class="form-control" placeholder="User" required autofocus>
<label for="inputEmail" class="sr-only">Email-Address</label>
<input name="email" type="text" id="inputEmail" class="form-control" placeholder="Email" required>
<h2 class="form-signin-heading">{% trans "Please enter your Email address" %}</h2>
<label for="inputUser" >{% trans "Username" %}</label>
<input name="username" type="text" id="inputPassword" class="form-control" placeholder="{% trans "Username" %}" required autofocus>
<label for="inputEmail" style="padding-top:10px;">{% trans "Email-Address" %}</label>
<input name="email" type="text" id="inputEmail" class="form-control" placeholder="{% trans "Email-Address" %}" required>
{% if fail == True %}
<div class="alert alert-warning alert-dismissible" role="alert">
<strong>Invalid email.</strong>
<strong>{% trans "Invalid email." %}</strong>
</div>
{% else %}
<br>
{% endif %}
<button class="btn btn-lg btn-primary btn-block" type="submit" formmethod="post" class="btn btn-default">Reset Password</button>
<button class="btn btn-lg btn-primary btn-block" type="submit" formmethod="post" class="btn btn-default">{% trans "Reset Password" %}</button>
</form>
{% endif %}
{% endblock %}
\ No newline at end of file
......@@ -7,9 +7,6 @@ from warpauthWeb.util import *
@login_required(login_url='/login/', redirect_field_name=None)
def index(request):
pages['body'] = "index"
pages['body_text'] = "WarpAuth"
print(request.user.ldap_user.group_names)
return HttpResponse(render(request, 'about.html', pages))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment