Added translations in italian

This commit is contained in:
Claudio Maggioni (maggicl) 2019-07-27 13:58:09 +02:00
parent 5f00a0d480
commit 4848698d63
18 changed files with 366 additions and 117 deletions

View File

@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM alpine:3.8
FROM alpine:3.10
MAINTAINER Claudio Maggioni (praticamentetilde)
@ -41,6 +41,7 @@ COPY . /home/app/code/
RUN chown -R app: /home/app
RUN sh -c "cd /home/app/code && python3 ./manage.py collectstatic --no-input"
RUN sh -c "cd /home/app/code && python3 ./manage.py compilemessages"
EXPOSE 8000
CMD ["/usr/sbin/uwsgi", "--ini", "/home/app/code/uwsgi.ini", "--plugin", "python3"]

View File

@ -29,7 +29,7 @@ ALLOWED_HOSTS = os.environ["ALLOWED_HOSTS"].split()
AUTH_USER_MODEL = 'user.CounterUser'
LOGIN_URL = "auth/login/"
LOGIN_URL = "/accounts/login"
LOGIN_REDIRECT_URL = "/"
@ -123,7 +123,13 @@ AUTH_PASSWORD_VALIDATORS = [
# Internationalization
# https://docs.djangoproject.com/en/2.1/topics/i18n/
LANGUAGE_CODE = 'it'
SITE_ROOT = os.path.dirname(os.path.realpath(__name__))
LOCALE_PATHS = ( os.path.join(SITE_ROOT, 'locale'), )
LANGUAGES = (
('it', 'Italiano'),
('en', 'English')
)
TIME_ZONE = 'Europe/Rome'

View File

@ -1,9 +1,10 @@
from django.db import models
from django.conf import settings
from django.contrib.auth.models import User
from django.utils.translation import gettext_lazy as _
class Target(models.Model):
target = models.PositiveIntegerField('Target to reach')
target = models.PositiveIntegerField(_('Target to reach'))
user = models.ForeignKey(
settings.AUTH_USER_MODEL,
on_delete=models.CASCADE,
@ -15,8 +16,8 @@ class ArrowCount(models.Model):
settings.AUTH_USER_MODEL,
on_delete=models.CASCADE
)
date = models.DateField('Training date')
count = models.PositiveIntegerField('Arrow count for the day')
date = models.DateField(_('Training date'))
count = models.PositiveIntegerField(_('Arrow count for the day'))
def __str__(self):
return self.date.strftime("%x") + ": " + str(self.count)

View File

@ -1,8 +1,15 @@
{% extends "base.html" %}
{% block title %}Not authorized{% endblock %}
{% load i18n %}
{% block title %}{% trans "Not authorized" %}{% endblock %}
{% block content %}
<h1 class="center">Not authorized</h1>
<p>You are not authorized to perform this action. Please <a href="{% url "index" %}">return to the home</a>.</p>
<h1 class="center">{% trans "Not authorized" %}</h1>
<p>
{% url "index" as link %}
{% blocktrans with link=link %}
You are not authorized to perform this action. Please <a href="{{ link }}">return to the home</a>.
{% endblocktrans %}
</p>
{% endblock %}

View File

@ -1,8 +1,15 @@
{% extends "base.html" %}
{% block title %}Page not found{% endblock %}
{% load i18n %}
{% block title %}{% trans "Page not found" %}{% endblock %}
{% block content %}
<h1 class="center">Page not found</h1>
<p>This page has not been found. Please <a href="{% url "index" %}">return to the home</a>.</p>
<h1 class="center">{% trans "Page not found" %}</h1>
<p>
{% url "index" as link %}
{% blocktrans with link=link %}
This page has not been found. Please <a href="{{ link }}">return to the home</a>.
{% endblocktrans %}
</p>
{% endblock %}

View File

@ -1,8 +1,14 @@
{% extends "base.html" %}
{% block title %}Internal server error{% endblock %}
{% load i18n %}
{% block title %}{% trans "Internal server error" %}{% endblock %}
{% block content %}
<h1 class="center">Internal server error</h1>
<p>The server failed to process the request. Please <a href="{% url "index" %}">return to the home</a>.</p>
<h1 class="center">{% trans "Internal server error" %}</h1>
{% url "index" as link %}
{% blocktrans with link=link %}
The server failed to process the request. Please <a href="{{ link }}">return to the home</a>.
{% endblocktrans %}
</p>
{% endblock %}

View File

@ -1,60 +1,61 @@
{# vim: set ts=2 sw=2 et tw=80: #}
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<title>{% block title %}{% endblock %} | Arrow Counter</title>
<meta charset="utf-8">
<meta name="viewport"
content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-rc.2/css/materialize.min.css">
<link rel="stylesheet" href="{% static "css/main.css" %}">
{% block style %}{% endblock %}
</head>
<head>
<title>{% block title %}{% endblock %} | {% trans "Arrow counter" %}</title>
<meta charset="utf-8">
<meta name="viewport"
content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-rc.2/css/materialize.min.css">
<link rel="stylesheet" href="{% static "css/main.css" %}">
{% block style %}{% endblock %}
</head>
<body>
<nav>
<div class="nav-wrapper">
<div class="container">
<a href="#!" class="brand-logo">Arrow Counter</a>
<a href="#" data-target="mobile-menu" class="sidenav-trigger">
<i class="material-icons">menu</i></a>
<ul class="right hide-on-med-and-down">
{% include "menu.html" %}
</ul>
<body>
<nav>
<div class="nav-wrapper">
<div class="container">
<a href="#!" class="brand-logo">{% trans "Arrow counter" %}</a>
<a href="#" data-target="mobile-menu" class="sidenav-trigger">
<i class="material-icons">menu</i></a>
<ul class="right hide-on-med-and-down">
{% include "menu.html" %}
</ul>
</div>
</div>
</nav>
<ul class="sidenav" id="mobile-menu">
{% include "menu.html" with mobile=1 %}
</ul>
<div class="container">
<main>{% block content %}{% endblock %}</main>
</div>
</nav>
<ul class="sidenav" id="mobile-menu">
{% include "menu.html" with mobile=1 %}
</ul>
<div class="container">
<main>{% block content %}{% endblock %}</main>
</div>
<script src="{% url 'javascript-catalog' %}"></script>
<script>
Object.assign(django.catalog, {
{% with 'Monday Tuesday Wednesday Thursday Friday Saturday Sunday' as list %}
<script src="{% url 'javascript-catalog' %}"></script>
<script>
Object.assign(django.catalog, {
{% with 'Monday Tuesday Wednesday Thursday Friday Saturday Sunday' as list %}
{% for weekday in list.split %}
'{{ weekday }}': '{% trans weekday %}',
'{{ weekday }}': '{% trans weekday %}',
{% endfor %}
{% endwith %}
});
</script>
<script
src="https://code.jquery.com/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-rc.2/js/materialize.min.js"></script>
<script src="{% static "js/main.js" %}"></script>
{% block scripts %}{% endblock %}
</body>
{% endwith %}
});
</script>
<script
src="https://code.jquery.com/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-rc.2/js/materialize.min.js"></script>
<script src="{% static "js/main.js" %}"></script>
{% block scripts %}{% endblock %}
</body>
</html>

View File

@ -1,17 +1,19 @@
{# vim: set ts=2 sw=2 et tw=80: #}
{% extends "base.html" %}
{% load static %}
{% load i18n %}
{% block title %}Update count{% endblock %}
{% block title %}{% trans "Update count" %}{% endblock %}
{% block scripts %}
<script src="{% static "js/count_edit.js" %}"></script>
{% endblock %}
{% block content %}
<h1 class="center">Update count</h1>
<h1 class="center">{% trans "Update count" %}</h1>
<form method="post" id="edit-arrowcount-form"
data-update-ajax="{% url "count_edit_ajax" ac_id %}">
data-update-ajax="{% url "count_edit_ajax" ac_id %}">
<div class="col s12 card">
<div class="card-content">
{% csrf_token %}
@ -19,7 +21,7 @@
{{ form.as_p }}
</div>
<div class="row">
<button class="count-up green waves-effect waves-light btn-large"
<button class="count-up green waves-effect waves-light btn-large"
type="button">
<i class="large material-icons">add</i>
</button>
@ -32,7 +34,7 @@
</div>
</div>
<div class="card-action">
<a href="#"><button type="submit">Save</button></a>
<a href="#"><button type="submit">{% trans "Save" %}</button></a>
</div>
</div>
</form>

View File

@ -1,21 +1,26 @@
{# vim: set ts=2 sw=2 et tw=80: #}
{% extends "base.html" %}
{% block title %}Counts{% endblock %}
{% load i18n %}
{% block title %}{% trans "Counts" %}{% endblock %}
{% block content %}
<h1 class="center">Counts</h1>
<h1 class="center">{% trans "Counts" %}</h1>
<p class="center">
<a class="btn waves-effect waves-light" href="{% url "count_export" %}" style="margin-bottom: 3em">
Excel Data (CSV) <i class="material-icons right">file_download</i>
</a>
<a class="btn waves-effect waves-light" href="{% url "count_export" %}"
style="margin-bottom: 3em">
{% trans "Excel Data (CSV)" %}
<i class="material-icons right">file_download</i>
</a>
</p>
{% include 'pagination.html' %}
<table class="centered">
<thead>
<tr>
<th>Date</th>
<th>Arrow count</th>
<th>Edit</th>
<th>{% trans "Date" %}</th>
<th>{% trans "Arrow count" %}</th>
<th>{% trans "Edit" %}</th>
</tr>
</thead>
<tbody>
@ -28,7 +33,8 @@
class="btn waves-effect waves-light">
<i class="material-icons">edit</i>
</a>
<form class="inline-block" method="post" action="{% url "count_delete" c.id %}">
<form class="inline-block" method="post"
action="{% url "count_delete" c.id %}">
{% csrf_token %}
<button type="submit" class="red btn waves-effect waves-light">
<i class="material-icons">delete</i>
@ -38,7 +44,7 @@
</tr>
{% empty %}
<tr>
<td colspan="2">No counts saved</td>
<td colspan="2">{% trans "No counts saved" %}</td>
</tr>
{% endfor %}
</tbody>

View File

@ -1,9 +1,12 @@
{# vim: set ts=2 sw=2 et tw=80: #}
{% extends "base.html" %}
{% block title %}New count{% endblock %}
{% load i18n %}
{% block title %}{% trans "New count" %}{% endblock %}
{% block content %}
<h1 class="center">New count</h1>
<h1 class="center">{% trans "New count" %}</h1>
<form method="post">
<div class="col s12 card" id="new-arrowcount-form">
<div class="card-content">
@ -11,7 +14,7 @@
{{ form.as_p }}
</div>
<div class="card-action">
<a href="#"><button type="submit">Save</button></a>
<a href="#"><button type="submit">{% trans "Save" %}</button></a>
</div>
</div>
</form>

View File

@ -1,34 +1,36 @@
{% extends 'base.html' %}
{# vim: set ts=2 sw=2 et tw=80: #}
{% extends 'base.html' %}
{% block title %}Home{% endblock %}
{% load i18n %}
{% block title %}{% trans "Home" %}{% endblock %}
{% block content %}
<h1 class="center">Arrow counter</h1>
<h5 class="center">A simple online arrow counter</h5>
<h1 class="center">{% trans "Arrow counter" %}</h1>
<h5 class="center">{% trans "A simple online arrow counter" %}</h5>
{% if user.is_authenticated %}
<p class="center" style="margin-bottom: 3rem">
<a class="btn waves-effect waves-light" href="{% url "count_export" %}">
Excel Data (CSV) <i class="material-icons right">file_download</i>
</a>
<a class="btn waves-effect waves-light" href="{% url "count_export" %}">
{% trans "Excel Data (CSV)" %} <i class="material-icons right">file_download</i>
</a>
</p>
<div class="card-panel grey lighten-2">
<h5 class="center">Arrows shot this year:</h5>
<p class="center"><strong style="font-size: 2.7rem">{{ yearArrows }}</strong></p>
<h5 class="center">{% trans "Arrows shot this year:" %}</h5>
<p class="center"><strong style="font-size: 2.7rem">{{ yearArrows }}</strong></p>
</div>
{% if diffTarget is not False %}
<div class="card-panel lighten-2 {% if diffTarget < 0 %}red{% elif diffTarget is 0 %}yellow
{% else %}green{% endif %}">
<h5 class="center">Difference with target:</h5>
<p class="center"><strong style="font-size: 2.7rem">{{ diffTarget }}</strong></p>
<h5 class="center">{% trans "Difference with target:" %}</h5>
<p class="center"><strong style="font-size: 2.7rem">{{ diffTarget }}</strong></p>
</div>
{% endif %}
<div class="card-panel grey lighten-2">
<h5 class="center">Arrows shot this month:</h5>
<p class="center"><strong style="font-size: 2.7rem">{{ monthArrows }}</strong></p>
<h5 class="center">{% trans "Arrows shot this month:" %}</h5>
<p class="center"><strong style="font-size: 2.7rem">{{ monthArrows }}</strong></p>
</div>
<div class="card-panel grey lighten-2">
<h5 class="center">Arrows shot this week:</h5>
<p class="center"><strong style="font-size: 2.7rem">{{ weekArrows }}</strong></p>
<h5 class="center">{% trans "Arrows shot this week:" %}</h5>
<p class="center"><strong style="font-size: 2.7rem">{{ weekArrows }}</strong></p>
</div>
{% endif %}
{% endblock %}

View File

@ -1,3 +1,6 @@
{# vim: set ft=htmldjango ts=2 sw=2 et tw=80: #}
{% load i18n %}
{% if mobile and user.is_authenticated %}
<div class="user-view">
<div class="background" style="background-color: #444444"></div>
@ -10,18 +13,18 @@
</div>
{% endif %}
<li><a href="{% url "index" %}">Home</a></li>
<li><a href="{% url "index" %}">{% trans "Home" %}</a></li>
<li class="divider" tabindex="-1"></li>
{% if user.is_authenticated %}
<li><a href="{% url "count_list" %}">Counts</a></li>
<li><a href="{% url "target_edit" %}">Set yearly target</a></li>
<li><a href="{% url "stats" %}">Weekly stats</a></li>
<li><a href="{% url "count_list" %}">{% trans "Counts" %}</a></li>
<li><a href="{% url "target_edit" %}">{% trans "Set yearly target" %}</a></li>
<li><a href="{% url "stats" %}">{% trans "Weekly stats" %}</a></li>
<li class="divider" tabindex="-1"></li>
{% if user.is_superuser %}
<li><a href="{% url "admin:index" %}">Admin</a></li>
<li><a href="{% url "admin:index" %}">{% trans "Admin" %}</a></li>
{% endif %}
<li><a href="{% url "logout" %}">Logout</a></li>
<li><a href="{% url "logout" %}">{% trans "Logout" %}</a></li>
{% else %}
<li><a href="{% url "login" %}">Login</a></li>
<li><a href="{% url "registration" %}">Register</a></li>
<li><a href="{% url "login" %}">{% trans "Login" %}</a></li>
<li><a href="{% url "registration" %}">{% trans "Register" %}</a></li>
{% endif %}

View File

@ -1,7 +1,10 @@
{# vim: set ts=2 sw=2 et tw=80: #}
{% extends 'base.html' %}
{% load i18n %}
{% load static %}
{% block title %}Weekly stats{% endblock %}
{% block title %}{% trans "Weekly stats" %}{% endblock %}
{% block scripts %}
<script id="data" type="application/json">
@ -14,6 +17,6 @@
{% endblock %}
{% block content %}
<h1 class="center">Weekly stats</h1>
<canvas id="chart"></canvas>
<h1 class="center">{% trans "Weekly stats" %}</h1>
<canvas id="chart"></canvas>
{% endblock %}

View File

@ -1,11 +1,13 @@
{# vim: set ts=2 sw=2 et tw=80: #}
{% extends "base.html" %}
{% load static %}
{% load i18n %}
{% block title %}Set yearly target{% endblock %}
{% block title %}{% trans "Set yearly target" %}{% endblock %}
{% block content %}
<h1 class="center">Set yearly target</h1>
<h1 class="center">{% trans "Set yearly target" %}</h1>
<form method="post" id="edit-target-form">
<div class="col s12 card">
<div class="card-content">
@ -15,8 +17,9 @@
</div>
</div>
<div class="card-action">
<a href="#"><button type="submit">Save</button></a>
<a href="{% url "target_delete" %}"><button type="button">Remove</button></a>
<a href="#"><button type="submit">{% trans "Save" %}</button></a>
<a href="{% url "target_delete" %}"><button type="button">
{% trans "Remove" %}</button></a>
</div>
</div>
</form>

View File

@ -19,4 +19,4 @@ urlpatterns = [
name='count_delete'),
path('count/edit/<int:ac_id>/ajax', login_required(views \
.arrow_count_update_ajax), name='count_edit_ajax'),
]
]

View File

@ -0,0 +1,194 @@
# Arrowcounter
# Copyright (C) 2019
# This file is distributed under the same license as the Arrowcounter package.
# Claudio Maggioni, 2019
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Arrowcounter\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-07-27 13:51+0200\n"
"PO-Revision-Date: 2019-07-27 13:00+0200\n"
"Last-Translator: Claudio Maggioni <maggicl@kolabnow.ch>\n"
"Language-Team: Claudio Maggioni <maggicl@kolabnow.ch>\n"
"Language: italian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: counter/models.py:7
msgid "Target to reach"
msgstr "Obiettivo da raggiungere"
#: counter/models.py:19
msgid "Training date"
msgstr "Data allenamento"
#: counter/models.py:20
msgid "Arrow count for the day"
msgstr "Conteggio frecce per la data"
#: counter/templates/403.html:5 counter/templates/403.html:8
msgid "Not authorized"
msgstr "Non autorizzato"
#: counter/templates/403.html:11
#, python-format
msgid ""
"\n"
"You are not authorized to perform this action. Please <a href=\"%(link)s"
"\">return to the home</a>.\n"
msgstr ""
"\n"
"Non sei autorizzato per compiere questa azione. <a href=\"%(link)s\">Ritorna "
"alla homepage</a>.\n"
#: counter/templates/404.html:5 counter/templates/404.html:8
msgid "Page not found"
msgstr "Pagina non trovata"
#: counter/templates/404.html:11
#, python-format
msgid ""
"\n"
"This page has not been found. Please <a href=\"%(link)s\">return to the "
"home</a>.\n"
msgstr ""
"\n"
"Questa pagina non è stata trovata. <a href=\"%(link)s\">Ritorna "
"allahomepage</a>.\n"
#: counter/templates/500.html:5 counter/templates/500.html:8
msgid "Internal server error"
msgstr "Errore interno al server"
#: counter/templates/500.html:10
#, python-format
msgid ""
"\n"
"The server failed to process the request. Please <a href=\"%(link)s\">return "
"to the home</a>.\n"
msgstr ""
"\n"
"Il server non è riuscito a processare la richiesta. <a href=\"%(link)s"
"\">Torna alla homepage</a>.\n"
#: counter/templates/base.html:9 counter/templates/base.html:25
#: counter/templates/index.html:8
msgid "Arrow counter"
msgstr "Contafrecce"
#: counter/templates/counter/edit.html:7 counter/templates/counter/edit.html:14
msgid "Update count"
msgstr "Aggiorna conteggio"
#: counter/templates/counter/edit.html:37 counter/templates/counter/new.html:17
#: counter/templates/target/edit.html:20
msgid "Save"
msgstr "Salva"
#: counter/templates/counter/list.html:6 counter/templates/counter/list.html:9
#: counter/templates/menu.html:19
msgid "Counts"
msgstr "Conteggi"
#: counter/templates/counter/list.html:13 counter/templates/index.html:13
msgid "Excel Data (CSV)"
msgstr "Esportazione in Excel (CSV)"
#: counter/templates/counter/list.html:21
msgid "Date"
msgstr "Data"
#: counter/templates/counter/list.html:22
msgid "Arrow count"
msgstr "Conteggio frecce"
#: counter/templates/counter/list.html:23
msgid "Edit"
msgstr "Modifica"
#: counter/templates/counter/list.html:47
msgid "No counts saved"
msgstr "Nessun conteggio salvato"
#: counter/templates/counter/new.html:6 counter/templates/counter/new.html:9
msgid "New count"
msgstr "Nuovo conteggio"
#: counter/templates/index.html:6 counter/templates/menu.html:16
msgid "Home"
msgstr "Home"
#: counter/templates/index.html:9
msgid "A simple online arrow counter"
msgstr "Un semplice contafrecce online"
#: counter/templates/index.html:17
msgid "Arrows shot this year:"
msgstr "Frecce tirate quest'anno:"
#: counter/templates/index.html:23
msgid "Difference with target:"
msgstr "Differenza rispetto all'obiettivo:"
#: counter/templates/index.html:28
msgid "Arrows shot this month:"
msgstr "Frecce tirate questo mese:"
#: counter/templates/index.html:32
msgid "Arrows shot this week:"
msgstr "Frecce tirate questa settimana:"
#: counter/templates/menu.html:20 counter/templates/target/edit.html:7
#: counter/templates/target/edit.html:10
msgid "Set yearly target"
msgstr "Imposta obiettivo annuale"
#: counter/templates/menu.html:21 counter/templates/stats.html:7
#: counter/templates/stats.html:20
msgid "Weekly stats"
msgstr "Statistiche settimanali"
#: counter/templates/menu.html:24
msgid "Admin"
msgstr "Amministratore"
#: counter/templates/menu.html:26
msgid "Logout"
msgstr "Esci"
#: counter/templates/menu.html:28 user/templates/registration/login.html:11
#: user/templates/registration/login.html:13
#: user/templates/registration/login.html:21
msgid "Login"
msgstr "Accedi"
#: counter/templates/menu.html:29
#: user/templates/registration/registration.html:11
#: user/templates/registration/registration.html:14
#: user/templates/registration/registration.html:22
msgid "Register"
msgstr "Registrati"
#: counter/templates/target/edit.html:22
msgid "Remove"
msgstr "Rimuovi"
#: counter/views.py:119
msgid "page is negative or 0"
msgstr "pagina negativa o uguale a 0"
#: counter/views.py:203
msgid "count is not a number"
msgstr "count non è un numero"
#: counter/views.py:209
msgid "count is negative or 0"
msgstr "count è negativo o uguale a 0"
#: counter/views.py:218
msgid "ArrowCount instance not found or from different user"
msgstr "istanza ArrowCount non trovata o appartenente ad altro utente"

View File

@ -1,14 +1,16 @@
{# vim: set ts=2 sw=2 et tw=80: #}
{% extends "base.html" %}
{% load static %}
{% load i18n %}
{% block style %}
<link rel="stylesheet" href="{% static "css/user.css" %}">
{% endblock %}
{% block title %}Login{% endblock %}
{% block title %}{% trans "Login" %}{% endblock %}
{% block content %}
<h1 class="center">Login</h1>
<h1 class="center">{% trans "Login" %}</h1>
<form id="login-form" method="post" class="col s12">
{% csrf_token %}
<div class="card">
@ -16,7 +18,7 @@
{{ form.as_p }}
</div>
<div class="card-action">
<a href="#"><button type="submit">Login</button></a>
<a href="#"><button type="submit">{% trans "Login" %}</button></a>
</div>
</div>
</form>

View File

@ -1,15 +1,17 @@
{# vim: set ts=2 sw=2 et tw=80: #}
{% extends 'base.html' %}
{% load static %}
{% load i18n %}
{% block style %}
<link rel="stylesheet" href="{% static "css/user.css" %}">
{% endblock %}
{% block title %}Register{% endblock %}
{% block title %}{% trans "Register" %}{% endblock %}
{% block content %}
<h1 class="center">Register</h1>
<h1 class="center">{% trans "Register" %}</h1>
<form method="post">
<div class="col s12 card" id="registration-form">
<div class="card-content">
@ -17,7 +19,7 @@
{{ form.as_p }}
</div>
<div class="card-action">
<a href="#"><button type="submit">register</button></a>
<a href="#"><button type="submit">{% trans "Register" %}</button></a>
</div>
</div>
</form>