add locale files for french

This commit is contained in:
bkfox
2016-08-13 17:21:48 +02:00
parent e8d3be3133
commit a82b73f70e
16 changed files with 1263 additions and 56 deletions

View File

@ -40,16 +40,25 @@
<script>
var podcasts = new Player('player_diff_{{ page.id }}', undefined, true)
{% for item in podcasts %}
podcasts.playlist.add(new Sound(
title='{{ item.name|escape }}',
detail='{{ item.detail_url }}',
duration={{ item.duration|date:"H*3600+i*60+s" }},
streams='{{ item.url }}',
{% if page and page.cover %}cover='{{ page.icon }}',{% endif %}
undefined
));
{% if not item.embed %}
podcasts.playlist.add(new Sound(
title='{{ item.name|escape }}',
detail='{{ item.detail_url }}',
duration={{ item.duration|date:"H*3600+i*60+s" }},
streams='{{ item.url }}',
{% if page and page.cover %}cover='{{ page.icon }}',{% endif %}
undefined
));
{% endif %}
{% endfor %}
</script>
<p>
{% for item in podcasts %}
{% if item.embed %}
{{ item.embed|safe }}
{% endif %}
{% endfor %}
</p>
</div>
</section>
{% endif %}

View File

@ -7,7 +7,7 @@
{# TODO message if program is no more active #}
{% block content_extras %}
<div class="schedule">
<section class="schedule">
{% if page.program.active %}
<h2>{% trans "Schedule" %}</h2>
<ul>
@ -29,32 +29,6 @@
{% else %}
<div class="warning">{% trans "This program is no longer active" %}</div>
{% endif %}
</div>
</section>
{% endblock %}
{% block page_nav_extras %}
{% if page.program.active %}
{% with object_list=page.next %}
{% if object_list %}
<div>
<h2>{% trans "Next Diffusions" %}</h2>
{% include "cms/snippets/list.html" %}
</div>
{% endif %}
{% endwith %}
{% endif %}{# program.active #}
{% with object_list=page.prev %}
{% if object_list %}
<div>
<h2>{% trans "Previous Diffusions" %}</h2>
{% include "cms/snippets/list.html" %}
</div>
{% endif %}
{% endwith %}
{% endblock %}

View File

@ -18,7 +18,7 @@
{% if page.summary %}
{{ page.summary }}
{% else %}
{{ page.body|richtext|truncatewords:32 }}
{{ page.body|richtext|truncatewords:24 }}
{% endif %}
</section>
{% endblock %}

View File

@ -26,7 +26,7 @@
{% endwith %}
{% with list_page=settings.cms.WebsiteSettings.list_page %}
{% if list_page %}
{% if list_page and page.tags.count %}
<div class="tags"><b>{% trans "Tags" %}</b>
{% for tag in page.tags.all %}
<a href="{{ list_page }}?tag={{ tag }}">{{ tag }}</a>

View File

@ -28,7 +28,7 @@
data-date="{{day|date:"Y-m-d"}}">
{# you might like to hide it by default -- this more for sections #}
<h2>{{ day|date:'l d F' }}</h2>
{% with object_list=list item_date_format="H:i" %}
{% with item_date_format="H:i" %}
{% for item in list %}
{% include "cms/snippets/date_list_item.html" %}
{% endfor %}

View File

@ -9,6 +9,8 @@ Options:
* item_big_cover: cover should is big instead of thumbnail (width: 600)
{% endcomment %}
{% load static %}
{% load wagtailimages_tags %}
<a {% if item.url %}href="{{ item.url }}" {% endif %}
@ -27,11 +29,15 @@ Options:
<span class="info">{{ item.info|safe }}</span>
{% endif %}
{% if item.summary %}<div class="summary">{{ item.summary }}</div>{% endif %}
{% if not item.show_in_menus and item.date and item_date_format != '' %}
{% with date_format=item_date_format|default:'l d F, H:i' %}
<time datetime="{{ item.date }}">
{% if item.diffusion %}
<img src="{% static "cms/images/clock.png" %}" class="small_icon">
{{ item.diffusion.start|date:date_format }}
{% else %}
{{ item.date|date:date_format }}
{% endif %}
</time>
{% endwith %}
{% endif %}

View File

@ -24,6 +24,7 @@
<div class="content flex_row">
<span class="info duration flex_item"></span>
<span class="actions">
<a class="action add" title="{% trans "add to the player" %}">+</a>
<a class="action detail" title="{% trans "more informations" %}"></a>
<a class="action remove" title="{% trans "remove this sound" %}"></a>
</span>

View File

@ -1,6 +1,10 @@
{% load static %}
{% load i18n %}
{% if item.embed %}
{% else %}
{# TODO: complete archive podcast -> info #}
<script>
function add_sound_{{ item.id }}(event) {
@ -34,4 +38,5 @@ function add_sound_{{ item.id }}(event) {
<img src="{% static "cms/images/add.png" %}" class="icon"
data-action='add' alt="{% trans "add this sound to the playlist" %}"/>
</a>
{% endif %}