changeset 90:5de2a3dd4e67

change VideoDesc attribute path to paths, a dict where you can specify a different path for each language
author souliane <souliane@mailoo.org>
date Tue, 16 Jun 2015 17:23:15 +0200
parents 4b4a5d7602f8
children 2de2c50a796d
files locale/fr/LC_MESSAGES/django.po sat_website/media.py sat_website/templatetags/utils.py templates/sat_website/gallery.html templates/sat_website/membership.html
diffstat 5 files changed, 154 insertions(+), 146 deletions(-) [+]
line wrap: on
line diff
--- a/locale/fr/LC_MESSAGES/django.po	Tue Jun 16 12:35:32 2015 +0200
+++ b/locale/fr/LC_MESSAGES/django.po	Tue Jun 16 17:23:15 2015 +0200
@@ -7,8 +7,8 @@
 msgstr ""
 "Project-Id-Version: 0.0.1\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-06-15 21:00+0200\n"
-"PO-Revision-Date: 2015-06-15 21:01+0100\n"
+"POT-Creation-Date: 2015-06-16 17:21+0200\n"
+"PO-Revision-Date: 2015-06-16 17:21+0100\n"
 "Last-Translator: Salut à Toi <contact@salut-a-toi.org>\n"
 "Language-Team: français <goffi@goffi.org>\n"
 "Language: fr\n"
@@ -213,78 +213,64 @@
 msgid "Subscription to Salut à Toi"
 msgstr "Adhésion à Salut à Toi"
 
-#: sat_website/screenshots.py:39
+#: sat_website/media.py:40
 msgid "Membership campaign for Libervia"
 msgstr "Campagne d'adhésion pour Libervia"
 
-#: sat_website/screenshots.py:41 sat_website/screenshots.py:44
-#: sat_website/screenshots.py:46 sat_website/screenshots.py:48
-#: sat_website/screenshots.py:50 sat_website/screenshots.py:52
-#: sat_website/screenshots.py:54 sat_website/screenshots.py:56
-#: sat_website/screenshots.py:58 sat_website/screenshots.py:63
-#: sat_website/screenshots.py:65 sat_website/screenshots.py:67
-#: sat_website/screenshots.py:69 sat_website/screenshots.py:71
-#: sat_website/screenshots.py:73 sat_website/screenshots.py:75
-#: sat_website/screenshots.py:77
+#: sat_website/media.py:42 sat_website/media.py:45 sat_website/media.py:47
+#: sat_website/media.py:49 sat_website/media.py:54 sat_website/media.py:57
+#: sat_website/media.py:59 sat_website/media.py:61 sat_website/media.py:66
+#: sat_website/media.py:71 sat_website/media.py:76 sat_website/media.py:81
+#: sat_website/media.py:86 sat_website/media.py:89 sat_website/media.py:91
+#: sat_website/media.py:96 sat_website/media.py:101
 msgid "version"
 msgstr "version"
 
-#: sat_website/screenshots.py:41 sat_website/screenshots.py:44
-#: sat_website/screenshots.py:46 sat_website/screenshots.py:48
-#: sat_website/screenshots.py:50 sat_website/screenshots.py:52
-#: sat_website/screenshots.py:54 sat_website/screenshots.py:56
-#: sat_website/screenshots.py:58 sat_website/screenshots.py:63
-#: sat_website/screenshots.py:65 sat_website/screenshots.py:67
-#: sat_website/screenshots.py:69 sat_website/screenshots.py:71
-#: sat_website/screenshots.py:73 sat_website/screenshots.py:75
-#: sat_website/screenshots.py:77
+#: sat_website/media.py:42 sat_website/media.py:45 sat_website/media.py:47
+#: sat_website/media.py:49 sat_website/media.py:54 sat_website/media.py:57
+#: sat_website/media.py:59 sat_website/media.py:61 sat_website/media.py:66
+#: sat_website/media.py:71 sat_website/media.py:76 sat_website/media.py:81
+#: sat_website/media.py:86 sat_website/media.py:89 sat_website/media.py:91
+#: sat_website/media.py:96 sat_website/media.py:101
 msgid "year"
 msgstr "année"
 
-#: sat_website/screenshots.py:41 sat_website/screenshots.py:50
-#: sat_website/screenshots.py:58 sat_website/screenshots.py:65
-#: sat_website/screenshots.py:67 sat_website/screenshots.py:69
-#: sat_website/screenshots.py:75 sat_website/screenshots.py:77
-msgid "language"
-msgstr "langue"
-
-#: sat_website/screenshots.py:43
+#: sat_website/media.py:44
 msgid "Overview"
 msgstr "Aperçu"
 
-#: sat_website/screenshots.py:44 sat_website/screenshots.py:46
-#: sat_website/screenshots.py:48 sat_website/screenshots.py:50
-#: sat_website/screenshots.py:52 sat_website/screenshots.py:54
-#: sat_website/screenshots.py:56 sat_website/screenshots.py:58
-#: sat_website/screenshots.py:63 sat_website/screenshots.py:73
+#: sat_website/media.py:45 sat_website/media.py:47 sat_website/media.py:49
+#: sat_website/media.py:54 sat_website/media.py:57 sat_website/media.py:59
+#: sat_website/media.py:61 sat_website/media.py:66 sat_website/media.py:71
+#: sat_website/media.py:91
 msgid "frontend"
 msgstr "interface"
 
-#: sat_website/screenshots.py:45
+#: sat_website/media.py:46
 msgid "Optional security check"
 msgstr "Vérification de sécurité (optionnelle)"
 
-#: sat_website/screenshots.py:47
+#: sat_website/media.py:48
 msgid "Rich text editor"
 msgstr "Éditeur de texte riche"
 
-#: sat_website/screenshots.py:49
+#: sat_website/media.py:52
 msgid "Demo of the new Libervia UI, and of the collective radio feature"
 msgstr "Démo de la nouvelle interface de Libervia, et de la radio collective"
 
-#: sat_website/screenshots.py:51
+#: sat_website/media.py:56
 msgid "Libervia's login page"
 msgstr "Page d'identification de Libervia"
 
-#: sat_website/screenshots.py:53 templates/sat_website/frontends.html:34
+#: sat_website/media.py:58 templates/sat_website/frontends.html:34
 msgid "Libervia's main view"
 msgstr "Vue principale de Libervia"
 
-#: sat_website/screenshots.py:55
+#: sat_website/media.py:60
 msgid "Wix showing a french Tarot play"
 msgstr "Wix montrant un jeu de tarot"
 
-#: sat_website/screenshots.py:57
+#: sat_website/media.py:64
 msgid ""
 "This video focuses on Libervia. The UI is really outdated, but we can see "
 "some features"
@@ -292,43 +278,47 @@
 "Cette vidéo se concentre sur Libervia. C'est une vieille interface, mais on "
 "peut voir quelques fonctionnalités"
 
-#: sat_website/screenshots.py:62
+#: sat_website/media.py:70
 msgid "Server administration from the web frontend Libervia."
 msgstr "Administration du serveur depuis l'interface web Libervia."
 
-#: sat_website/screenshots.py:64
+#: sat_website/media.py:74
 msgid "Use ad-hoc commands to control a VLC player from Libervia"
 msgstr ""
 "Utilisation des commandes ad-hoc pour contrôler un lecteur VLC depuis "
 "Libervia"
 
-#: sat_website/screenshots.py:66
+#: sat_website/media.py:79
 msgid "Exporting a command: an FTP client is exported to a Gajim contact"
 msgstr ""
 "Export de commande: un client FTP est exporté à un contact utilisant Gajim"
 
-#: sat_website/screenshots.py:68
+#: sat_website/media.py:84
 msgid "How to copy and pipe streams over XMPP"
 msgstr "Comment copier et transférer des flux de tubes (pipes) via XMPP"
 
-#: sat_website/screenshots.py:70
+#: sat_website/media.py:86 sat_website/templatetags/utils.py:98
+msgid "language"
+msgstr "langue"
+
+#: sat_website/media.py:88
 msgid "Cowsay sent in conversation through jp"
 msgstr "« Cowsay » envoyé dans une discussion via jp"
 
-#: sat_website/screenshots.py:72 templates/sat_website/frontends.html:41
+#: sat_website/media.py:90 templates/sat_website/frontends.html:41
 msgid "Primitivus showing a french Tarot play"
 msgstr "Primitivus montrant un jeu de tarot"
 
-#: sat_website/screenshots.py:74
+#: sat_website/media.py:94
 msgid "This video shows french Tarot game, and how to use Thunderbird with SàT"
 msgstr ""
 "Cette vidéo montre un jeu de tarot, et comment utiliser Thunderbird avec SàT"
 
-#: sat_website/screenshots.py:76
+#: sat_website/media.py:99
 msgid "The first video shows wix, primitivus and jp"
 msgstr "La première vidéo montre Wix, Primitivus et Jp"
 
-#: sat_website/templatetags/utils.py:82 templates/sat_website/utils.py:83
+#: sat_website/templatetags/utils.py:91
 msgid ": "
 msgstr " : "
 
@@ -378,7 +368,7 @@
 msgid "Get in touch"
 msgstr "Nous contacter"
 
-#: sat_website/views.py:44 templates/sat_website/membership.html:45
+#: sat_website/views.py:44 templates/sat_website/membership.html:46
 msgid "Association"
 msgstr "Association"
 
@@ -405,24 +395,24 @@
 msgid "Social contract"
 msgstr "Contrat social"
 
-#: sat_website/views.py:61
+#: sat_website/views.py:62
 msgid "contains the backend, Primitivus and Jp"
 msgstr "contient le backend, Primitivus et Jp"
 
-#: sat_website/views.py:62
+#: sat_website/views.py:63
 msgid "Images and other media needed to launch SàT"
 msgstr "images et autres média nécessaires au lancement de SàT"
 
-#: sat_website/views.py:63
+#: sat_website/views.py:64
 msgid "console display library needed by Primitivus"
 msgstr "bibliothèque pour l'affichage en console de Primitivus"
 
-#: sat_website/views.py:64
+#: sat_website/views.py:65
 msgid "PubSub server component needed for SàT experimental blogging features"
 msgstr ""
 "composant serveur PubSub pour les fonctionnalités expérimentales de blogage"
 
-#: sat_website/views.py:65
+#: sat_website/views.py:66
 msgid "Libervia frontend (web server and client)"
 msgstr "interface Libervia (serveur web et partie cliente)"
 
@@ -1164,7 +1154,7 @@
 msgstr "Votre idée ici"
 
 #: templates/sat_website/gallery.html:41 templates/sat_website/gallery.html:84
-#: templates/sat_website/membership.html:36
+#: templates/sat_website/membership.html:37
 #, python-format
 msgid ""
 "Your browser doesn't manage the « video » tag, you should update, e.g. with "
@@ -1249,16 +1239,44 @@
 msgid "cultural association based in Austria"
 msgstr "association culturelle basée en Autriche"
 
+#: templates/sat_website/media.html:24
+msgid "Screenshots and videos"
+msgstr "Captures d'écran et vidéos"
+
+#: templates/sat_website/media.html:29
+msgid "Basic usage"
+msgstr "Utilisation de base"
+
+#: templates/sat_website/media.html:32
+msgid ""
+"These media concern the basic utilisation SàT through graphical frontends "
+"like Libervia."
+msgstr ""
+"Ces média concernent l'utilisation de base de SàT, à travers des interfaces "
+"graphiques comme Libervia."
+
+#: templates/sat_website/media.html:39
+msgid "Advanced usage"
+msgstr "Utilisation avancée"
+
+#: templates/sat_website/media.html:42
+msgid ""
+"These media concern the advanced utilisation and frontends of SàT, including "
+"administration tasks and experimental features."
+msgstr ""
+"Ces média concernent l'utilisation et les interfaces avancées de SàT, y "
+"compris les tâches d'administration et les fonctionnalités expérimentales."
+
 #: templates/sat_website/membership.html:28
 #: templates/sat_website/membership_form.html:27
 msgid "Join the association"
 msgstr "Adhérez à l'association"
 
-#: templates/sat_website/membership.html:42
+#: templates/sat_website/membership.html:43
 msgid "About the association"
 msgstr "Concernant l'association"
 
-#: templates/sat_website/membership.html:44
+#: templates/sat_website/membership.html:45
 msgid ""
 "We want it to be as transparent as the software. You can read about its "
 "mission, its organisation and check the official documents."
@@ -1267,11 +1285,11 @@
 "renseigner sur sa mission, son organisation et consulter les documents "
 "officiels."
 
-#: templates/sat_website/membership.html:50
+#: templates/sat_website/membership.html:51
 msgid "Become a member"
 msgstr "Devenir membre"
 
-#: templates/sat_website/membership.html:52
+#: templates/sat_website/membership.html:53
 #, python-format
 msgid ""
 "For 2015, we need about %(asso_finance_target)s € for:\n"
@@ -1311,7 +1329,7 @@
 "%(asso_members_target)s adhésions avant le 31 décembre 2015 !\n"
 "            "
 
-#: templates/sat_website/membership.html:67
+#: templates/sat_website/membership.html:68
 msgid ""
 "The membership lasts exactly one year and isn't automatically renewed: you "
 "have to renew it yourself and you can change the amount of your subscription "
@@ -1321,7 +1339,7 @@
 "la renouveler vous-même et vous pouvez modifier le montant de votre "
 "cotisation d'une année sur l'autre."
 
-#: templates/sat_website/membership.html:69
+#: templates/sat_website/membership.html:70
 msgid ""
 "To join the association without paying any subscription or to proceed with a "
 "bank transfer, please use our internal form:"
@@ -1329,11 +1347,11 @@
 "Pour rejoindre l'association sans payer de cotisation, ou bien pour procéder "
 "par virement bancaire, merci d'utiliser notre formulaire interne."
 
-#: templates/sat_website/membership.html:72
+#: templates/sat_website/membership.html:73
 msgid "Join for free or proceed with a transfer"
 msgstr "Adhérer gratuitement ou procéder par virement"
 
-#: templates/sat_website/membership.html:74
+#: templates/sat_website/membership.html:75
 msgid ""
 "If you prefer to proceed by card, you can directly use a secure payment "
 "service hosted by our bank. We unfortunately cannot pre-fill the form "
@@ -1346,7 +1364,7 @@
 "montant de cotisation positif parmi ceux définis dans le règlement "
 "intérieur : 10, 20, 30, 50, 80 ou 100."
 
-#: templates/sat_website/membership.html:77
+#: templates/sat_website/membership.html:78
 msgid "Join and proceed by card"
 msgstr "Adhérer et procéder par carte"
 
@@ -1533,7 +1551,6 @@
 "veut pas de vos données, gardez-les !"
 
 #: templates/sat_website/press.html:33
-#| msgid "Press releases"
 msgid "Releases"
 msgstr "Communiqués"
 
@@ -1927,34 +1944,6 @@
 "Libervia, l'interface web, qui est utilisable depuis tous les butineurs "
 "récents), mais d'autres systèmes sont prévus."
 
-#: templates/sat_website/screenshots.html:24
-msgid "Screenshots and videos"
-msgstr "Captures d'écran et vidéos"
-
-#: templates/sat_website/screenshots.html:29
-msgid "Basic usage"
-msgstr "Utilisation de base"
-
-#: templates/sat_website/screenshots.html:32
-msgid ""
-"These media concern the basic utilisation SàT through graphical frontends "
-"like Libervia."
-msgstr ""
-"Ces média concernent l'utilisation de base de SàT, à travers des interfaces "
-"graphiques comme Libervia."
-
-#: templates/sat_website/screenshots.html:39
-msgid "Advanced usage"
-msgstr "Utilisation avancée"
-
-#: templates/sat_website/screenshots.html:42
-msgid ""
-"These media concern the advanced utilisation and frontends of SàT, including "
-"administration tasks and experimental features."
-msgstr ""
-"Ces média concernent l'utilisation et les interfaces avancées de SàT, y "
-"compris les tâches d'administration et les fonctionnalités expérimentales."
-
 #: templates/sat_website/social_contract.html:27
 msgid "Salut à Toi's social contract"
 msgstr "Contrat social de Salut à Toi"
@@ -2345,18 +2334,3 @@
 msgstr ""
 "Merci de le lire attentivement, il contient les informations pour compléter "
 "votre adhésion."
-
-#~ msgid "Adhesion"
-#~ msgstr "Adhésion"
-
-#~ msgid "Click \"Add Exception\"."
-#~ msgstr "Cliquez sur « Ajouter une exception »."
-
-#~ msgid ""
-#~ "The dots represents Internet users, the lines represents physical links - "
-#~ "server-to-server links for the central triangle, client-to-server links "
-#~ "for the rest."
-#~ msgstr ""
-#~ "Les points représentent les utilisateurs d'Internet, les lignes "
-#~ "représentent les connexions physiques (serveur-serveur pour le triangle "
-#~ "central, client-serveur pour le reste)."
--- a/sat_website/media.py	Tue Jun 16 12:35:32 2015 +0200
+++ b/sat_website/media.py	Tue Jun 16 17:23:15 2015 +0200
@@ -21,24 +21,25 @@
 """
 from django.utils.translation import ugettext_lazy as _
 from django.conf import settings
-from collections import namedtuple
+from collections import namedtuple, OrderedDict
 import os.path
 
 ImageDesc = namedtuple("ImageDesc", "path description data")
-VideoDesc = namedtuple("VideoDesc", "path description poster data")
+VideoDesc = namedtuple("VideoDesc", "paths description poster data")
 
 screencasts = os.path.join(settings.MEDIA_EXTERNAL_URL, "screencasts") + "/"
 video = os.path.join(settings.MEDIA_EXTERNAL_URL, "video") + "/"
 
-
 #list the pictures
 
 media = [
 
-    VideoDesc(video + "libervia_adhesion_2015_fr.webm",
+    # use OrderedDict when more than one language, the first item is the default one
+    VideoDesc(OrderedDict({"en": video + "libervia_adhesion_2015_en.webm",
+                           "fr": video + "libervia_adhesion_2015_fr.webm"}),
               _(u"Membership campaign for Libervia"),
               video + "posters/libervia_adhesion_2015.png",
-              {_(u"version"): "0.5", _(u"year"): "2015", _(u"language"): "fr"}),
+              {_(u"version"): "0.5", _(u"year"): "2015"}),
 
     ImageDesc("images/screenshots/0.5/overview_libervia.png", _(u"Overview"),
               {_(u"frontend"): "libervia", _(u"version"): "0.5", _(u"year"): "2014"}),
@@ -46,35 +47,58 @@
               {_(u"frontend"): "libervia", _(u"version"): "0.5", _(u"year"): "2014"}),
     ImageDesc("images/screenshots/0.4/sat_wysiwyg.png", _(u"Rich text editor"),
               {_(u"frontend"): "libervia", _(u"version"): "0.4", _(u"year"): "2014"}),
-    VideoDesc(screencasts + "présentation_SàT_5_radio_collective.webm", _(u"Demo of the new Libervia UI, and of the collective radio feature"), screencasts + "posters/radiocol.jpg",
-              {_(u"frontend"): "libervia", _(u"version"): "0.3D", _(u"year"): "2012", _(u"language"): "fr"}),
+
+    VideoDesc({"fr": screencasts + "présentation_SàT_5_radio_collective.webm"},
+              _(u"Demo of the new Libervia UI, and of the collective radio feature"),
+              screencasts + "posters/radiocol.jpg",
+              {_(u"frontend"): "libervia", _(u"version"): "0.3D", _(u"year"): "2012"}),
+
     ImageDesc("images/screenshots/libervia/libervia_login.png", _(u"Libervia's login page"),
               {_(u"frontend"): "libervia", _(u"version"): "0.3D", _(u"year"): "2011"}),
     ImageDesc("images/screenshots/libervia/libervia_discussions.png", _(u"Libervia's main view"),
               {_(u"frontend"): "libervia", _(u"version"): "0.3D", _(u"year"): "2011"}),
     ImageDesc("images/screenshots/wix/wix_tarot.png", _(u"Wix showing a french Tarot play"),
               {_(u"frontend"): "wix", _(u"version"): "0.2", _(u"year"): "2011"}),
-    VideoDesc(screencasts + "présentation_SàT_3.webm", _(u"This video focuses on Libervia. The UI is really outdated, but we can see some features"), screencasts + "posters/présentation_SàT_3.jpg",
-              {_(u"frontend"): "libervia", _(u"version"): "0.2", _(u"year"): "2011", _(u"language"): "fr"}),
+
+    VideoDesc({"fr": screencasts + "présentation_SàT_3.webm"},
+              _(u"This video focuses on Libervia. The UI is really outdated, but we can see some features"),
+              screencasts + "posters/présentation_SàT_3.jpg",
+              {_(u"frontend"): "libervia", _(u"version"): "0.2", _(u"year"): "2011"}),
     ]
 
 media_tech = [
     ImageDesc("images/screenshots/0.5/adhoc_administration.png", _(u"Server administration from the web frontend Libervia."),
               {_(u"frontend"): "libervia", _(u"version"): "0.5", _(u"year"): "2014"}),
-    VideoDesc(screencasts + "présentation_SàT_7_télécommande_universelle.webm", _(u"Use ad-hoc commands to control a VLC player from Libervia"), screencasts + "posters/présentation_SàT_7_télécommande_universelle.png",
-              {_(u"version"): "0.4", _(u"year"): "2014", _(u"language"): "fr"}),
-    VideoDesc(screencasts + "présentation_SàT_6_export_commande.webm", _(u"Exporting a command: an FTP client is exported to a Gajim contact"), screencasts + "posters/présentation_SàT_6_export_commande.jpg",
-              {_(u"version"): "0.4D", _(u"year"): "2013", _(u"language"): "fr"}),
-    VideoDesc(screencasts + "présentation_SàT_4_copie_et_pipe.webm", _(u"How to copy and pipe streams over XMPP"), screencasts + "posters/présentation_SàT_4.png",
+
+    VideoDesc({"fr": screencasts + "présentation_SàT_7_télécommande_universelle.webm"},
+              _(u"Use ad-hoc commands to control a VLC player from Libervia"),
+              screencasts + "posters/présentation_SàT_7_télécommande_universelle.png",
+              {_(u"version"): "0.4", _(u"year"): "2014"}),
+
+    VideoDesc({"fr": screencasts + "présentation_SàT_6_export_commande.webm"},
+              _(u"Exporting a command: an FTP client is exported to a Gajim contact"),
+              screencasts + "posters/présentation_SàT_6_export_commande.jpg",
+              {_(u"version"): "0.4D", _(u"year"): "2013"}),
+
+    VideoDesc({"fr": screencasts + "présentation_SàT_4_copie_et_pipe.webm"},
+              _(u"How to copy and pipe streams over XMPP"),
+              screencasts + "posters/présentation_SàT_4.png",
               {_(u"version"): "0.3D", _(u"year"): "2011", _(u"language"): "fr"}),
+
     ImageDesc("images/screenshots/jp/jp.png", _(u"Cowsay sent in conversation through jp"),
               {_(u"version"): "0.2", _(u"year"): "2011"}),
     ImageDesc("images/screenshots/primitivus/primitivus_tarot.png", _(u"Primitivus showing a french Tarot play"),
               {_(u"frontend"): "primitivus", _(u"version"): "0.2", _(u"year"): "2011"}),
-    VideoDesc(screencasts + "présentation_SàT_2.webm", _(u"This video shows french Tarot game, and how to use Thunderbird with SàT"), screencasts + "posters/présentation_SàT_2.jpg",
-              {_(u"version"): "0.2", _(u"year"): "2011", _(u"language"): "fr"}),
-    VideoDesc(screencasts + "présentation_SàT.webm", _(u"The first video shows wix, primitivus and jp"), screencasts + "posters/présentation_SàT.jpg",
-              {_(u"version"): "0.2", _(u"year"): "2011", _(u"language"): "fr"}),
+
+    VideoDesc({"fr": screencasts + "présentation_SàT_2.webm"},
+              _(u"This video shows french Tarot game, and how to use Thunderbird with SàT"),
+              screencasts + "posters/présentation_SàT_2.jpg",
+              {_(u"version"): "0.2", _(u"year"): "2011"}),
+
+    VideoDesc({"fr": screencasts + "présentation_SàT.webm"},
+              _(u"The first video shows wix, primitivus and jp"),
+              screencasts + "posters/présentation_SàT.jpg",
+              {_(u"version"): "0.2", _(u"year"): "2011"}),
     ]
 
 
--- a/sat_website/templatetags/utils.py	Tue Jun 16 12:35:32 2015 +0200
+++ b/sat_website/templatetags/utils.py	Tue Jun 16 17:23:15 2015 +0200
@@ -1,6 +1,6 @@
 from django import template
 from django.forms import RadioSelect, CheckboxInput
-from django.utils.translation import get_language, ugettext_lazy
+from django.utils.translation import get_language, ugettext_lazy as _
 register = template.Library()
 
 @register.filter
@@ -70,24 +70,34 @@
     return result
 
 @register.filter
-def metadata(data):
-    """Return a string representation of a metadata dict.
+def select_video_path(paths):
+    """Return the video path matching the current language.
 
-    @param data (dict{__proxy__: unicode}): metadata dictionnary
+    @param paths (dict): dict of video paths.
     @return: unicode
     """
-    if not data:
-        return ""
     lang = get_language()
-    sep = ugettext_lazy(': ')
-    items = ["%s%s%s" % (key.translate(lang), sep, value) for key, value in data.iteritems()]
-    return replace_language_tag("(%s)" % ', '.join(items))
+    if lang in paths:
+        return paths[lang]
+    return paths.values()[0]
 
 @register.filter
-def replace_language_tag(text):
-    """Replace {{LANGUAGE_CODE}} by the current language code.
+def metadata(entry):
+    """Return a string representation of the video metadata.
 
-    @param text (unicode): text to process
+    @param entry (VideoDesc): video entry
     @return: unicode
     """
-    return text.replace("{{LANGUAGE_CODE}}", get_language())
+    sep = _(': ')
+    lang = get_language()
+
+    def get_item(key, value):
+        return "%s%s%s" % (key, sep, value)
+    items = [get_item(key.translate(lang), value) for key, value in entry.data.iteritems()]
+    try:
+        lang_key = _(u"language").translate(lang)
+        lang_value = lang if lang in entry.paths else entry.paths.keys()[0]
+        items.append(get_item(lang_key, lang_value))
+    except AttributeError:
+        pass
+    return "(%s)" % ', '.join(items)
--- a/templates/sat_website/gallery.html	Tue Jun 16 12:35:32 2015 +0200
+++ b/templates/sat_website/gallery.html	Tue Jun 16 17:23:15 2015 +0200
@@ -37,7 +37,7 @@
                 <div class="col-md-4">
                     {% if entry.poster %}
                         <video index="{{ forloop.counter0 }}" class="thumbnail img-responsive" width="640" height="400" poster="{{ entry.poster }}" controls preload="none">
-                            <source src="{{ entry.path }}" type='video/webm; codecs="vp8.0, vorbis"'>
+                            <source src="{{ entry.paths|select_video_path }}" type='video/webm; codecs="vp8.0, vorbis"'>
                             {% blocktrans with firefox="<a href=\"http://www.mozilla.org/\">Firefox</a>" %}Your browser doesn't manage the « video » tag, you should update, e.g. with the last {{ firefox }}.{% endblocktrans %}
 	                    </video>
                     {% else %}
@@ -80,7 +80,7 @@
                             <div class="item{% if not forloop.counter0 %} active{% endif %}">
                                 {% if entry.poster %}
                                     <video class="img-responsive" width="640" height="400" poster="{{ entry.poster }}" controls preload="none">
-                                        <source src="{{ entry.path }}" type='video/webm; codecs="vp8.0, vorbis"'>
+                                        <source src="{{ entry.paths|select_video_path }}" type='video/webm; codecs="vp8.0, vorbis"'>
                                         {% blocktrans with firefox="<a href=\"http://www.mozilla.org/\">Firefox</a>" %}Your browser doesn't manage the « video » tag, you should update, e.g. with the last {{ firefox }}.{% endblocktrans %}
                                     </video>
                                 {% else %}
@@ -88,7 +88,7 @@
                                 {% endif %}
                                 <div class="carousel-caption">
                                     {{ entry.description }}<br/>
-                                    {{ entry.data|metadata }}
+                                    {{ entry|metadata }}
                                 </div>
                             </div>
                         {% endfor %}
--- a/templates/sat_website/membership.html	Tue Jun 16 12:35:32 2015 +0200
+++ b/templates/sat_website/membership.html	Tue Jun 16 17:23:15 2015 +0200
@@ -31,8 +31,8 @@
 <div class="row">
     <div class="info text-center">
 	    <video class="video-campaign" poster="http://ftp.goffi.org/media/video/posters/libervia_adhesion_2015.png" controls preload="none">
-            <source src="http://ftp.goffi.org/media/video/libervia_adhesion_2015_fr.webm" type='video/webm; codecs="vp8.0, vorbis"'>
-            <source src="http://ftp.goffi.org/media/video/libervia_adhesion_2015_fr.ogv" type='video/ogg; codecs="theora, vorbis"'>
+            <source src="http://ftp.goffi.org/media/video/libervia_adhesion_2015_{{LANGUAGE_CODE}}.webm" type='video/webm; codecs="vp8.0, vorbis"'>
+            <source src="http://ftp.goffi.org/media/video/libervia_adhesion_2015_{{LANGUAGE_CODE}}.ogv" type='video/ogg; codecs="theora, vorbis"'>
              {% blocktrans with firefox="<a href=\"http://www.mozilla.org/\">Firefox</a>" %}Your browser doesn't manage the « video » tag, you should update, e.g. with the last {{ firefox }}.{% endblocktrans %}
 	    </video>
     </div>