Fitting Templates with translate tag
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
{% extends '../global.html' %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<form method="POST" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
@@ -9,7 +11,7 @@
|
||||
{% include 'partials/form_input.html' with field=form.images %}
|
||||
</div>
|
||||
<div class="RV-Fieldset">
|
||||
<button type="submit">Create</button>
|
||||
<button type="submit">{% translate 'Create' %}</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock content %}
|
@@ -1,12 +1,13 @@
|
||||
{% extends '../global.html' %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load responsive_images %}
|
||||
|
||||
{% block content %}
|
||||
{% if gallery.title %}
|
||||
<h1>{{gallery.title}}</h1>
|
||||
{% endif %}
|
||||
<a href="{% url 'gallery_upload' gallery_id=gallery.id %}">Upload image to this gallery</a>
|
||||
<a href="{% url 'gallery_upload' gallery_id=gallery.id %}">{% translate 'Upload image to this gallery' %}</a>
|
||||
<section class="RV-Images">
|
||||
<li class="RV-Images__list">
|
||||
{% for image in gallery.images.all %}
|
||||
@@ -17,9 +18,9 @@
|
||||
</li>
|
||||
{% if gallery.private and gallery.visitors.all|length > 0 and gallery.created_by == visitor %}
|
||||
<div>
|
||||
<h2>You have gained access to the following people</h2>
|
||||
<h2>{% translate 'You have gained access to the following people' %}</h2>
|
||||
{% for visitor in gallery.visitors.all %}
|
||||
{{visitor.name}} <a href="{% url 'gallery_revoke_access' gallery_id=gallery.id visitor_id=visitor.id %}">Revoke access</a>
|
||||
{{visitor.name}} <a href="{% url 'gallery_revoke_access' gallery_id=gallery.id visitor_id=visitor.id %}">{% translate 'Revoke access' %}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@@ -1,17 +1,19 @@
|
||||
{% extends '../global.html' %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<form method="POST">
|
||||
{% csrf_token %}
|
||||
<div class="RV-Fieldset">
|
||||
<h1>You do not have access to this private gallery</h1>
|
||||
But you can gain access by entering the access code below:
|
||||
<h1>{% translate 'You do not have access to this private gallery' %}</h1>
|
||||
{% translate 'But you can gain access by entering the access code below:' %}'
|
||||
</div>
|
||||
<div class="RV-Fieldset">
|
||||
{% include 'partials/form_input.html' with field=form.access_code %}
|
||||
</div>
|
||||
<div class="RV-Fieldset">
|
||||
<button type="submit">Enter</button>
|
||||
<button type="submit">{% translate 'Enter' %}</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock content %}
|
@@ -1,5 +1,6 @@
|
||||
{% extends '../global.html' %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load responsive_images %}
|
||||
|
||||
{% block content %}
|
||||
@@ -8,7 +9,7 @@
|
||||
{% for gallery in galleries %}
|
||||
<a href="{% url 'gallery' pk=gallery.pk %}" class="RV-Image__link RV-Image__link--detail">
|
||||
{% if gallery.images.all|length <= 0 %}
|
||||
no images
|
||||
{% translate 'no images' %}
|
||||
{% endif %}
|
||||
{% if gallery.images.all|length == 1 %}
|
||||
{% for image in gallery.images.all %}
|
||||
|
@@ -1,16 +1,17 @@
|
||||
{% extends '../global.html' %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load responsive_images %}
|
||||
|
||||
{% block content %}
|
||||
{% if created_galleries|length > 0 %}
|
||||
<section class="RV-Images">
|
||||
<h2>Your galleries</h2>
|
||||
<h2>{% translate 'Your galleries '%}</h2>
|
||||
<li class="RV-Images__list">
|
||||
{% for gallery in created_galleries %}
|
||||
<a href="{% url 'gallery' pk=gallery.pk %}" class="RV-Image__link RV-Image__link--detail">
|
||||
{% if gallery.images.all|length <= 0 %}
|
||||
no images
|
||||
{% translate 'no images' %}
|
||||
{% endif %}
|
||||
{% if gallery.images.all|length == 1 %}
|
||||
{% for image in gallery.images.all %}
|
||||
@@ -42,12 +43,12 @@
|
||||
{% endif %}
|
||||
{% if invited_galleries|length > 0 %}
|
||||
<section class="RV-Images">
|
||||
<h2>Galleries you were invited to</h2>
|
||||
<h2>{% translate 'Galleries you were invited to' %}</h2>
|
||||
<li class="RV-Images__list">
|
||||
{% for gallery in invited_galleries %}
|
||||
<a href="{% url 'gallery' pk=gallery.pk %}" class="RV-Image__link RV-Image__link--detail">
|
||||
{% if gallery.images.all|length <= 0 %}
|
||||
no images
|
||||
{% translate 'no images' %}
|
||||
{% endif %}
|
||||
{% if gallery.images.all|length == 1 %}
|
||||
{% for image in gallery.images.all %}
|
||||
|
@@ -1,14 +1,16 @@
|
||||
{% extends '../global.html' %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<form method="POST" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
<h2>Upload image to "{{gallery.title}}"</h2>
|
||||
<h2>{% translate 'Upload image to' %} "{{gallery.title}}"</h2>
|
||||
<div class="RV-Fieldset">
|
||||
{% include 'partials/form_input.html' with field=form.images %}
|
||||
</div>
|
||||
<div class="RV-Fieldset">
|
||||
<button type="submit">Upload</button>
|
||||
<button type="submit">{% translate 'Upload' %}</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock content %}
|
Reference in New Issue
Block a user