From a2fd258c46b383f3ae32d16e93e7ea8a158d2ef4 Mon Sep 17 00:00:00 2001 From: Barry Date: Wed, 19 Aug 2020 17:33:31 +0100 Subject: [PATCH 1/5] Config updates for new chapters and other misc cleanups --- src/config/2020.json | 31 ++++++++++++++++++++++-------- src/server/language.py | 6 ++++-- src/templates/en/2019/base.html | 7 +++++-- src/templates/es/2019/base.html | 5 ++++- src/templates/fr/2019/base.html | 5 ++++- src/templates/ja/2019/base.html | 5 ++++- src/templates/pt/2019/base.html | 7 +++++-- src/templates/zh-CN/2019/base.html | 5 ++++- 8 files changed, 53 insertions(+), 18 deletions(-) diff --git a/src/config/2020.json b/src/config/2020.json index a3ebecd17e1..6c672542664 100644 --- a/src/config/2020.json +++ b/src/config/2020.json @@ -92,6 +92,12 @@ { "part": "II", "chapter": "13", + "title": "Capabilities", + "slug": "capabilities" + }, + { + "part": "II", + "chapter": "14", "title": "PWA", "slug": "pwa" } @@ -103,19 +109,19 @@ "chapters": [ { "part": "III", - "chapter": "14", + "chapter": "15", "title": "CMS", "slug": "cms" }, { "part": "III", - "chapter": "15", + "chapter": "16", "title": "Ecommerce", "slug": "ecommerce" }, { "part": "III", - "chapter": "16", + "chapter": "17", "title": "JAMstack", "slug": "jamstack" } @@ -127,31 +133,31 @@ "chapters": [ { "part": "IV", - "chapter": "17", + "chapter": "18", "title": "Page Weight", "slug": "page-weight" }, { "part": "IV", - "chapter": "18", + "chapter": "19", "title": "Compression", "slug": "compression" }, { "part": "IV", - "chapter": "19", + "chapter": "20", "title": "Caching", "slug": "caching" }, { "part": "IV", - "chapter": "20", + "chapter": "21", "title": "Resource Hints", "slug": "resource-hints" }, { "part": "IV", - "chapter": "21", + "chapter": "22", "title": "HTTP/2", "slug": "http2" } @@ -165,6 +171,9 @@ "authors": { "name": "Authors" }, + "designers": { + "name": "Designers" + }, "developers": { "name": "Developers" }, @@ -888,6 +897,12 @@ "github": "ipullrank", "twitter": "IPullRank" }, + "michelleoconnor": { + "name": "Michelle O'Connor", + "teams": [ + "designers" + ] + }, "MikeBishop": { "name": "Mike Bishop", "teams": [ diff --git a/src/server/language.py b/src/server/language.py index 97390afe09b..cd385646ae5 100644 --- a/src/server/language.py +++ b/src/server/language.py @@ -26,12 +26,14 @@ def lang_code(self): return self._lang_code -# Currently we are only supporting languages and not regions +# Mostly we are region agnostic languages, but can add region where +# there are significant differences (e.g. Chinese) class Language(object): - JA = _Language('日本語', 'ja', 'JP') EN = _Language('English', 'en', 'US') ES = _Language('Español', 'es', 'ES') FR = _Language('Français', 'fr', 'FR') + JA = _Language('日本語', 'ja', 'JP') + PT = _Language('Portuguese', 'pt', 'PT') ZH_CN = _Language('简体中文', 'zh-CN', 'CN') diff --git a/src/templates/en/2019/base.html b/src/templates/en/2019/base.html index 0c84e58a394..105f0678e75 100644 --- a/src/templates/en/2019/base.html +++ b/src/templates/en/2019/base.html @@ -154,7 +154,10 @@ "cdn": "CDN", "page-weight": "Page Weight", "resource-hints": "Resource Hints", - "http2": "HTTP/2" + "http2": "HTTP/2", + "privacy": "Privacy", + "capabilities": "Capabilities", + "jamstack": "JAMstack" } %} @@ -165,7 +168,7 @@ "designers": "Designers", "developers": "Developers", "editors": "Editors", - "leads": "Leads", + "leads": "Project Leads", "reviewers": "Reviewers", "translators": "Translators", } diff --git a/src/templates/es/2019/base.html b/src/templates/es/2019/base.html index 330926cc3a3..68e536de427 100644 --- a/src/templates/es/2019/base.html +++ b/src/templates/es/2019/base.html @@ -154,7 +154,10 @@ "cdn": "CDN", "page-weight": "Peso de las Páginas", "resource-hints": "Sugerencias de Recursos", - "http2": "HTTP/2" + "http2": "HTTP/2", + "privacy": "Intimidad", + "capabilities": "Capacidades", + "jamstack": "JAMstack" } %} diff --git a/src/templates/fr/2019/base.html b/src/templates/fr/2019/base.html index f8a99f51039..6615907e825 100644 --- a/src/templates/fr/2019/base.html +++ b/src/templates/fr/2019/base.html @@ -154,7 +154,10 @@ "cdn": "CDN", "page-weight": "Poids des pages", "resource-hints": "Indices de Ressources", - "http2": "HTTP/2" + "http2": "HTTP/2", + "privacy": "Intimité", + "capabilities": "Capacités", + "jamstack": "JAMstack" } %} diff --git a/src/templates/ja/2019/base.html b/src/templates/ja/2019/base.html index 5c8b2e3795d..c2cbd3cd74b 100644 --- a/src/templates/ja/2019/base.html +++ b/src/templates/ja/2019/base.html @@ -154,7 +154,10 @@ "cdn": "CDN", "page-weight": "Page Weight", "resource-hints": "リソースのヒント", - "http2": "HTTP/2" + "http2": "HTTP/2", + "privacy": "プライバシー", + "capabilities": "能力", + "jamstack": "JAMstack" } %} diff --git a/src/templates/pt/2019/base.html b/src/templates/pt/2019/base.html index 26c0f9213d1..b39dc344254 100644 --- a/src/templates/pt/2019/base.html +++ b/src/templates/pt/2019/base.html @@ -48,6 +48,7 @@ {% block close_the_index %}Fechar índice de conteúdos{% endblock %} {% block and %}e{% endblock %} +{% block comma %}, {% endblock %} {% block open %}Abrir{% endblock %} {% block close %}Fechar{% endblock %} @@ -74,7 +75,6 @@ {% block footer_title %}Navegação no rodapé{% endblock %} {% block copyright %}© Web Almanac. Licenciado sob Apache 2.0.{% endblock %} - {% block accessibility_statement %}Declaração de acessibilidade{% endblock %} {% block featured_chapter %}Capítulo em Destaque{% endblock %} @@ -154,7 +154,10 @@ "cdn": "CDN", "page-weight": "Peso da página", "resource-hints": "Dicas de Recursos", - "http2": "HTTP/2" + "http2": "HTTP/2", + "privacy": "Privacidade", + "capabilities": "Capacidades", + "jamstack": "JAMstack" } %} diff --git a/src/templates/zh-CN/2019/base.html b/src/templates/zh-CN/2019/base.html index 3aaf2f62d95..0761392f09e 100644 --- a/src/templates/zh-CN/2019/base.html +++ b/src/templates/zh-CN/2019/base.html @@ -154,7 +154,10 @@ "cdn": "CDN", "page-weight": "页面重量", "resource-hints": "资源提示", - "http2": "HTTP/2" + "http2": "HTTP/2", + "privacy": "隐私", + "capabilities": "能力", + "jamstack": "JAMstack" } %} From ef988bee6e19a1dbbda18dd7bae196ecb422ecd8 Mon Sep 17 00:00:00 2001 From: Barry Pollard Date: Wed, 19 Aug 2020 17:51:43 +0100 Subject: [PATCH 2/5] Update src/templates/fr/2019/base.html Co-authored-by: Boris Schapira --- src/templates/fr/2019/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/templates/fr/2019/base.html b/src/templates/fr/2019/base.html index 6615907e825..175b90f6348 100644 --- a/src/templates/fr/2019/base.html +++ b/src/templates/fr/2019/base.html @@ -155,7 +155,7 @@ "page-weight": "Poids des pages", "resource-hints": "Indices de Ressources", "http2": "HTTP/2", - "privacy": "Intimité", + "privacy": "Vie Privée", "capabilities": "Capacités", "jamstack": "JAMstack" } From cd41dc12a10deec7c9f969f4c4ded6f31e44776d Mon Sep 17 00:00:00 2001 From: Barry Date: Wed, 19 Aug 2020 18:14:23 +0100 Subject: [PATCH 3/5] Change JAMstack to Jamstack --- src/config/2020.json | 2 +- src/templates/en/2019/base.html | 2 +- src/templates/es/2019/base.html | 2 +- src/templates/fr/2019/base.html | 2 +- src/templates/ja/2019/base.html | 2 +- src/templates/pt/2019/base.html | 2 +- src/templates/zh-CN/2019/base.html | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/config/2020.json b/src/config/2020.json index 6c672542664..ca7ddc06f35 100644 --- a/src/config/2020.json +++ b/src/config/2020.json @@ -122,7 +122,7 @@ { "part": "III", "chapter": "17", - "title": "JAMstack", + "title": "Jamstack", "slug": "jamstack" } ] diff --git a/src/templates/en/2019/base.html b/src/templates/en/2019/base.html index 105f0678e75..41ad9bcf2fe 100644 --- a/src/templates/en/2019/base.html +++ b/src/templates/en/2019/base.html @@ -157,7 +157,7 @@ "http2": "HTTP/2", "privacy": "Privacy", "capabilities": "Capabilities", - "jamstack": "JAMstack" + "jamstack": "Jamstack" } %} diff --git a/src/templates/es/2019/base.html b/src/templates/es/2019/base.html index 68e536de427..27920352917 100644 --- a/src/templates/es/2019/base.html +++ b/src/templates/es/2019/base.html @@ -157,7 +157,7 @@ "http2": "HTTP/2", "privacy": "Intimidad", "capabilities": "Capacidades", - "jamstack": "JAMstack" + "jamstack": "Jamstack" } %} diff --git a/src/templates/fr/2019/base.html b/src/templates/fr/2019/base.html index 175b90f6348..f25df0750ec 100644 --- a/src/templates/fr/2019/base.html +++ b/src/templates/fr/2019/base.html @@ -157,7 +157,7 @@ "http2": "HTTP/2", "privacy": "Vie Privée", "capabilities": "Capacités", - "jamstack": "JAMstack" + "jamstack": "Jamstack" } %} diff --git a/src/templates/ja/2019/base.html b/src/templates/ja/2019/base.html index c2cbd3cd74b..ebd1f5557c0 100644 --- a/src/templates/ja/2019/base.html +++ b/src/templates/ja/2019/base.html @@ -157,7 +157,7 @@ "http2": "HTTP/2", "privacy": "プライバシー", "capabilities": "能力", - "jamstack": "JAMstack" + "jamstack": "Jamstack" } %} diff --git a/src/templates/pt/2019/base.html b/src/templates/pt/2019/base.html index b39dc344254..7ab62ade2ae 100644 --- a/src/templates/pt/2019/base.html +++ b/src/templates/pt/2019/base.html @@ -157,7 +157,7 @@ "http2": "HTTP/2", "privacy": "Privacidade", "capabilities": "Capacidades", - "jamstack": "JAMstack" + "jamstack": "Jamstack" } %} diff --git a/src/templates/zh-CN/2019/base.html b/src/templates/zh-CN/2019/base.html index 0761392f09e..f93fd1f72a4 100644 --- a/src/templates/zh-CN/2019/base.html +++ b/src/templates/zh-CN/2019/base.html @@ -157,7 +157,7 @@ "http2": "HTTP/2", "privacy": "隐私", "capabilities": "能力", - "jamstack": "JAMstack" + "jamstack": "Jamstack" } %} From 441904343c928317df11add1e6a6192bf141a0d9 Mon Sep 17 00:00:00 2001 From: Barry Date: Thu, 20 Aug 2020 10:25:02 +0100 Subject: [PATCH 4/5] Remove regions --- src/server/language.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/server/language.py b/src/server/language.py index cd385646ae5..3f6fdc3320d 100644 --- a/src/server/language.py +++ b/src/server/language.py @@ -1,9 +1,8 @@ # coding=utf-8 class _Language(object): - def __init__(self, local_name, lang_code, region_code): + def __init__(self, local_name, lang_code): self._local_name = local_name self._lang_code = lang_code - self._region_code = region_code def __eq__(self, other): if isinstance(other, _Language): @@ -26,15 +25,15 @@ def lang_code(self): return self._lang_code -# Mostly we are region agnostic languages, but can add region where +# Mostly we use region-agnostic languages, but can add region where # there are significant differences (e.g. Chinese) class Language(object): - EN = _Language('English', 'en', 'US') - ES = _Language('Español', 'es', 'ES') - FR = _Language('Français', 'fr', 'FR') - JA = _Language('日本語', 'ja', 'JP') - PT = _Language('Portuguese', 'pt', 'PT') - ZH_CN = _Language('简体中文', 'zh-CN', 'CN') + EN = _Language('English', 'en') + ES = _Language('Español', 'es') + FR = _Language('Français', 'fr') + JA = _Language('日本語', 'ja') + PT = _Language('Portuguese', 'pt') + ZH_CN = _Language('简体中文', 'zh-CN') DEFAULT_LANGUAGE = Language.EN From 3b5d6f6409f5cac789609e957ee7c7e206a9f2a5 Mon Sep 17 00:00:00 2001 From: Barry Date: Sat, 22 Aug 2020 07:16:14 +0100 Subject: [PATCH 5/5] Add Simplified Chinese to README --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index be2397ae9f0..a53333df306 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,10 @@ Our mission is to combine the raw stats and trends of the HTTP Archive with the The 2019 Web Almanac is available in: - [English](https://almanac.httparchive.org/en/2019/) -- [Spanish](https://almanac.httparchive.org/es/2019/) - [French](https://almanac.httparchive.org/fr/2019/) - [Japanese](https://almanac.httparchive.org/ja/2019/) +- [Simplified Chinese](https://almanac.httparchive.org/zh-CN/2019/) +- [Spanish](https://almanac.httparchive.org/es/2019/) ## Contributing