Skip to content

Commit ba98a67

Browse files
tunethewebborisschapira
authored andcommitted
Config updates for new chapters and other misc cleanups (#1232)
* Config updates for new chapters and other misc cleanups * Update src/templates/fr/2019/base.html Co-authored-by: Boris Schapira <[email protected]> * Change JAMstack to Jamstack * Remove regions * Add Simplified Chinese to README Co-authored-by: Boris Schapira <[email protected]>
1 parent 7ece671 commit ba98a67

File tree

9 files changed

+61
-26
lines changed

9 files changed

+61
-26
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ Our mission is to combine the raw stats and trends of the HTTP Archive with the
1212

1313
The 2019 Web Almanac is available in:
1414
- [English](https://almanac.httparchive.org/en/2019/)
15-
- [Spanish](https://almanac.httparchive.org/es/2019/)
1615
- [French](https://almanac.httparchive.org/fr/2019/)
1716
- [Japanese](https://almanac.httparchive.org/ja/2019/)
17+
- [Simplified Chinese](https://almanac.httparchive.org/zh-CN/2019/)
18+
- [Spanish](https://almanac.httparchive.org/es/2019/)
1819

1920
## Contributing
2021

src/config/2020.json

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,12 @@
9292
{
9393
"part": "II",
9494
"chapter": "13",
95+
"title": "Capabilities",
96+
"slug": "capabilities"
97+
},
98+
{
99+
"part": "II",
100+
"chapter": "14",
95101
"title": "PWA",
96102
"slug": "pwa"
97103
}
@@ -103,20 +109,20 @@
103109
"chapters": [
104110
{
105111
"part": "III",
106-
"chapter": "14",
112+
"chapter": "15",
107113
"title": "CMS",
108114
"slug": "cms"
109115
},
110116
{
111117
"part": "III",
112-
"chapter": "15",
118+
"chapter": "16",
113119
"title": "Ecommerce",
114120
"slug": "ecommerce"
115121
},
116122
{
117123
"part": "III",
118-
"chapter": "16",
119-
"title": "JAMstack",
124+
"chapter": "17",
125+
"title": "Jamstack",
120126
"slug": "jamstack"
121127
}
122128
]
@@ -127,31 +133,31 @@
127133
"chapters": [
128134
{
129135
"part": "IV",
130-
"chapter": "17",
136+
"chapter": "18",
131137
"title": "Page Weight",
132138
"slug": "page-weight"
133139
},
134140
{
135141
"part": "IV",
136-
"chapter": "18",
142+
"chapter": "19",
137143
"title": "Compression",
138144
"slug": "compression"
139145
},
140146
{
141147
"part": "IV",
142-
"chapter": "19",
148+
"chapter": "20",
143149
"title": "Caching",
144150
"slug": "caching"
145151
},
146152
{
147153
"part": "IV",
148-
"chapter": "20",
154+
"chapter": "21",
149155
"title": "Resource Hints",
150156
"slug": "resource-hints"
151157
},
152158
{
153159
"part": "IV",
154-
"chapter": "21",
160+
"chapter": "22",
155161
"title": "HTTP/2",
156162
"slug": "http2"
157163
}
@@ -165,6 +171,9 @@
165171
"authors": {
166172
"name": "Authors"
167173
},
174+
"designers": {
175+
"name": "Designers"
176+
},
168177
"developers": {
169178
"name": "Developers"
170179
},
@@ -888,6 +897,12 @@
888897
"github": "ipullrank",
889898
"twitter": "IPullRank"
890899
},
900+
"michelleoconnor": {
901+
"name": "Michelle O'Connor",
902+
"teams": [
903+
"designers"
904+
]
905+
},
891906
"MikeBishop": {
892907
"name": "Mike Bishop",
893908
"teams": [

src/server/language.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# coding=utf-8
22
class _Language(object):
3-
def __init__(self, local_name, lang_code, region_code):
3+
def __init__(self, local_name, lang_code):
44
self._local_name = local_name
55
self._lang_code = lang_code
6-
self._region_code = region_code
76

87
def __eq__(self, other):
98
if isinstance(other, _Language):
@@ -26,13 +25,15 @@ def lang_code(self):
2625
return self._lang_code
2726

2827

29-
# Currently we are only supporting languages and not regions
28+
# Mostly we use region-agnostic languages, but can add region where
29+
# there are significant differences (e.g. Chinese)
3030
class Language(object):
31-
JA = _Language('日本語', 'ja', 'JP')
32-
EN = _Language('English', 'en', 'US')
33-
ES = _Language('Español', 'es', 'ES')
34-
FR = _Language('Français', 'fr', 'FR')
35-
ZH_CN = _Language('简体中文', 'zh-CN', 'CN')
31+
EN = _Language('English', 'en')
32+
ES = _Language('Español', 'es')
33+
FR = _Language('Français', 'fr')
34+
JA = _Language('日本語', 'ja')
35+
PT = _Language('Portuguese', 'pt')
36+
ZH_CN = _Language('简体中文', 'zh-CN')
3637

3738

3839
DEFAULT_LANGUAGE = Language.EN

src/templates/en/2019/base.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,10 @@
154154
"cdn": "CDN",
155155
"page-weight": "Page Weight",
156156
"resource-hints": "Resource Hints",
157-
"http2": "HTTP/2"
157+
"http2": "HTTP/2",
158+
"privacy": "Privacy",
159+
"capabilities": "Capabilities",
160+
"jamstack": "Jamstack"
158161
}
159162
%}
160163

@@ -165,7 +168,7 @@
165168
"designers": "Designers",
166169
"developers": "Developers",
167170
"editors": "Editors",
168-
"leads": "Leads",
171+
"leads": "Project Leads",
169172
"reviewers": "Reviewers",
170173
"translators": "Translators",
171174
}

src/templates/es/2019/base.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,10 @@
154154
"cdn": "CDN",
155155
"page-weight": "Peso de las Páginas",
156156
"resource-hints": "Sugerencias de Recursos",
157-
"http2": "HTTP/2"
157+
"http2": "HTTP/2",
158+
"privacy": "Intimidad",
159+
"capabilities": "Capacidades",
160+
"jamstack": "Jamstack"
158161
}
159162
%}
160163

src/templates/fr/2019/base.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,10 @@
154154
"cdn": "CDN",
155155
"page-weight": "Poids des pages",
156156
"resource-hints": "Indices de Ressources",
157-
"http2": "HTTP/2"
157+
"http2": "HTTP/2",
158+
"privacy": "Vie Privée",
159+
"capabilities": "Capacités",
160+
"jamstack": "Jamstack"
158161
}
159162
%}
160163

src/templates/ja/2019/base.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,10 @@
154154
"cdn": "CDN",
155155
"page-weight": "Page Weight",
156156
"resource-hints": "リソースのヒント",
157-
"http2": "HTTP/2"
157+
"http2": "HTTP/2",
158+
"privacy": "プライバシー",
159+
"capabilities": "能力",
160+
"jamstack": "Jamstack"
158161
}
159162
%}
160163

src/templates/pt/2019/base.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
{% block close_the_index %}Fechar índice de conteúdos{% endblock %}
4949

5050
{% block and %}e{% endblock %}
51+
{% block comma %}, {% endblock %}
5152

5253
{% block open %}Abrir{% endblock %}
5354
{% block close %}Fechar{% endblock %}
@@ -74,7 +75,6 @@
7475

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

8080
{% block featured_chapter %}Capítulo em Destaque{% endblock %}
@@ -154,7 +154,10 @@
154154
"cdn": "CDN",
155155
"page-weight": "Peso da página",
156156
"resource-hints": "Dicas de Recursos",
157-
"http2": "HTTP/2"
157+
"http2": "HTTP/2",
158+
"privacy": "Privacidade",
159+
"capabilities": "Capacidades",
160+
"jamstack": "Jamstack"
158161
}
159162
%}
160163

src/templates/zh-CN/2019/base.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,10 @@
154154
"cdn": "CDN",
155155
"page-weight": "页面重量",
156156
"resource-hints": "资源提示",
157-
"http2": "HTTP/2"
157+
"http2": "HTTP/2",
158+
"privacy": "隐私",
159+
"capabilities": "能力",
160+
"jamstack": "Jamstack"
158161
}
159162
%}
160163

0 commit comments

Comments
 (0)