Skip to content

Commit d2f0de2

Browse files
committed
Add language switcher and translations
1 parent 6bb1dff commit d2f0de2

File tree

7 files changed

+381
-73
lines changed

7 files changed

+381
-73
lines changed

Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ clean: ## remove the build artifacts, mainly the "public" directory
2121

2222
prepare: clean
2323
git submodule update --init
24+
python gen_config.py
2425

26+
# All translations share the <team>.toml files in the en translation
2527
TEAMS_DIR = content/en/teams
2628
TEAMS = emeritus-maintainers maintainers triage-team web-team
2729
TEAMS_QUERY = python themes/scientific-python-hugo-theme/tools/team_query.py

config.yaml

+132-66
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,174 @@
1-
baseURL: https://scipy.scientific-python.org/
1+
baseURL: https://scipy.org/
22
languageCode: en-us
33
theme: scientific-python-hugo-theme
4-
disableKinds: ["taxonomy", "term"]
4+
disableKinds:
5+
- taxonomy
6+
- term
57
DefaultContentLanguage: en
68
markup:
79
goldmark:
810
renderer:
911
unsafe: true
10-
11-
# Uncomment this to disable the translations for the specified languages.
12-
# This may be useful to be able to merge partial translations without deploying
13-
# them to scipy.org immediately.
14-
# disableLanguages: ["pt", "ja"]
15-
12+
disableLanguages: []
1613
params:
1714
images:
18-
- /images/logo.svg
15+
- /images/logo.svg
1916
navColor: blue
2017
font:
21-
name: "Lato"
22-
sizes: [400, 900]
18+
name: Lato
19+
sizes:
20+
- 400
21+
- 900
2322
plausible:
2423
dataDomain: scipy.org
25-
2624
languages:
2725
en:
2826
title: SciPy
2927
weight: 1
3028
contentDir: content/en
31-
3229
languageName: English
3330
params:
34-
description: Why SciPy? Fundamental algorithms. Broadly applicable. Foundational. Interoperable. Performant. Open source.
31+
description: Why SciPy? Fundamental algorithms. Broadly applicable. Foundational.
32+
Interoperable. Performant. Open source.
3533
navbarlogo:
3634
image: logo.svg
3735
altText: A blue circle with a snake in the shape of the letter 'S'.
3836
text: SciPy
3937
link: /
4038
hero:
41-
# Main hero title
4239
title: SciPy
43-
# Hero subtitle (optional)
4440
subtitle: Fundamental algorithms for scientific computing in Python
45-
# Button text
4641
buttontext: Get started
47-
# Where the main hero button links to
48-
buttonlink: "/install"
49-
# Hero image (from static/images/___)
42+
buttonlink: /install
5043
image: logo.svg
51-
5244
section5: false
53-
5445
navbar:
55-
- title: Install
56-
url: /install
57-
- title: Documentation
58-
url: https://docs.scipy.org/doc/scipy/
59-
- title: Community
60-
url: /community
61-
- title: About Us
62-
url: /about
63-
- title: Contribute
64-
url: /contribute
46+
- title: Install
47+
url: /install
48+
- title: Documentation
49+
url: https://docs.scipy.org/doc/scipy/
50+
- title: Community
51+
url: /community
52+
- title: About Us
53+
url: /about
54+
- title: Contribute
55+
url: /contribute
6556
footer:
6657
logo: logo.svg
67-
socialmediatitle: ""
58+
socialmediatitle: ''
6859
socialmedia:
69-
- link: https://github.com/scipy/scipy
70-
icon: github
71-
- link: https://discuss.scientific-python.org/c/contributor/scipy/
72-
icon: scientific-python
60+
- link: https://github.com/scipy/scipy
61+
icon: github
62+
- link: https://discuss.scientific-python.org/c/contributor/scipy/
63+
icon: scientific-python
7364
quicklinks:
7465
column1:
75-
title: ""
66+
title: ''
7667
links:
77-
- text: Install
78-
link: /install
79-
- text: Documentation
80-
link: https://docs.scipy.org/doc/scipy/
81-
- text: Citing SciPy
82-
link: /citing-scipy
83-
- text: Roadmap
84-
link: https://scipy.github.io/devdocs/dev/roadmap.html
68+
- text: Install
69+
link: /install
70+
- text: Documentation
71+
link: https://docs.scipy.org/doc/scipy/
72+
- text: Citing SciPy
73+
link: /citing-scipy
74+
- text: Roadmap
75+
link: https://scipy.github.io/devdocs/dev/roadmap.html
8576
column2:
8677
links:
87-
- text: About Us
88-
link: /about
89-
- text: Community
90-
link: /community
91-
- text: SciPy Conference
92-
link: https://conference.scipy.org/
93-
- text: Contribute
94-
link: /contribute
95-
- text: Code of Conduct
96-
link: https://docs.scipy.org/doc/scipy/dev/conduct/code_of_conduct.html
78+
- text: About Us
79+
link: /about
80+
- text: Community
81+
link: /community
82+
- text: SciPy Conference
83+
link: https://conference.scipy.org/
84+
- text: Contribute
85+
link: /contribute
86+
- text: Code of Conduct
87+
link: https://docs.scipy.org/doc/scipy/dev/conduct/code_of_conduct.html
9788
column3:
9889
links:
99-
- text: FAQ
100-
link: /faq
101-
- text: Terms of Use
102-
link: /terms
103-
- text: Privacy
104-
link: /privacy
105-
- text: Press Kit
106-
link: /press-kit
107-
- text: Social Media
108-
link: /about/#social-media
90+
- text: FAQ
91+
link: /faq
92+
- text: Terms of Use
93+
link: /terms
94+
- text: Privacy
95+
link: /privacy
96+
- text: Press Kit
97+
link: /press-kit
98+
- text: Social Media
99+
link: /about/#social-media
100+
pt:
101+
title: SciPy
102+
weight: 2
103+
contentDir: content/pt
104+
languageName: "Portugu\xEAs"
105+
params:
106+
description: Por que SciPy? Algoritmos fundamentais. Broadly applicable. Foundational.
107+
Interoperable. Performant. Open source.
108+
navbarlogo:
109+
image: logo.svg
110+
altText: A blue circle with a snake in the shape of the letter 'S'.
111+
text: SciPy
112+
link: /pt/
113+
hero:
114+
title: SciPy
115+
subtitle: Fundamental algorithms for scientific computing in Python
116+
buttontext: Get started
117+
buttonlink: /pt/install
118+
image: logo.svg
119+
section5: false
120+
navbar:
121+
- title: Install
122+
url: /pt/install
123+
- title: Documentation
124+
url: https://docs.scipy.org/doc/scipy/
125+
- title: Community
126+
url: /pt/community
127+
- title: About Us
128+
url: /pt/about
129+
- title: Contribute
130+
url: /pt/contribute
131+
footer:
132+
logo: logo.svg
133+
socialmediatitle: ''
134+
socialmedia:
135+
- link: https://github.com/scipy/scipy
136+
icon: github
137+
- link: https://discuss.scientific-python.org/c/contributor/scipy/
138+
icon: scientific-python
139+
quicklinks:
140+
column1:
141+
title: ''
142+
links:
143+
- text: Install
144+
link: /pt/install
145+
- text: Documentation
146+
link: https://docs.scipy.org/doc/scipy/
147+
- text: Citing SciPy
148+
link: /pt/citing-scipy
149+
- text: Roadmap
150+
link: https://scipy.github.io/devdocs/dev/roadmap.html
151+
column2:
152+
links:
153+
- text: About Us
154+
link: /pt/about
155+
- text: Community
156+
link: /pt/community
157+
- text: SciPy Conference
158+
link: https://conference.scipy.org/
159+
- text: Contribute
160+
link: /pt/contribute
161+
- text: Code of Conduct
162+
link: https://docs.scipy.org/doc/scipy/dev/conduct/code_of_conduct.html
163+
column3:
164+
links:
165+
- text: FAQ
166+
link: /pt/faq
167+
- text: Terms of Use
168+
link: /pt/terms
169+
- text: Privacy
170+
link: /pt/privacy
171+
- text: Press Kit
172+
link: /pt/press-kit
173+
- text: Social Media
174+
link: /pt/about/#social-media

config.yaml.in

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
baseURL: https://scipy.org/
2+
languageCode: en-us
3+
theme: scientific-python-hugo-theme
4+
disableKinds: ["taxonomy", "term"]
5+
DefaultContentLanguage: en
6+
markup:
7+
goldmark:
8+
renderer:
9+
unsafe: true
10+
11+
# Uncomment this to disable the translations for the specified languages.
12+
# This may be useful to be able to merge partial translations without deploying
13+
# them to scipy.org immediately.
14+
disableLanguages: []
15+
16+
params:
17+
images:
18+
- /images/logo.svg
19+
navColor: blue
20+
font:
21+
name: "Lato"
22+
sizes: [400, 900]
23+
plausible:
24+
dataDomain: scipy.org
25+
26+
languages:
27+
en:
28+
title: SciPy
29+
weight: 1
30+
contentDir: content/en
31+
include-files:
32+
- content/en/config.yaml
33+
34+
pt:
35+
title: SciPy
36+
weight: 2
37+
contentDir: content/pt
38+
include-files:
39+
- content/pt/config.yaml

content/en/config.yaml

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
languageName: English
2+
params:
3+
description: Why SciPy? Fundamental algorithms. Broadly applicable. Foundational. Interoperable. Performant. Open source.
4+
navbarlogo:
5+
image: logo.svg
6+
altText: A blue circle with a snake in the shape of the letter 'S'.
7+
text: SciPy
8+
link: /
9+
hero:
10+
# Main hero title
11+
title: SciPy
12+
# Hero subtitle (optional)
13+
subtitle: Fundamental algorithms for scientific computing in Python
14+
# Button text
15+
buttontext: Get started
16+
# Where the main hero button links to
17+
buttonlink: "/install"
18+
# Hero image (from static/images/___)
19+
image: logo.svg
20+
21+
section5: false
22+
23+
navbar:
24+
- title: Install
25+
url: /install
26+
- title: Documentation
27+
url: https://docs.scipy.org/doc/scipy/
28+
- title: Community
29+
url: /community
30+
- title: About Us
31+
url: /about
32+
- title: Contribute
33+
url: /contribute
34+
footer:
35+
logo: logo.svg
36+
socialmediatitle: ""
37+
socialmedia:
38+
- link: https://github.com/scipy/scipy
39+
icon: github
40+
- link: https://discuss.scientific-python.org/c/contributor/scipy/
41+
icon: scientific-python
42+
quicklinks:
43+
column1:
44+
title: ""
45+
links:
46+
- text: Install
47+
link: /install
48+
- text: Documentation
49+
link: https://docs.scipy.org/doc/scipy/
50+
- text: Citing SciPy
51+
link: /citing-scipy
52+
- text: Roadmap
53+
link: https://scipy.github.io/devdocs/dev/roadmap.html
54+
column2:
55+
links:
56+
- text: About Us
57+
link: /about
58+
- text: Community
59+
link: /community
60+
- text: SciPy Conference
61+
link: https://conference.scipy.org/
62+
- text: Contribute
63+
link: /contribute
64+
- text: Code of Conduct
65+
link: https://docs.scipy.org/doc/scipy/dev/conduct/code_of_conduct.html
66+
column3:
67+
links:
68+
- text: FAQ
69+
link: /faq
70+
- text: Terms of Use
71+
link: /terms
72+
- text: Privacy
73+
link: /privacy
74+
- text: Press Kit
75+
link: /press-kit
76+
- text: Social Media
77+
link: /about/#social-media

0 commit comments

Comments
 (0)