diff --git a/src/config/2019.json b/src/config/2019.json index 1762b202..536ab0ad 100644 --- a/src/config/2019.json +++ b/src/config/2019.json @@ -311,6 +311,17 @@ "github": "bkardell", "twitter": "briankardell" }, + "borisschapira": { + "name": "Boris Schapira", + "teams": [ + "developers", + "translators" + ], + "avatar_url": "https:\/\/avatars1.githubusercontent.com\/u\/284742?v=4&s=200", + "website": "https:\/\/boris.schapira.dev", + "github": "borisschapira", + "twitter": "boostmarks" + }, "caraya": { "name": "Carlos Araya", "teams": [ diff --git a/src/language.py b/src/language.py index 66e17b12..52c5d82c 100644 --- a/src/language.py +++ b/src/language.py @@ -30,6 +30,7 @@ class Language(object): JAPANESE = _Language('日本語', 'ja', 'JP') ENGLISH = _Language('English', 'en', 'US') SPANISH = _Language('Español', 'es', 'ES') + FRENCH = _Language('Français', 'fr', 'FR') DEFAULT_LANGUAGE = Language.ENGLISH diff --git a/src/static/css/page.css b/src/static/css/page.css index bd51cfa2..66e2a55e 100644 --- a/src/static/css/page.css +++ b/src/static/css/page.css @@ -154,6 +154,9 @@ #num_comments { line-height: 24px; } +[data-translation] { + display: none; +} .authors h4{ padding: 16px 0; diff --git a/src/static/js/chapter.js b/src/static/js/chapter.js index 6c81b6d3..99ae39f4 100644 --- a/src/static/js/chapter.js +++ b/src/static/js/chapter.js @@ -239,7 +239,10 @@ function setDiscussionCount() { return; } var el = document.getElementById('num_comments'); - el.innerText = comments + ' ' + (comments == 1 ? 'comment' : 'comments'); + el.innerText = comments; + + document.getElementById(comments <= 1 ? 'comment-singular' : 'comment-plural').removeAttribute('data-translation'); + gtag('event', 'discussion-count', { 'event_category': 'user', 'event_label': 'enabled', 'value': 1 }); }) .catch(function (err) { diff --git a/src/templates/en/2019/base_chapter.html b/src/templates/en/2019/base_chapter.html index 5363da7a..273b38a1 100644 --- a/src/templates/en/2019/base_chapter.html +++ b/src/templates/en/2019/base_chapter.html @@ -44,7 +44,7 @@ {% macro render_actions() %}
- Discuss this chapter + Discuss this chapter commentcomments
{% endmacro %} diff --git a/src/templates/fr/2019/base.html b/src/templates/fr/2019/base.html new file mode 100644 index 00000000..5454c23e --- /dev/null +++ b/src/templates/fr/2019/base.html @@ -0,0 +1,166 @@ +{% extends "base.html" %} + +{% block styles %} + + + +{% endblock %} + +{% block content%} + {% block header %} +
+
+ + +
+ {% if request.endpoint == 'home' %} + + Commencer l'exploration + + {% endif %} + {{ language_switcher() }} +
+ + +
+ {% if request.endpoint == 'home' %} +
+
+
2019
+

Web Almanac

+

+ Rapport annuel
+ de HTTP Archive sur
+ l'état du Web +

+

+ Notre mission est de combiner les statistiques brutes et les tendances de HTTP Archive avec l'expertise de la communauté web. Le Web Almanac est un rapport complet sur l'état du Web, soutenu par des données réelles et des experts du Web. Il est composé de 20 chapitres couvrant l'expérience utilisateur, le contenu des pages, leur publication et leur distribution. +

+ + Commencer l'exploration + +
+ Édition 2019 du Web Almanac + Web Almanac +
+ {% endif %} +
+ {% endblock %} + + {% block main %}{% endblock %} + + {% block footer %} + + {% endblock %} + {% block scripts %} + + {% endblock %} +{% endblock %} + +{% macro language_switcher() %} +{% if supported_languages | length > 1%} +
+ {% if language is not none %} + + {% else %} + + {% endif %} + + ouvrir +
+{% endif %} +{% endmacro %} + +{% macro year_switcher() %} +
+ + ouvrir +
+{% endmacro %} diff --git a/src/templates/fr/2019/base_chapter.html b/src/templates/fr/2019/base_chapter.html new file mode 100644 index 00000000..fe92f088 --- /dev/null +++ b/src/templates/fr/2019/base_chapter.html @@ -0,0 +1,149 @@ +{% extends "fr/2019/base.html" %} + +{% block title %}{{ metadata.get('title') }} | 2019 | Le Web Almanac par HTTP Archive{% endblock %} + +{% block styles %} +{{ super() }} + +{% endblock %} + +{% block scripts %} +{{ super() }} + + + + +{% endblock %} + +{# Calls to action for readers who want to engage more with this chapter. #} +{% macro render_actions() %} +
+ + Discuter de ce chapitre commentairecommentaires + +
+{% endmacro %} + + +{% macro render_byline() %} +
Écrit par + {% for author in metadata.get('authors') %} + {{ config.contributors[author].name if author in config.contributors else author }}{% if loop.index != loop.length and loop.length != 2 %},{% endif %} + {% if loop.index == loop.length - 1 %} et{% endif %} + {% endfor %} +
+ +
Relu par + {% for reviewer in metadata.get('reviewers') %} + {{ config.contributors[reviewer].name if reviewer in config.contributors else reviewer }}{% if loop.index != loop.length and loop.length != 2 %},{% endif %} + {% if loop.index == loop.length - 1 %} et{% endif %} + {% endfor %} +
+ + {% if metadata.get('translators') | length > 1 %} +
Traduit par + {% for translator in metadata.get('translators') %} + {{ config.contributors[translator].name if translator in config.contributors else translator }}{% if loop.index != loop.length and loop.length != 2 %},{% endif %} + {% if loop.index == loop.length - 1 %} et{% endif %} + {% endfor %} +
+ {% endif %} +{% endmacro %} + +{% macro render_authors() %} + {% for author in metadata.get('authors') %} + {% if loop.length == 1 %}

Auteur·ice

{% endif -%} + {% if loop.length > 1 and loop.index == 1 %}

Auteur·ice·s

{% endif %} + {% if loop.index == 1 %} +{% endmacro %} + +{% macro render_prevnext() %} + {% if prev_chapter %} + + + + Chapitre {{ prev_chapter['chapter'] }} + + + {{ prev_chapter['title'] }} + + + {% endif %} + + {% if next_chapter %} + + + + Chapitre {{ next_chapter['chapter'] }} + + + {{ next_chapter['title'] }} + + + {% endif %} +{% endmacro %} diff --git a/src/templates/fr/2019/chapter.html b/src/templates/fr/2019/chapter.html new file mode 100644 index 00000000..d782599e --- /dev/null +++ b/src/templates/fr/2019/chapter.html @@ -0,0 +1,132 @@ +{% extends "fr/2019/base_chapter.html" %} + + + +{% set metadata = <%- JSON.stringify(metadata) %> %} + +{% block description %}{{ metadata.get('description','Chapitre' + metadata.get('title') + ' du Web Almanac'+ year + " explorant l'utilisation des " + metadata.get('description',metadata.get('title')) + ' sur le web.') }}{% endblock %} + +{% block meta %} + + + + + + + + + + + + + + + + + + +{% endblock %} + +{% block main %} +
+ + +
+
+
+ Partie {{ metadata.get('part_number') }} Chapitre {{ metadata.get('chapter_number') }} +
+

+ {{ metadata.get('title') }} + {% if metadata.get('unedited', false) %} + [non corrigé] + {% endif %} +

+ + {{ render_byline() }} + <%- body %> +
+ {{ render_actions() }} +
+ {{ render_authors() }} +
+ + +
+
+{% endblock %} diff --git a/src/templates/fr/2019/contributors.html b/src/templates/fr/2019/contributors.html new file mode 100644 index 00000000..3ef8eb7d --- /dev/null +++ b/src/templates/fr/2019/contributors.html @@ -0,0 +1,442 @@ +{% extends "fr/2019/base.html" %} + +{% block title %}Contributeurs et contributrices 2019 | Web Almanac par HTTP Archive{% endblock %} + +{% block description %}Les {{ config.contributors.items() | length }} personnes ayant contribué au Web Almanac 2019 par leurs analyses, leurs écrits, leurs réflexions, leurs participations au design, leur code, leurs éditions, leurs relectures, ou leurs traductions.{% endblock %} + +{% block meta %} + + + + + + + + + + + + + + + + + + + +{% endblock %} + +{% block styles %} +{{ super() }} + +{% endblock %} + +{% block main %} +
+

+ Contributeurs et contributrices +

+
+ + + + + + +
+
+
{{ config.contributors.items() | length }} personnes
+
+

Filtrer par équipe :

+ {% set localizedTeamNames = { + "analysts": "Analyse", + "authors": "Rédaction", + "brainstormers": "Réflexion", + "designers": "Design", + "developers": "Développement", + "editors": "Édition", + "reviewers": "Relecture", + "translators": "Traduction", + } %} + {% for id, team in config.teams.items() %} + + {% endfor %} +
+ +
+ {% for id, contributor in config.contributors.items() %} +
+ avatar de {{ contributor.name }} +
{{ contributor.name }}
+ +
+ {% if contributor.github %} + GitHub + {% endif %} + {% if contributor.twitter %} + Twitter + {% endif %} + {% if contributor.website %} + Site Web + {% endif %} +
+ +
+ {% for id in contributor.teams | sort() %} + {{ config.teams[id].name }} + {% endfor %} +
+
+ {% endfor %} +
+
+
+{% endblock %} + +{% block scripts %} + {{ super() }} + +{% endblock %} diff --git a/src/templates/fr/2019/index.html b/src/templates/fr/2019/index.html new file mode 100644 index 00000000..0e21e007 --- /dev/null +++ b/src/templates/fr/2019/index.html @@ -0,0 +1,169 @@ +{% extends "fr/2019/base.html" %} + +{% block title %}Web Almanac 2019{% endblock %} + +{% block description %}Le Web Almanac est un rapport annuel sur l'état du Web qui combine l'expertise de la communauté Web avec les données et tendances de HTTP Archive.{% endblock %} + +{% block meta %} + + + + + + + + + + + + + + + + + + + + +{% endblock %} + +{% block styles %} + {{ super() }} + +{% endblock %} + +{% block main %} +
+ +
+ {% set contributors = config.contributors.keys() | length %} +
+

Contributeurs et contributrices

+

+ Le Web Almanac a été rendu possible grâce au travail acharné de la communauté Web. {{ contributors }} personnes ont consacré bénévolement d'innombrables heures à le planifier, faire des recherches, le rédiger et le mettre à votre disposition. +

+ + Voir les contributeurs et contributrices + +
+
+
{{ contributors }}
+ + + +
+
+
+
+

Méthodologie

+
+
+
+ Sites Web testés +
+
+ 5,8 M +
+
+
+
+ Données traitées +
+
+ 20,9 TB +
+
+
+

+ Sauf indication contraire, les statistiques des 20 chapitres du Web Almanac proviennent du jeu de données HTTP Archiven, un projet communautaire qui suit l'évolution de la construction du web depuis 2010. Grâce à WebPageTest et Lighthouse, HTTP Archive collecte chaque mois les métadonnées de près de 6 millions de sites Web et les insère dans une base de données publique BigQuery pour les analyser. Le jeu de données de juillet 2019 a servi de base aux mesures du Web Almanac. Pour plus d'informations, consultez la page Méthodologie. +

+ + En savoir plus sur la Méthodologie + + +
+
+
+{% endblock %}