French Calendar

This commit is contained in:
R1kM 2015-04-13 19:36:27 +02:00
parent c672bea536
commit 20dc665fec
8 changed files with 29 additions and 1 deletions

Binary file not shown.

View file

@ -0,0 +1,27 @@
from django import template
from django.utils.safestring import mark_safe
register = template.Library()
@register.filter
def translate(tex):
tex = tex.replace("January", "Janvier", 1)
tex = tex.replace("February", "Février", 1)
tex = tex.replace("March", "Mars", 1)
tex = tex.replace("April", "Avril", 1)
tex = tex.replace("May", "Mai", 1)
tex = tex.replace("June", "Juin", 1)
tex = tex.replace("July", "Juillet", 1)
tex = tex.replace("August", "Août", 1)
tex = tex.replace("September", "Septembre", 1)
tex = tex.replace("October", "Octobre", 1)
tex = tex.replace("November", "Novembre", 1)
tex = tex.replace("December", "Décembre", 1)
tex = tex.replace("Mon", "Lun", 1)
tex = tex.replace("Tue", "Mar", 1)
tex = tex.replace('Wed', "Mer", 1)
tex = tex.replace("Thu", "Jeu", 1)
tex = tex.replace("Fri", "Ven", 1)
tex = tex.replace("Sat", "Sam", 1)
tex = tex.replace("Sun", "Dim", 1)
return mark_safe(tex)

Binary file not shown.

View file

@ -1,6 +1,7 @@
{% extends "base.html" %}
{% load staticfiles %}
{% load frenchmonth %}
{% load translate %}
{% block extrahead %}
<link rel="stylesheet" href={% static 'css/calend.css' %} />
@ -22,7 +23,7 @@
</tr>
</table>
<div id="calendar">
{{Calendar}}
{{Calendar|translate}}
</div>
{% if user.profile.is_chef %}
<a href="{% url "calendrier.views.create_event" %}">Ajouter un évènement</a>