Defining Strings to be translated

This commit is contained in:
reverend 2020-10-01 22:10:31 +02:00
parent a2004bd789
commit 556931d2b1
6 changed files with 20 additions and 20 deletions

View File

@ -1,6 +1,6 @@
{% extends 'global.html'%} {% extends 'global.html'%}
{% block title %}Forbidden{% endblock %} {% block title %}{% translate 'Forbidden' %}{% endblock %}
{% block additional_head %} {% block additional_head %}
{% if request.META.HTTP_REFERER %} {% if request.META.HTTP_REFERER %}
@ -10,6 +10,6 @@
{% block maincontent %} {% block maincontent %}
{% if request.META.HTTP_REFERER %} {% if request.META.HTTP_REFERER %}
<p class="LP-Headline">You will be redirected in 5 seconds</p><p class="LP-Headline"><a href="{{ request.META.HTTP_REFERER }}" class="LP-Link">Go Back</a></p> <p class="LP-Headline">{% translate 'You will be redirected in 5 seconds' %}</p><p class="LP-Headline"><a href="{{ request.META.HTTP_REFERER }}" class="LP-Link">{% translate 'Go Back' %}</a></p>
{% endif %} {% endif %}
{% endblock maincontent %} {% endblock maincontent %}

View File

@ -28,15 +28,15 @@
<span class="LP-Paragraph"> <span class="LP-Paragraph">
{% if user.is_authenticated %} {% if user.is_authenticated %}
Hi {{ user.username }}! Hi {{ user.username }}!
<a class="LP-Link" href="{% url 'logout' %}"><span class="LP-Link__Text">logout</span></a> <a class="LP-Link" href="{% url 'logout' %}"><span class="LP-Link__Text">{% translate 'Logout' %}</span></a>
{% if user.is_superuser %} {% if user.is_superuser %}
<a class="LP-Link" href="{% url 'admin:index' %}" target="_blank"><span class="LP-Link__Text">admin</span></a> <a class="LP-Link" href="{% url 'admin:index' %}" target="_blank"><span class="LP-Link__Text">{% translate 'Admin' %}</span></a>
{% endif %} {% endif %}
{% else %} {% else %}
You are not logged in. You are not logged in.
<a class="LP-Link" href="{% url 'login' %}"><span class="LP-Link__Text">login</span></a> | <a class="LP-Link" href="{% url 'login' %}"><span class="LP-Link__Text">{% translate 'Login' %}</span></a> |
<a class="LP-Link" href="{% url 'signup' %}"><span class="LP-Link__Text">signup</span></a> <a class="LP-Link" href="{% url 'signup' %}"><span class="LP-Link__Text">{% translate 'Sign Up' %}</span></a>
{% endif %} {% endif %}
</span> </span>
</div> </div>
@ -46,14 +46,14 @@
<aside class="LP-Main__Sidebar"> <aside class="LP-Main__Sidebar">
<nav class="LP-Menu LP-Menu--sidebar"> <nav class="LP-Menu LP-Menu--sidebar">
<ul class="LP-Menu__List"> <ul class="LP-Menu__List">
<li class="LP-Menu__Item"><a href="{% url 'lostplaces_home' %}" class="LP-Link"><span class="LP-Link__Text">Home</span></a></li> <li class="LP-Menu__Item"><a href="{% url 'lostplaces_home' %}" class="LP-Link"><span class="LP-Link__Text">{% translate 'Home' %}}</span></a></li>
<li class="LP-Menu__Item"><a href="{% url 'flatpage' slug='codex' %}" class="LP-Link"><span class="LP-Link__Text">UrBex codex</span></a></li> <li class="LP-Menu__Item"><a href="{% url 'flatpage' slug='codex' %}" class="LP-Link"><span class="LP-Link__Text">{% translate 'UrBex Codex' %}</span></a></li>
{% block additional_menu_items %} {% block additional_menu_items %}
{% endblock additional_menu_items %} {% endblock additional_menu_items %}
<li class="LP-Menu__Item LP-Menu__Item--additional"><a href="{% url 'place_create'%}" class="LP-Link"><span class="LP-Link__Text">Create place</span></a></li> <li class="LP-Menu__Item LP-Menu__Item--additional"><a href="{% url 'place_create'%}" class="LP-Link"><span class="LP-Link__Text">{% translate 'Create Place' %}</span></a></li>
<li class="LP-Menu__Item LP-Menu__Item--additional"><a href="{% url 'place_list'%}" class="LP-Link"><span class="LP-Link__Text">See all places</span></a></li> <li class="LP-Menu__Item LP-Menu__Item--additional"><a href="{% url 'place_list'%}" class="LP-Link"><span class="LP-Link__Text">{% translate 'All Places' %}</span></a></li>
</ul> </ul>
</nav> </nav>
</aside> </aside>

View File

@ -6,7 +6,7 @@
<script src="{% static 'maps/ol.js' %}"></script> <script src="{% static 'maps/ol.js' %}"></script>
{% endblock additional_head %} {% endblock additional_head %}
# {% block title %}Start{% endblock %} # {% block title %}{% translate 'Home' %}{% endblock %}
{% block maincontent %} {% block maincontent %}
@ -16,7 +16,7 @@
{% include 'partials/osm_map.html' with config=mapping_config %} {% include 'partials/osm_map.html' with config=mapping_config %}
<div class="LP-PlaceGrid"> <div class="LP-PlaceGrid">
<h1 class="LP-Headline LP-Headline">Explore the latest locations</h1> <h1 class="LP-Headline LP-Headline">{% translate 'Explore the latest locations' %}</h1>
<ul class="LP-PlaceGrid__Grid"> <ul class="LP-PlaceGrid__Grid">
{% for place in place_list %} {% for place in place_list %}
<li class="LP-PlaceGrid__Item"> <li class="LP-PlaceGrid__Item">

View File

@ -27,7 +27,7 @@
</article> </article>
<div class="LP-PlaceGrid"> <div class="LP-PlaceGrid">
<h1 class="LP-Headline LP-Headline">Our latest locations</h1> <h1 class="LP-Headline LP-Headline">{% translate 'Explore the latest locations' %}</h1>
<ul class="LP-PlaceGrid__Grid"> <ul class="LP-PlaceGrid__Grid">
{% for place in place_list %} {% for place in place_list %}
<li class="LP-PlaceGrid__Item"> <li class="LP-PlaceGrid__Item">

View File

@ -1,13 +1,13 @@
{% extends 'global.html'%} {% extends 'global.html'%}
{% load static %} {% load static %}
# {% block title %}Login{% endblock %} # {% block title %}{% translate 'Login' %}{% endblock %}
{% block maincontent %} {% block maincontent %}
<form class="LP-Form" method="POST" enctype="multipart/form-data"> <form class="LP-Form" method="POST" enctype="multipart/form-data">
<fieldset class="LP-Form__Fieldset"> <fieldset class="LP-Form__Fieldset">
<legend class="LP-Form__Legend">Login</legend> <legend class="LP-Form__Legend">{% translate 'Login' %}</legend>
{% csrf_token %} {% csrf_token %}
<div class="LP-Form__Composition LP-Form__Composition--breakable"> <div class="LP-Form__Composition LP-Form__Composition--breakable">
<div class="LP-Form__Field"> <div class="LP-Form__Field">
@ -20,12 +20,12 @@
<div class="LP-Form__Composition LP-Form__Composition--buttons"> <div class="LP-Form__Composition LP-Form__Composition--buttons">
<div class="LP-Form__Field LP-Form__Button LP-Input"> <div class="LP-Form__Field LP-Form__Button LP-Input">
<button class="LP-Button">Login</button> <button class="LP-Button">{% translate 'Login' %}</button>
</div> </div>
</div> </div>
</fieldset> </fieldset>
</form> </form>
<p class="LP-Headline">No account? <a class="LP-Link" href="{% url 'signup' %}"><span class="LP-Link__Text">Sign up here</span></a></p> <p class="LP-Headline">{% translate 'Have No Account Yet?' %} <a class="LP-Link" href="{% url 'signup' %}"><span class="LP-Link__Text">{% translate 'Sign Up' %}</span></a></p>
{% endblock maincontent %} {% endblock maincontent %}

View File

@ -2,13 +2,13 @@
{% load static %} {% load static %}
{% load widget_tweaks %} {% load widget_tweaks %}
# {% block title %}Registrierung{% endblock %} # {% block title %}{% translate 'Sign up' %}{% endblock %}
{% block maincontent %} {% block maincontent %}
<form class="LP-Form" method="POST"> <form class="LP-Form" method="POST">
<fieldset class="LP-Form__Fieldset"> <fieldset class="LP-Form__Fieldset">
<legend class="LP-Form__Legend">Registration</legend> <legend class="LP-Form__Legend">{% translate 'Sign Up' %}</legend>
{% csrf_token %} {% csrf_token %}
<div class="LP-Form__Composition LP-Form__Composition--breakable"> <div class="LP-Form__Composition LP-Form__Composition--breakable">
<div class="LP-Form__Field"> <div class="LP-Form__Field">
@ -37,7 +37,7 @@
<div class="LP-Form__Composition LP-Form__Composition--buttons"> <div class="LP-Form__Composition LP-Form__Composition--buttons">
<div class="LP-Form__Field LP-Form__Button LP-Input"> <div class="LP-Form__Field LP-Form__Button LP-Input">
<button class="LP-Button">Sign up</button> <button class="LP-Button">{% translate 'Sign Up' %}</button>
</div> </div>
</div> </div>
</fieldset> </fieldset>