Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config updates for new chapters and other misc cleanups #1232

Merged
merged 5 commits into from
Aug 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
33 changes: 24 additions & 9 deletions src/config/2020.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@
{
"part": "II",
"chapter": "13",
"title": "Capabilities",
"slug": "capabilities"
},
{
"part": "II",
"chapter": "14",
"title": "PWA",
"slug": "pwa"
}
Expand All @@ -103,20 +109,20 @@
"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",
"title": "JAMstack",
"chapter": "17",
"title": "Jamstack",
"slug": "jamstack"
}
]
Expand All @@ -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"
}
Expand All @@ -165,6 +171,9 @@
"authors": {
"name": "Authors"
},
"designers": {
"name": "Designers"
},
"developers": {
"name": "Developers"
},
Expand Down Expand Up @@ -888,6 +897,12 @@
"github": "ipullrank",
"twitter": "IPullRank"
},
"michelleoconnor": {
"name": "Michelle O'Connor",
"teams": [
"designers"
]
},
"MikeBishop": {
"name": "Mike Bishop",
"teams": [
Expand Down
17 changes: 9 additions & 8 deletions src/server/language.py
Original file line number Diff line number Diff line change
@@ -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):
Expand All @@ -26,13 +25,15 @@ def lang_code(self):
return self._lang_code


# Currently we are only supporting languages and not regions
# Mostly we use 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')
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
Expand Down
7 changes: 5 additions & 2 deletions src/templates/en/2019/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
%}

Expand All @@ -165,7 +168,7 @@
"designers": "Designers",
"developers": "Developers",
"editors": "Editors",
"leads": "Leads",
"leads": "Project Leads",
"reviewers": "Reviewers",
"translators": "Translators",
}
Expand Down
5 changes: 4 additions & 1 deletion src/templates/es/2019/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
%}

Expand Down
5 changes: 4 additions & 1 deletion src/templates/fr/2019/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@
"cdn": "CDN",
"page-weight": "Poids des pages",
"resource-hints": "Indices de Ressources",
"http2": "HTTP/2"
"http2": "HTTP/2",
"privacy": "Vie Privée",
"capabilities": "Capacités",
"jamstack": "Jamstack"
}
%}

Expand Down
5 changes: 4 additions & 1 deletion src/templates/ja/2019/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@
"cdn": "CDN",
"page-weight": "Page Weight",
"resource-hints": "リソースのヒント",
"http2": "HTTP/2"
"http2": "HTTP/2",
"privacy": "プライバシー",
"capabilities": "能力",
"jamstack": "Jamstack"
}
%}

Expand Down
7 changes: 5 additions & 2 deletions src/templates/pt/2019/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand All @@ -74,7 +75,6 @@

{% block footer_title %}Navegação no rodapé{% endblock %}
{% block copyright %}© Web Almanac. Licenciado sob <a href="https://github.com/HTTPArchive/almanac.httparchive.org/blob/main/LICENSE">Apache 2.0</a>.{% endblock %}

{% block accessibility_statement %}Declaração de acessibilidade{% endblock %}

{% block featured_chapter %}Capítulo em Destaque{% endblock %}
Expand Down Expand Up @@ -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"
}
%}

Expand Down
5 changes: 4 additions & 1 deletion src/templates/zh-CN/2019/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@
"cdn": "CDN",
"page-weight": "页面重量",
"resource-hints": "资源提示",
"http2": "HTTP/2"
"http2": "HTTP/2",
"privacy": "隐私",
"capabilities": "能力",
"jamstack": "Jamstack"
}
%}

Expand Down