Binary file web/tralalere/locale/fr/LC_MESSAGES/django.mo has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/web/tralalere/locale/fr/LC_MESSAGES/django.po Mon Jun 11 15:10:18 2012 +0200
@@ -0,0 +1,78 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-06-11 04:05-0500\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \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"
+
+#: settings.py:40
+msgid "French"
+msgstr "Français"
+
+#: templates/home.html:7
+msgid "Mets tes couleurs, tes émotions<br />et ta voix sur la musique !"
+msgstr "Mets tes couleurs, tes émotions<br />et ta voix sur la musique !"
+
+#: templates/admin/base_site.html:4
+msgid "Django site admin"
+msgstr "Site d'administration Django"
+
+#: templates/admin/base_site.html:7
+msgid "Django administration"
+msgstr "Administration Django"
+
+#: templates/registration/login.html:17
+msgid "Log in"
+msgstr "Connexion"
+
+#: templates/registration/login.html:20
+msgid "Sorry, that's not a valid username or password."
+msgstr "Désolé, ce n'est pas un nom d'utilisateur valide"
+
+#: templates/registration/login.html:31
+msgid "Forget password?"
+msgstr "Mot de passe oublié"
+
+#: templates/registration/login.html:34
+msgid "login"
+msgstr "login"
+
+#: templates/registration/login.html:41
+msgid "Or login with your external account"
+msgstr "Ou se connecter avec votre compte externe"
+
+msgid "red"
+msgstr "rouge"
+
+msgid "yellow"
+msgstr "jaune"
+
+msgid "green"
+msgstr "vert"
+
+msgid "blue"
+msgstr "bleue"
+
+msgid "happy"
+msgstr "content"
+
+msgid "unhappy"
+msgstr "mécontent"
+
+msgid "laughing"
+msgstr "rieur"
+
+msgid "surprised"
+msgstr "surpris"
--- a/web/tralalere/settings.py Mon Jun 11 15:09:37 2012 +0200
+++ b/web/tralalere/settings.py Mon Jun 11 15:10:18 2012 +0200
@@ -28,11 +28,18 @@
# timezone as the operating system.
# If running in a Windows environment this must be set to the same as your
# system time zone.
-TIME_ZONE = 'America/Chicago'
+TIME_ZONE = 'UTC'
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
-LANGUAGE_CODE = 'en-us'
+LANGUAGE_CODE = 'fr-fr'
+
+ugettext = lambda s:s
+
+LANGUAGES = (
+ ('fr', ugettext('French')),
+)
+
SITE_ID = 1
@@ -94,11 +101,12 @@
from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS
TEMPLATE_CONTEXT_PROCESSORS += (
"django.core.context_processors.request",
+ 'django.core.context_processors.i18n',
"ldt.utils.context_processors.ldt_context",
)
MIDDLEWARE_CLASSES = (
- 'django.middleware.gzip.GZipMiddleware',
+ 'django.middleware.gzip.GZipMiddleware',
'django.middleware.cache.UpdateCacheMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware',
--- a/web/tralalere/templates/home.html Mon Jun 11 15:09:37 2012 +0200
+++ b/web/tralalere/templates/home.html Mon Jun 11 15:10:18 2012 +0200
@@ -1,29 +1,30 @@
{% extends "base.html" %}
{% block main_content %}
{% load thumbnail %}
+{% load i18n %}
<div class="home-header">
<h1>Musitag</h1>
- <h2>Mets tes couleurs, tes émotions<br />et ta voix sur la musique !</h2>
+ <h2>{% trans "Mets tes couleurs, tes émotions<br />et ta voix sur la musique !" %}</h2>
</div>
{% for content in contents %}
<div class="home-media">
- <a href="#">
+ <a href="{% url player content.iri_id %}">
{% thumbnail content.image "135x120" format="PNG" crop="center" as im %}<img class="home-media-image" src="{{im.url}}" width="{{ im.width }}" height="{{ im.height }}" />{% endthumbnail %}
</a>
<h3>
<a href="{% url player content.iri_id %}">{{content.title}}</a>
</h3>
<h4>
- <a href="#">{{content.description}}</a>
+ <a href="{% url player content.iri_id %}">{{content.description}}</a>
</h4>
{% if content.tags_stats %}
{% if content.tags_stats.colors %}
<ul class="home-dataviz home-dataviz-colors">
{% for tag in content.tags_stats.colors %}
- <li style="width: {{tag.width}}px">
+ <li style="width: {{tag.width}}px" alt="{% trans tag.tag %}">
{% if tag.scale == 1 %}
- <div class="tag-container-50">
+ <div class="tag-container-50" >
{% else %}
<div class="tag-container-50" style="-webkit-transform-origin: bottom left; -webkit-transform: scale({{tag.scale}}); -moz-transform-origin: bottom left; -moz-transform: scale({{tag.scale}});">
{% endif %}
--- a/web/tralalere/views.py Mon Jun 11 15:09:37 2012 +0200
+++ b/web/tralalere/views.py Mon Jun 11 15:10:18 2012 +0200
@@ -2,13 +2,14 @@
from django.shortcuts import render_to_response
from django.template import RequestContext
from ldt.ldt_utils.models import Content, Segment
+import math
import operator
-import math
COLORS = ['red', 'yellow', 'green', 'blue']
EMOTICONS = ['happy','unhappy','laughing','surprised']
+
def home(request):
contents = Content.objects.filter(front_project__state = 2)