Mercurial > sat_legacy_website
comparison sat_website/media.py @ 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 | 7a79cb5ed43b |
comparison
equal
deleted
inserted
replaced
89:4b4a5d7602f8 | 90:5de2a3dd4e67 |
---|---|
19 You should have received a copy of the GNU Affero General Public License | 19 You should have received a copy of the GNU Affero General Public License |
20 along with Foobar. If not, see <http://www.gnu.org/licenses/>. | 20 along with Foobar. If not, see <http://www.gnu.org/licenses/>. |
21 """ | 21 """ |
22 from django.utils.translation import ugettext_lazy as _ | 22 from django.utils.translation import ugettext_lazy as _ |
23 from django.conf import settings | 23 from django.conf import settings |
24 from collections import namedtuple | 24 from collections import namedtuple, OrderedDict |
25 import os.path | 25 import os.path |
26 | 26 |
27 ImageDesc = namedtuple("ImageDesc", "path description data") | 27 ImageDesc = namedtuple("ImageDesc", "path description data") |
28 VideoDesc = namedtuple("VideoDesc", "path description poster data") | 28 VideoDesc = namedtuple("VideoDesc", "paths description poster data") |
29 | 29 |
30 screencasts = os.path.join(settings.MEDIA_EXTERNAL_URL, "screencasts") + "/" | 30 screencasts = os.path.join(settings.MEDIA_EXTERNAL_URL, "screencasts") + "/" |
31 video = os.path.join(settings.MEDIA_EXTERNAL_URL, "video") + "/" | 31 video = os.path.join(settings.MEDIA_EXTERNAL_URL, "video") + "/" |
32 | |
33 | 32 |
34 #list the pictures | 33 #list the pictures |
35 | 34 |
36 media = [ | 35 media = [ |
37 | 36 |
38 VideoDesc(video + "libervia_adhesion_2015_fr.webm", | 37 # use OrderedDict when more than one language, the first item is the default one |
38 VideoDesc(OrderedDict({"en": video + "libervia_adhesion_2015_en.webm", | |
39 "fr": video + "libervia_adhesion_2015_fr.webm"}), | |
39 _(u"Membership campaign for Libervia"), | 40 _(u"Membership campaign for Libervia"), |
40 video + "posters/libervia_adhesion_2015.png", | 41 video + "posters/libervia_adhesion_2015.png", |
41 {_(u"version"): "0.5", _(u"year"): "2015", _(u"language"): "fr"}), | 42 {_(u"version"): "0.5", _(u"year"): "2015"}), |
42 | 43 |
43 ImageDesc("images/screenshots/0.5/overview_libervia.png", _(u"Overview"), | 44 ImageDesc("images/screenshots/0.5/overview_libervia.png", _(u"Overview"), |
44 {_(u"frontend"): "libervia", _(u"version"): "0.5", _(u"year"): "2014"}), | 45 {_(u"frontend"): "libervia", _(u"version"): "0.5", _(u"year"): "2014"}), |
45 ImageDesc("images/screenshots/0.5/http_unsecure_warning.png", _(u"Optional security check"), | 46 ImageDesc("images/screenshots/0.5/http_unsecure_warning.png", _(u"Optional security check"), |
46 {_(u"frontend"): "libervia", _(u"version"): "0.5", _(u"year"): "2014"}), | 47 {_(u"frontend"): "libervia", _(u"version"): "0.5", _(u"year"): "2014"}), |
47 ImageDesc("images/screenshots/0.4/sat_wysiwyg.png", _(u"Rich text editor"), | 48 ImageDesc("images/screenshots/0.4/sat_wysiwyg.png", _(u"Rich text editor"), |
48 {_(u"frontend"): "libervia", _(u"version"): "0.4", _(u"year"): "2014"}), | 49 {_(u"frontend"): "libervia", _(u"version"): "0.4", _(u"year"): "2014"}), |
49 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", | 50 |
50 {_(u"frontend"): "libervia", _(u"version"): "0.3D", _(u"year"): "2012", _(u"language"): "fr"}), | 51 VideoDesc({"fr": screencasts + "présentation_SàT_5_radio_collective.webm"}, |
52 _(u"Demo of the new Libervia UI, and of the collective radio feature"), | |
53 screencasts + "posters/radiocol.jpg", | |
54 {_(u"frontend"): "libervia", _(u"version"): "0.3D", _(u"year"): "2012"}), | |
55 | |
51 ImageDesc("images/screenshots/libervia/libervia_login.png", _(u"Libervia's login page"), | 56 ImageDesc("images/screenshots/libervia/libervia_login.png", _(u"Libervia's login page"), |
52 {_(u"frontend"): "libervia", _(u"version"): "0.3D", _(u"year"): "2011"}), | 57 {_(u"frontend"): "libervia", _(u"version"): "0.3D", _(u"year"): "2011"}), |
53 ImageDesc("images/screenshots/libervia/libervia_discussions.png", _(u"Libervia's main view"), | 58 ImageDesc("images/screenshots/libervia/libervia_discussions.png", _(u"Libervia's main view"), |
54 {_(u"frontend"): "libervia", _(u"version"): "0.3D", _(u"year"): "2011"}), | 59 {_(u"frontend"): "libervia", _(u"version"): "0.3D", _(u"year"): "2011"}), |
55 ImageDesc("images/screenshots/wix/wix_tarot.png", _(u"Wix showing a french Tarot play"), | 60 ImageDesc("images/screenshots/wix/wix_tarot.png", _(u"Wix showing a french Tarot play"), |
56 {_(u"frontend"): "wix", _(u"version"): "0.2", _(u"year"): "2011"}), | 61 {_(u"frontend"): "wix", _(u"version"): "0.2", _(u"year"): "2011"}), |
57 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", | 62 |
58 {_(u"frontend"): "libervia", _(u"version"): "0.2", _(u"year"): "2011", _(u"language"): "fr"}), | 63 VideoDesc({"fr": screencasts + "présentation_SàT_3.webm"}, |
64 _(u"This video focuses on Libervia. The UI is really outdated, but we can see some features"), | |
65 screencasts + "posters/présentation_SàT_3.jpg", | |
66 {_(u"frontend"): "libervia", _(u"version"): "0.2", _(u"year"): "2011"}), | |
59 ] | 67 ] |
60 | 68 |
61 media_tech = [ | 69 media_tech = [ |
62 ImageDesc("images/screenshots/0.5/adhoc_administration.png", _(u"Server administration from the web frontend Libervia."), | 70 ImageDesc("images/screenshots/0.5/adhoc_administration.png", _(u"Server administration from the web frontend Libervia."), |
63 {_(u"frontend"): "libervia", _(u"version"): "0.5", _(u"year"): "2014"}), | 71 {_(u"frontend"): "libervia", _(u"version"): "0.5", _(u"year"): "2014"}), |
64 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", | 72 |
65 {_(u"version"): "0.4", _(u"year"): "2014", _(u"language"): "fr"}), | 73 VideoDesc({"fr": screencasts + "présentation_SàT_7_télécommande_universelle.webm"}, |
66 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", | 74 _(u"Use ad-hoc commands to control a VLC player from Libervia"), |
67 {_(u"version"): "0.4D", _(u"year"): "2013", _(u"language"): "fr"}), | 75 screencasts + "posters/présentation_SàT_7_télécommande_universelle.png", |
68 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", | 76 {_(u"version"): "0.4", _(u"year"): "2014"}), |
77 | |
78 VideoDesc({"fr": screencasts + "présentation_SàT_6_export_commande.webm"}, | |
79 _(u"Exporting a command: an FTP client is exported to a Gajim contact"), | |
80 screencasts + "posters/présentation_SàT_6_export_commande.jpg", | |
81 {_(u"version"): "0.4D", _(u"year"): "2013"}), | |
82 | |
83 VideoDesc({"fr": screencasts + "présentation_SàT_4_copie_et_pipe.webm"}, | |
84 _(u"How to copy and pipe streams over XMPP"), | |
85 screencasts + "posters/présentation_SàT_4.png", | |
69 {_(u"version"): "0.3D", _(u"year"): "2011", _(u"language"): "fr"}), | 86 {_(u"version"): "0.3D", _(u"year"): "2011", _(u"language"): "fr"}), |
87 | |
70 ImageDesc("images/screenshots/jp/jp.png", _(u"Cowsay sent in conversation through jp"), | 88 ImageDesc("images/screenshots/jp/jp.png", _(u"Cowsay sent in conversation through jp"), |
71 {_(u"version"): "0.2", _(u"year"): "2011"}), | 89 {_(u"version"): "0.2", _(u"year"): "2011"}), |
72 ImageDesc("images/screenshots/primitivus/primitivus_tarot.png", _(u"Primitivus showing a french Tarot play"), | 90 ImageDesc("images/screenshots/primitivus/primitivus_tarot.png", _(u"Primitivus showing a french Tarot play"), |
73 {_(u"frontend"): "primitivus", _(u"version"): "0.2", _(u"year"): "2011"}), | 91 {_(u"frontend"): "primitivus", _(u"version"): "0.2", _(u"year"): "2011"}), |
74 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", | 92 |
75 {_(u"version"): "0.2", _(u"year"): "2011", _(u"language"): "fr"}), | 93 VideoDesc({"fr": screencasts + "présentation_SàT_2.webm"}, |
76 VideoDesc(screencasts + "présentation_SàT.webm", _(u"The first video shows wix, primitivus and jp"), screencasts + "posters/présentation_SàT.jpg", | 94 _(u"This video shows french Tarot game, and how to use Thunderbird with SàT"), |
77 {_(u"version"): "0.2", _(u"year"): "2011", _(u"language"): "fr"}), | 95 screencasts + "posters/présentation_SàT_2.jpg", |
96 {_(u"version"): "0.2", _(u"year"): "2011"}), | |
97 | |
98 VideoDesc({"fr": screencasts + "présentation_SàT.webm"}, | |
99 _(u"The first video shows wix, primitivus and jp"), | |
100 screencasts + "posters/présentation_SàT.jpg", | |
101 {_(u"version"): "0.2", _(u"year"): "2011"}), | |
78 ] | 102 ] |
79 | 103 |
80 | 104 |
81 | 105 |
82 | 106 |