From d2f0de290ead9260ac59f8b9d0d68af6554ac722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Melissa=20Weber=20Mendon=C3=A7a?= Date: Sun, 9 Feb 2025 18:48:32 -0300 Subject: [PATCH 1/9] Add language switcher and translations --- Makefile | 2 + config.yaml | 198 +++++++++++++++++++++++++++-------------- config.yaml.in | 39 ++++++++ content/en/config.yaml | 77 ++++++++++++++++ content/pt/config.yaml | 77 ++++++++++++++++ content/pt/install.md | 16 ++-- gen_config.py | 45 ++++++++++ 7 files changed, 381 insertions(+), 73 deletions(-) create mode 100644 config.yaml.in create mode 100644 content/en/config.yaml create mode 100644 content/pt/config.yaml create mode 100644 gen_config.py diff --git a/Makefile b/Makefile index 2d6865ca..edca8954 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,9 @@ clean: ## remove the build artifacts, mainly the "public" directory prepare: clean git submodule update --init + python gen_config.py +# All translations share the .toml files in the en translation TEAMS_DIR = content/en/teams TEAMS = emeritus-maintainers maintainers triage-team web-team TEAMS_QUERY = python themes/scientific-python-hugo-theme/tools/team_query.py diff --git a/config.yaml b/config.yaml index 705e6ed1..dad65065 100644 --- a/config.yaml +++ b/config.yaml @@ -1,108 +1,174 @@ -baseURL: https://scipy.scientific-python.org/ +baseURL: https://scipy.org/ languageCode: en-us theme: scientific-python-hugo-theme -disableKinds: ["taxonomy", "term"] +disableKinds: +- taxonomy +- term DefaultContentLanguage: en markup: goldmark: renderer: unsafe: true - -# Uncomment this to disable the translations for the specified languages. -# This may be useful to be able to merge partial translations without deploying -# them to scipy.org immediately. -# disableLanguages: ["pt", "ja"] - +disableLanguages: [] params: images: - - /images/logo.svg + - /images/logo.svg navColor: blue font: - name: "Lato" - sizes: [400, 900] + name: Lato + sizes: + - 400 + - 900 plausible: dataDomain: scipy.org - languages: en: title: SciPy weight: 1 contentDir: content/en - languageName: English params: - description: Why SciPy? Fundamental algorithms. Broadly applicable. Foundational. Interoperable. Performant. Open source. + description: Why SciPy? Fundamental algorithms. Broadly applicable. Foundational. + Interoperable. Performant. Open source. navbarlogo: image: logo.svg altText: A blue circle with a snake in the shape of the letter 'S'. text: SciPy link: / hero: - # Main hero title title: SciPy - # Hero subtitle (optional) subtitle: Fundamental algorithms for scientific computing in Python - # Button text buttontext: Get started - # Where the main hero button links to - buttonlink: "/install" - # Hero image (from static/images/___) + buttonlink: /install image: logo.svg - section5: false - navbar: - - title: Install - url: /install - - title: Documentation - url: https://docs.scipy.org/doc/scipy/ - - title: Community - url: /community - - title: About Us - url: /about - - title: Contribute - url: /contribute + - title: Install + url: /install + - title: Documentation + url: https://docs.scipy.org/doc/scipy/ + - title: Community + url: /community + - title: About Us + url: /about + - title: Contribute + url: /contribute footer: logo: logo.svg - socialmediatitle: "" + socialmediatitle: '' socialmedia: - - link: https://github.com/scipy/scipy - icon: github - - link: https://discuss.scientific-python.org/c/contributor/scipy/ - icon: scientific-python + - link: https://github.com/scipy/scipy + icon: github + - link: https://discuss.scientific-python.org/c/contributor/scipy/ + icon: scientific-python quicklinks: column1: - title: "" + title: '' links: - - text: Install - link: /install - - text: Documentation - link: https://docs.scipy.org/doc/scipy/ - - text: Citing SciPy - link: /citing-scipy - - text: Roadmap - link: https://scipy.github.io/devdocs/dev/roadmap.html + - text: Install + link: /install + - text: Documentation + link: https://docs.scipy.org/doc/scipy/ + - text: Citing SciPy + link: /citing-scipy + - text: Roadmap + link: https://scipy.github.io/devdocs/dev/roadmap.html column2: links: - - text: About Us - link: /about - - text: Community - link: /community - - text: SciPy Conference - link: https://conference.scipy.org/ - - text: Contribute - link: /contribute - - text: Code of Conduct - link: https://docs.scipy.org/doc/scipy/dev/conduct/code_of_conduct.html + - text: About Us + link: /about + - text: Community + link: /community + - text: SciPy Conference + link: https://conference.scipy.org/ + - text: Contribute + link: /contribute + - text: Code of Conduct + link: https://docs.scipy.org/doc/scipy/dev/conduct/code_of_conduct.html column3: links: - - text: FAQ - link: /faq - - text: Terms of Use - link: /terms - - text: Privacy - link: /privacy - - text: Press Kit - link: /press-kit - - text: Social Media - link: /about/#social-media + - text: FAQ + link: /faq + - text: Terms of Use + link: /terms + - text: Privacy + link: /privacy + - text: Press Kit + link: /press-kit + - text: Social Media + link: /about/#social-media + pt: + title: SciPy + weight: 2 + contentDir: content/pt + languageName: "Portugu\xEAs" + params: + description: Por que SciPy? Algoritmos fundamentais. Broadly applicable. Foundational. + Interoperable. Performant. Open source. + navbarlogo: + image: logo.svg + altText: A blue circle with a snake in the shape of the letter 'S'. + text: SciPy + link: /pt/ + hero: + title: SciPy + subtitle: Fundamental algorithms for scientific computing in Python + buttontext: Get started + buttonlink: /pt/install + image: logo.svg + section5: false + navbar: + - title: Install + url: /pt/install + - title: Documentation + url: https://docs.scipy.org/doc/scipy/ + - title: Community + url: /pt/community + - title: About Us + url: /pt/about + - title: Contribute + url: /pt/contribute + footer: + logo: logo.svg + socialmediatitle: '' + socialmedia: + - link: https://github.com/scipy/scipy + icon: github + - link: https://discuss.scientific-python.org/c/contributor/scipy/ + icon: scientific-python + quicklinks: + column1: + title: '' + links: + - text: Install + link: /pt/install + - text: Documentation + link: https://docs.scipy.org/doc/scipy/ + - text: Citing SciPy + link: /pt/citing-scipy + - text: Roadmap + link: https://scipy.github.io/devdocs/dev/roadmap.html + column2: + links: + - text: About Us + link: /pt/about + - text: Community + link: /pt/community + - text: SciPy Conference + link: https://conference.scipy.org/ + - text: Contribute + link: /pt/contribute + - text: Code of Conduct + link: https://docs.scipy.org/doc/scipy/dev/conduct/code_of_conduct.html + column3: + links: + - text: FAQ + link: /pt/faq + - text: Terms of Use + link: /pt/terms + - text: Privacy + link: /pt/privacy + - text: Press Kit + link: /pt/press-kit + - text: Social Media + link: /pt/about/#social-media diff --git a/config.yaml.in b/config.yaml.in new file mode 100644 index 00000000..d7794cef --- /dev/null +++ b/config.yaml.in @@ -0,0 +1,39 @@ +baseURL: https://scipy.org/ +languageCode: en-us +theme: scientific-python-hugo-theme +disableKinds: ["taxonomy", "term"] +DefaultContentLanguage: en +markup: + goldmark: + renderer: + unsafe: true + +# Uncomment this to disable the translations for the specified languages. +# This may be useful to be able to merge partial translations without deploying +# them to scipy.org immediately. +disableLanguages: [] + +params: + images: + - /images/logo.svg + navColor: blue + font: + name: "Lato" + sizes: [400, 900] + plausible: + dataDomain: scipy.org + +languages: + en: + title: SciPy + weight: 1 + contentDir: content/en + include-files: + - content/en/config.yaml + + pt: + title: SciPy + weight: 2 + contentDir: content/pt + include-files: + - content/pt/config.yaml diff --git a/content/en/config.yaml b/content/en/config.yaml new file mode 100644 index 00000000..679eddac --- /dev/null +++ b/content/en/config.yaml @@ -0,0 +1,77 @@ +languageName: English +params: + description: Why SciPy? Fundamental algorithms. Broadly applicable. Foundational. Interoperable. Performant. Open source. + navbarlogo: + image: logo.svg + altText: A blue circle with a snake in the shape of the letter 'S'. + text: SciPy + link: / + hero: + # Main hero title + title: SciPy + # Hero subtitle (optional) + subtitle: Fundamental algorithms for scientific computing in Python + # Button text + buttontext: Get started + # Where the main hero button links to + buttonlink: "/install" + # Hero image (from static/images/___) + image: logo.svg + + section5: false + + navbar: + - title: Install + url: /install + - title: Documentation + url: https://docs.scipy.org/doc/scipy/ + - title: Community + url: /community + - title: About Us + url: /about + - title: Contribute + url: /contribute + footer: + logo: logo.svg + socialmediatitle: "" + socialmedia: + - link: https://github.com/scipy/scipy + icon: github + - link: https://discuss.scientific-python.org/c/contributor/scipy/ + icon: scientific-python + quicklinks: + column1: + title: "" + links: + - text: Install + link: /install + - text: Documentation + link: https://docs.scipy.org/doc/scipy/ + - text: Citing SciPy + link: /citing-scipy + - text: Roadmap + link: https://scipy.github.io/devdocs/dev/roadmap.html + column2: + links: + - text: About Us + link: /about + - text: Community + link: /community + - text: SciPy Conference + link: https://conference.scipy.org/ + - text: Contribute + link: /contribute + - text: Code of Conduct + link: https://docs.scipy.org/doc/scipy/dev/conduct/code_of_conduct.html + column3: + links: + - text: FAQ + link: /faq + - text: Terms of Use + link: /terms + - text: Privacy + link: /privacy + - text: Press Kit + link: /press-kit + - text: Social Media + link: /about/#social-media diff --git a/content/pt/config.yaml b/content/pt/config.yaml new file mode 100644 index 00000000..b2792c16 --- /dev/null +++ b/content/pt/config.yaml @@ -0,0 +1,77 @@ +languageName: Português +params: + description: Por que SciPy? Algoritmos fundamentais. Broadly applicable. Foundational. Interoperable. Performant. Open source. + navbarlogo: + image: logo.svg + altText: A blue circle with a snake in the shape of the letter 'S'. + text: SciPy + link: /pt/ + hero: + # Main hero title + title: SciPy + # Hero subtitle (optional) + subtitle: Fundamental algorithms for scientific computing in Python + # Button text + buttontext: Get started + # Where the main hero button links to + buttonlink: "/pt/install" + # Hero image (from static/images/___) + image: logo.svg + + section5: false + + navbar: + - title: Install + url: /pt/install + - title: Documentation + url: https://docs.scipy.org/doc/scipy/ + - title: Community + url: /pt/community + - title: About Us + url: /pt/about + - title: Contribute + url: /pt/contribute + footer: + logo: logo.svg + socialmediatitle: "" + socialmedia: + - link: https://github.com/scipy/scipy + icon: github + - link: https://discuss.scientific-python.org/c/contributor/scipy/ + icon: scientific-python + quicklinks: + column1: + title: "" + links: + - text: Install + link: /pt/install + - text: Documentation + link: https://docs.scipy.org/doc/scipy/ + - text: Citing SciPy + link: /pt/citing-scipy + - text: Roadmap + link: https://scipy.github.io/devdocs/dev/roadmap.html + column2: + links: + - text: About Us + link: /pt/about + - text: Community + link: /pt/community + - text: SciPy Conference + link: https://conference.scipy.org/ + - text: Contribute + link: /pt/contribute + - text: Code of Conduct + link: https://docs.scipy.org/doc/scipy/dev/conduct/code_of_conduct.html + column3: + links: + - text: FAQ + link: /pt/faq + - text: Terms of Use + link: /pt/terms + - text: Privacy + link: /pt/privacy + - text: Press Kit + link: /pt/press-kit + - text: Social Media + link: /pt/about/#social-media diff --git a/content/pt/install.md b/content/pt/install.md index 54729bf5..28150dde 100644 --- a/content/pt/install.md +++ b/content/pt/install.md @@ -30,7 +30,8 @@ Ambientes de Desenvolvimento Interativo (IDEs) para fornecer dicas de tipo preci [[tab]] name = 'Baseado em Projetos' -content = ''' +content = ''' + ### Instalando com uv @@ -121,7 +122,7 @@ pixi init try-scipy cd try-scipy ``` -3. Criar um novo projeto em um novo subdiretório, executando o seguinte em um terminal: +3. Adicionar a SciPy ao seu projeto: ```bash pixi add scipy @@ -137,7 +138,8 @@ pixi run python [[tab]] name = 'Environment Based' -content = ''' +content = ''' + Em fluxos de trabalho baseados em projetos, um projeto é um diretório que contém um arquivo manifesto descrevendo o projeto, um arquivo lock-file descrevendo as dependências exatas do projeto, e os (potencialmente vários) ambientes do projeto. @@ -161,7 +163,6 @@ Veja [o tutorial no Python Packaging User Guide](https://packaging.python.org/en ```bash python -m pip install scipy ``` - [`pip`]: https://pip.pypa.io/en/stable/getting-started/ @@ -180,12 +181,12 @@ mamba install scipy [Miniforge]: https://conda-forge.org/download/ [`mamba`]: https://mamba.readthedocs.io/en/latest/ - ''' [[tab]] name = 'Package Manager' -content = ''' +content = ''' + ## Instalando com os stubs de tipagem @@ -222,7 +223,8 @@ brew install scipy [[tab]] name = 'Building from Source' -content = ''' +content = ''' + Cuidado: compilar a SciPy a partir do código fonte pode ser um exercício não trivial. Recomendamos o uso de binários, em vez disso, se eles estiverem disponíveis para a sua plataforma em um dos métodos acima. Para mais detalhes sobre como compilar a partir do código fonte, consulte [o guia de compilação a partir do código fonte na documentação da SciPy][building-docs]. diff --git a/gen_config.py b/gen_config.py new file mode 100644 index 00000000..166f01c4 --- /dev/null +++ b/gen_config.py @@ -0,0 +1,45 @@ +import os +import re +import yaml + + +config = yaml.load( + open("config.yaml.in", "r", encoding="utf-8"), Loader=yaml.SafeLoader +) + + +def merge_dicts(d1, d2): + for key, value in d2.items(): + if key in d1: + if isinstance(value, list): + d1[key].extend(value) + elif isinstance(value, dict): + merge_dicts(d1[key], value) + else: + d1[key] = value + + return d1 + + +def include_files(d): + external = {} + for key, val in d.items(): + if isinstance(val, dict): + d[key] = include_files(val) + elif key == "include-files": + for otherfile in val: + external_data = yaml.load( + open(otherfile, "r", encoding="utf-8"), Loader=yaml.SafeLoader + ) + external = merge_dicts(external, external_data) + + d.pop("include-files", None) + return {**d, **external} + + +config = include_files(config) +if os.environ.get("SCIPYORG_WITH_TRANSLATIONS"): + del config["disableLanguages"] + + +yaml.dump(config, open('config.yaml', 'w', encoding='utf-8'), sort_keys=False) From 0436833bf5b5ec9d8938856637503842c9336780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Melissa=20Weber=20Mendon=C3=A7a?= Date: Tue, 11 Mar 2025 16:15:15 -0300 Subject: [PATCH 2/9] Fix lint --- config.yaml | 192 +++++++++++++++++++++++++------------------------- gen_config.py | 8 +-- 2 files changed, 100 insertions(+), 100 deletions(-) diff --git a/config.yaml b/config.yaml index dad65065..5efa47a5 100644 --- a/config.yaml +++ b/config.yaml @@ -2,8 +2,8 @@ baseURL: https://scipy.org/ languageCode: en-us theme: scientific-python-hugo-theme disableKinds: -- taxonomy -- term + - taxonomy + - term DefaultContentLanguage: en markup: goldmark: @@ -12,13 +12,13 @@ markup: disableLanguages: [] params: images: - - /images/logo.svg + - /images/logo.svg navColor: blue font: name: Lato sizes: - - 400 - - 900 + - 400 + - 900 plausible: dataDomain: scipy.org languages: @@ -28,7 +28,8 @@ languages: contentDir: content/en languageName: English params: - description: Why SciPy? Fundamental algorithms. Broadly applicable. Foundational. + description: + Why SciPy? Fundamental algorithms. Broadly applicable. Foundational. Interoperable. Performant. Open source. navbarlogo: image: logo.svg @@ -43,67 +44,68 @@ languages: image: logo.svg section5: false navbar: - - title: Install - url: /install - - title: Documentation - url: https://docs.scipy.org/doc/scipy/ - - title: Community - url: /community - - title: About Us - url: /about - - title: Contribute - url: /contribute + - title: Install + url: /install + - title: Documentation + url: https://docs.scipy.org/doc/scipy/ + - title: Community + url: /community + - title: About Us + url: /about + - title: Contribute + url: /contribute footer: logo: logo.svg - socialmediatitle: '' + socialmediatitle: "" socialmedia: - - link: https://github.com/scipy/scipy - icon: github - - link: https://discuss.scientific-python.org/c/contributor/scipy/ - icon: scientific-python + - link: https://github.com/scipy/scipy + icon: github + - link: https://discuss.scientific-python.org/c/contributor/scipy/ + icon: scientific-python quicklinks: column1: - title: '' + title: "" links: - - text: Install - link: /install - - text: Documentation - link: https://docs.scipy.org/doc/scipy/ - - text: Citing SciPy - link: /citing-scipy - - text: Roadmap - link: https://scipy.github.io/devdocs/dev/roadmap.html + - text: Install + link: /install + - text: Documentation + link: https://docs.scipy.org/doc/scipy/ + - text: Citing SciPy + link: /citing-scipy + - text: Roadmap + link: https://scipy.github.io/devdocs/dev/roadmap.html column2: links: - - text: About Us - link: /about - - text: Community - link: /community - - text: SciPy Conference - link: https://conference.scipy.org/ - - text: Contribute - link: /contribute - - text: Code of Conduct - link: https://docs.scipy.org/doc/scipy/dev/conduct/code_of_conduct.html + - text: About Us + link: /about + - text: Community + link: /community + - text: SciPy Conference + link: https://conference.scipy.org/ + - text: Contribute + link: /contribute + - text: Code of Conduct + link: https://docs.scipy.org/doc/scipy/dev/conduct/code_of_conduct.html column3: links: - - text: FAQ - link: /faq - - text: Terms of Use - link: /terms - - text: Privacy - link: /privacy - - text: Press Kit - link: /press-kit - - text: Social Media - link: /about/#social-media + - text: FAQ + link: /faq + - text: Terms of Use + link: /terms + - text: Privacy + link: /privacy + - text: Press Kit + link: /press-kit + - text: Social Media + link: /about/#social-media pt: title: SciPy weight: 2 contentDir: content/pt languageName: "Portugu\xEAs" params: - description: Por que SciPy? Algoritmos fundamentais. Broadly applicable. Foundational. + description: + Por que SciPy? Algoritmos fundamentais. Broadly applicable. Foundational. Interoperable. Performant. Open source. navbarlogo: image: logo.svg @@ -118,57 +120,57 @@ languages: image: logo.svg section5: false navbar: - - title: Install - url: /pt/install - - title: Documentation - url: https://docs.scipy.org/doc/scipy/ - - title: Community - url: /pt/community - - title: About Us - url: /pt/about - - title: Contribute - url: /pt/contribute + - title: Install + url: /pt/install + - title: Documentation + url: https://docs.scipy.org/doc/scipy/ + - title: Community + url: /pt/community + - title: About Us + url: /pt/about + - title: Contribute + url: /pt/contribute footer: logo: logo.svg - socialmediatitle: '' + socialmediatitle: "" socialmedia: - - link: https://github.com/scipy/scipy - icon: github - - link: https://discuss.scientific-python.org/c/contributor/scipy/ - icon: scientific-python + - link: https://github.com/scipy/scipy + icon: github + - link: https://discuss.scientific-python.org/c/contributor/scipy/ + icon: scientific-python quicklinks: column1: - title: '' + title: "" links: - - text: Install - link: /pt/install - - text: Documentation - link: https://docs.scipy.org/doc/scipy/ - - text: Citing SciPy - link: /pt/citing-scipy - - text: Roadmap - link: https://scipy.github.io/devdocs/dev/roadmap.html + - text: Install + link: /pt/install + - text: Documentation + link: https://docs.scipy.org/doc/scipy/ + - text: Citing SciPy + link: /pt/citing-scipy + - text: Roadmap + link: https://scipy.github.io/devdocs/dev/roadmap.html column2: links: - - text: About Us - link: /pt/about - - text: Community - link: /pt/community - - text: SciPy Conference - link: https://conference.scipy.org/ - - text: Contribute - link: /pt/contribute - - text: Code of Conduct - link: https://docs.scipy.org/doc/scipy/dev/conduct/code_of_conduct.html + - text: About Us + link: /pt/about + - text: Community + link: /pt/community + - text: SciPy Conference + link: https://conference.scipy.org/ + - text: Contribute + link: /pt/contribute + - text: Code of Conduct + link: https://docs.scipy.org/doc/scipy/dev/conduct/code_of_conduct.html column3: links: - - text: FAQ - link: /pt/faq - - text: Terms of Use - link: /pt/terms - - text: Privacy - link: /pt/privacy - - text: Press Kit - link: /pt/press-kit - - text: Social Media - link: /pt/about/#social-media + - text: FAQ + link: /pt/faq + - text: Terms of Use + link: /pt/terms + - text: Privacy + link: /pt/privacy + - text: Press Kit + link: /pt/press-kit + - text: Social Media + link: /pt/about/#social-media diff --git a/gen_config.py b/gen_config.py index 166f01c4..31763333 100644 --- a/gen_config.py +++ b/gen_config.py @@ -3,9 +3,7 @@ import yaml -config = yaml.load( - open("config.yaml.in", "r", encoding="utf-8"), Loader=yaml.SafeLoader -) +config = yaml.load(open("config.yaml.in", encoding="utf-8"), Loader=yaml.SafeLoader) def merge_dicts(d1, d2): @@ -29,7 +27,7 @@ def include_files(d): elif key == "include-files": for otherfile in val: external_data = yaml.load( - open(otherfile, "r", encoding="utf-8"), Loader=yaml.SafeLoader + open(otherfile, encoding="utf-8"), Loader=yaml.SafeLoader ) external = merge_dicts(external, external_data) @@ -42,4 +40,4 @@ def include_files(d): del config["disableLanguages"] -yaml.dump(config, open('config.yaml', 'w', encoding='utf-8'), sort_keys=False) +yaml.dump(config, open("config.yaml", "w", encoding="utf-8"), sort_keys=False) From 905db0b360df539a2fb0a498595d6ce7c03a166f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Melissa=20Weber=20Mendon=C3=A7a?= Date: Tue, 1 Apr 2025 15:38:56 -0300 Subject: [PATCH 3/9] Fix nav and footer items --- content/pt/config.yaml | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/content/pt/config.yaml b/content/pt/config.yaml index b2792c16..f9173cc7 100644 --- a/content/pt/config.yaml +++ b/content/pt/config.yaml @@ -1,6 +1,6 @@ languageName: Português params: - description: Por que SciPy? Algoritmos fundamentais. Broadly applicable. Foundational. Interoperable. Performant. Open source. + description: Por que SciPy? Algoritmos fundamentais. Amplas aplicações. Fundamental. Interoperável. Alto desempenho. Open source. navbarlogo: image: logo.svg altText: A blue circle with a snake in the shape of the letter 'S'. @@ -10,9 +10,9 @@ params: # Main hero title title: SciPy # Hero subtitle (optional) - subtitle: Fundamental algorithms for scientific computing in Python + subtitle: Algoritmos fundamentais para computação científica com Python # Button text - buttontext: Get started + buttontext: Comece aqui # Where the main hero button links to buttonlink: "/pt/install" # Hero image (from static/images/___) @@ -21,15 +21,15 @@ params: section5: false navbar: - - title: Install + - title: Instalar url: /pt/install - - title: Documentation + - title: Documentação url: https://docs.scipy.org/doc/scipy/ - - title: Community + - title: Comunidade url: /pt/community - - title: About Us + - title: Quem somos url: /pt/about - - title: Contribute + - title: Contribuir url: /pt/contribute footer: logo: logo.svg @@ -43,35 +43,35 @@ params: column1: title: "" links: - - text: Install + - text: Instalar link: /pt/install - - text: Documentation + - text: Documentação link: https://docs.scipy.org/doc/scipy/ - - text: Citing SciPy + - text: Citar a SciPy link: /pt/citing-scipy - text: Roadmap link: https://scipy.github.io/devdocs/dev/roadmap.html column2: links: - - text: About Us + - text: Quem somos link: /pt/about - - text: Community + - text: Comunidade link: /pt/community - text: SciPy Conference link: https://conference.scipy.org/ - - text: Contribute + - text: Contribuir link: /pt/contribute - - text: Code of Conduct + - text: Código de Conduta (em inglês) link: https://docs.scipy.org/doc/scipy/dev/conduct/code_of_conduct.html column3: links: - text: FAQ link: /pt/faq - - text: Terms of Use + - text: Termos de Uso (em inglês) link: /pt/terms - - text: Privacy + - text: Privacidade link: /pt/privacy - - text: Press Kit + - text: Kit de imprensa link: /pt/press-kit - - text: Social Media + - text: Mídias Sociais link: /pt/about/#social-media From 821e2d67c1b323c1580b9e0036d271220cc158a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Melissa=20Weber=20Mendon=C3=A7a?= Date: Tue, 29 Apr 2025 10:04:50 -0300 Subject: [PATCH 4/9] Add Japanese and Spanish translations --- config.yaml.in | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/config.yaml.in b/config.yaml.in index d7794cef..b5dcb3cc 100644 --- a/config.yaml.in +++ b/config.yaml.in @@ -31,6 +31,20 @@ languages: include-files: - content/en/config.yaml + es: + title: SciPy + weight: 3 + contentDir: content/es + include-files: + - content/es/config.yaml + + ja: + title: SciPy + weight: 4 + contentDir: content/ja + include-files: + - content/ja/config.yaml + pt: title: SciPy weight: 2 From 4050ee7c91038f666248728fa2aba132c4a00776 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Melissa=20Weber=20Mendon=C3=A7a?= Date: Tue, 29 Apr 2025 10:14:00 -0300 Subject: [PATCH 5/9] Add config files for es and ja --- content/es/config.yaml | 77 ++++++++++++++++++++++++++++++++++++++++++ content/ja/config.yaml | 77 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 154 insertions(+) create mode 100644 content/es/config.yaml create mode 100644 content/ja/config.yaml diff --git a/content/es/config.yaml b/content/es/config.yaml new file mode 100644 index 00000000..bd1119bf --- /dev/null +++ b/content/es/config.yaml @@ -0,0 +1,77 @@ +languageName: Español +params: + description: Why SciPy? Fundamental algorithms. Broadly applicable. Foundational. Interoperable. Performant. Open source. + navbarlogo: + image: logo.svg + altText: A blue circle with a snake in the shape of the letter 'S'. + text: SciPy + link: /es/ + hero: + # Main hero title + title: SciPy + # Hero subtitle (optional) + subtitle: Fundamental algorithms for scientific computing in Python + # Button text + buttontext: Get started + # Where the main hero button links to + buttonlink: "/es/install" + # Hero image (from static/images/___) + image: logo.svg + + section5: false + + navbar: + - title: Install + url: /es/install + - title: Documentation + url: https://docs.scipy.org/doc/scipy/ + - title: Community + url: /es/community + - title: About Us + url: /es/about + - title: Contribute + url: /es/contribute + footer: + logo: logo.svg + socialmediatitle: "" + socialmedia: + - link: https://github.com/scipy/scipy + icon: github + - link: https://discuss.scientific-python.org/c/contributor/scipy/ + icon: scientific-python + quicklinks: + column1: + title: "" + links: + - text: Install + link: /es/install + - text: Documentation + link: https://docs.scipy.org/doc/scipy/ + - text: Citing SciPy + link: /es/citing-scipy + - text: Roadmap + link: https://scipy.github.io/devdocs/dev/roadmap.html + column2: + links: + - text: About Us + link: /es/about + - text: Community + link: /es/community + - text: SciPy Conference + link: https://conference.scipy.org/ + - text: Contribute + link: /es/contribute + - text: Code of Conduct + link: https://docs.scipy.org/doc/scipy/dev/conduct/code_of_conduct.html + column3: + links: + - text: FAQ + link: /es/faq + - text: Terms of Use + link: /es/terms + - text: Privacy + link: /es/privacy + - text: Press Kit + link: /es/press-kit + - text: Social Media + link: /es/about/#social-media diff --git a/content/ja/config.yaml b/content/ja/config.yaml new file mode 100644 index 00000000..f1418e9f --- /dev/null +++ b/content/ja/config.yaml @@ -0,0 +1,77 @@ +languageName: Japanese +params: + description: Why SciPy? Fundamental algorithms. Broadly applicable. Foundational. Interoperable. Performant. Open source. + navbarlogo: + image: logo.svg + altText: A blue circle with a snake in the shape of the letter 'S'. + text: SciPy + link: /ja/ + hero: + # Main hero title + title: SciPy + # Hero subtitle (optional) + subtitle: Fundamental algorithms for scientific computing in Python + # Button text + buttontext: Get started + # Where the main hero button links to + buttonlink: "/ja/install" + # Hero image (from static/images/___) + image: logo.svg + + section5: false + + navbar: + - title: Install + url: /ja/install + - title: Documentation + url: https://docs.scipy.org/doc/scipy/ + - title: Community + url: /ja/community + - title: About Us + url: /ja/about + - title: Contribute + url: /ja/contribute + footer: + logo: logo.svg + socialmediatitle: "" + socialmedia: + - link: https://github.com/scipy/scipy + icon: github + - link: https://discuss.scientific-python.org/c/contributor/scipy/ + icon: scientific-python + quicklinks: + column1: + title: "" + links: + - text: Install + link: /ja/install + - text: Documentation + link: https://docs.scipy.org/doc/scipy/ + - text: Citing SciPy + link: /ja/citing-scipy + - text: Roadmap + link: https://scipy.github.io/devdocs/dev/roadmap.html + column2: + links: + - text: About Us + link: /ja/about + - text: Community + link: /ja/community + - text: SciPy Conference + link: https://conference.scipy.org/ + - text: Contribute + link: /ja/contribute + - text: Code of Conduct + link: https://docs.scipy.org/doc/scipy/dev/conduct/code_of_conduct.html + column3: + links: + - text: FAQ + link: /ja/faq + - text: Terms of Use + link: /ja/terms + - text: Privacy + link: /ja/privacy + - text: Press Kit + link: /ja/press-kit + - text: Social Media + link: /ja/about/#social-media From 8e2a973796efd5602e01854c72cf1a2c02028af0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Melissa=20Weber=20Mendon=C3=A7a?= Date: Tue, 29 Apr 2025 10:20:41 -0300 Subject: [PATCH 6/9] Restore admonition in es/install.md --- content/es/install.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/content/es/install.md b/content/es/install.md index d6e68c7d..cfaabe3b 100644 --- a/content/es/install.md +++ b/content/es/install.md @@ -21,6 +21,7 @@ Para instalar SciPy con \[archivos de tipado estáticos], revisa [Instalación c [static type stubs]: https://typing.readthedocs.io/en/latest/guides/libraries.html +{{< admonition tip >}} Es posible que se requiera instalar archivos de anotaciones de tipos para que los Entornos de Desarrollo Interactivos (IDEs) ofrezcan sugerencias de tipos más precisas. {{< /admonition >}} @@ -98,7 +99,7 @@ Conda puede administrar paquetes en cualquier lenguaje, por lo que puedes usarlo [Conda]: https://docs.conda.io/projects/conda/en/latest/index.html -Los pasos para instalar SciPy desde [conda-forge] usando la herramienta de gestión de paquetes [`pixi`] son ​​muy similares a los pasos para `uv`: +Los pasos para instalar SciPy desde [conda-forge] usando la herramienta de gestión de paquetes [`pixi`] son muy similares a los pasos para `uv`: [conda-forge]: https://conda-forge.org/ [`pixi`]: https://pixi.sh/latest/ @@ -132,10 +133,10 @@ pixi run python name = 'Basado en entornos' content = ''' -En los flujos de trabajo basados ​​en proyectos, un proyecto es un directorio que contiene un archivo que describe el proyecto, un archivo que describe las dependencias exactas del proyecto y los entornos (potencialmente múltiples) del mismo. +En los flujos de trabajo basados en proyectos, un proyecto es un directorio que contiene un archivo que describe el proyecto, un archivo que describe las dependencias exactas del proyecto y los entornos (potencialmente múltiples) del mismo. -Por el contrario, en los flujos de trabajo basados ​​en entornos, instalas paquetes en un entorno, que puedes activar y desactivar desde cualquier directorio. -Estos flujos de trabajo están bien establecidos, pero carecen de algunos beneficios de reproducibilidad de los flujos de trabajo basados ​​en proyectos. +Por el contrario, en los flujos de trabajo basados en entornos, instalas paquetes en un entorno, que puedes activar y desactivar desde cualquier directorio. +Estos flujos de trabajo están bien establecidos, pero carecen de algunos beneficios de reproducibilidad de los flujos de trabajo basados en proyectos. ### Instalación con `pip` @@ -161,7 +162,7 @@ python -m pip install scipy ### Instalación con `conda` -[Miniforge] es la forma recomendada de instalar `conda` y [`mamba`], dos administradores de entorno basados ​​en Conda. +[Miniforge] es la forma recomendada de instalar `conda` y [`mamba`], dos administradores de entorno basados en Conda. Después de crear un entorno, puedes instalar SciPy desde conda-forge de la siguiente manera: ```bash From 78f65a7fc3adcc7d6a6f094dea1194378d6defbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Melissa=20Weber=20Mendon=C3=A7a?= Date: Tue, 29 Apr 2025 10:27:14 -0300 Subject: [PATCH 7/9] Fix ja/install.md --- content/ja/beginner-install.md | 3 --- content/ja/install.md | 39 +++++++++++++++++----------------- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/content/ja/beginner-install.md b/content/ja/beginner-install.md index c44e26e7..65e09a4e 100644 --- a/content/ja/beginner-install.md +++ b/content/ja/beginner-install.md @@ -53,9 +53,6 @@ python -m pip install scipy ``` {{< admonition warning >}} -You may see this recommended in tutorials or classes, but the recommended -way to install SciPy with `pip` is to use a virtual environment - -see.{{< admonition warning >}} チュートリアルや学校の授業で、このインストール方法が推奨されることがあるかもしれませんが、`pip`を使用して SciPy をインストールする我々としての推奨方法は、仮想環境を利用することです。詳しくは、[`pip`を利用したインストール](./install.md#installing-with-pip)を参照してください。 {{< /admonition >}} diff --git a/content/ja/install.md b/content/ja/install.md index 3c152610..8c299b58 100644 --- a/content/ja/install.md +++ b/content/ja/install.md @@ -16,15 +16,14 @@ SciPyの推奨されるインストール方法は、あなたの好みのワー - **システムパッケージマネージャー** _(推奨されません)_ - **ソースからのビルド** _(デバッグと開発用)_ -\[静的型スタブ]を使用してSciPyをインストールするには、 +[静的型スタブ]を使用してSciPyをインストールするには、 [型スタブを使用したインストール](#type-stubs)をご覧ください。 -[static type stubs]: [https://typing.readthedocs.io/en/latest/guides/libraries.html]\(https://typing.readthedocs.io/en/latest/guides/libraries.html\) +[static type stubs]: https://typing.readthedocs.io/en/latest/guides/libraries.html {{< admonition tip >}} 統合開発環境 (IDE) が正確な型ヒントを提供するためには、型スタブのインストールが必要となる場合があります。 {{< /admonition >}} -{{< /admonition >}} {{< tabs >}} @@ -36,7 +35,7 @@ content = ''' Pythonパッケージマネージャーであるuvを使用してSciPyを使用するためのプロジェクトをセットアップする手順は以下の通りです。 -1. [uvドキュメントのインストール手順]([https://docs.astral.sh/uv/getting-started/installation/)に従って](https://www.google.com/search?q=https://docs.astral.sh/uv/getting-started/installation/)%E3%81%AB%E5%BE%93%E3%81%A3%E3%81%A6)、\`uv\`をインストールします。 +1. [uvドキュメントのインストール手順](https://docs.astral.sh/uv/getting-started/installation/)に従って、\`uv\`をインストールします。 2. 新しいサブディレクトリに新しいプロジェクトを作成します。ターミナルで以下を実行します。 @@ -48,7 +47,6 @@ cd try-scipy {{< admonition hint >}} 2番目のコマンドは、ディレクトリをプロジェクトのディレクトリに変更します。 {{< /admonition >}} -{{< /admonition >}} 3. SciPyをプロジェクトに追加します。 @@ -59,7 +57,6 @@ uv add scipy {{< admonition note >}} これは、Pythonがまだインストールされていない場合に、自動的にPythonをインストールします! {{< /admonition >}} -{{< /admonition >}} {{< admonition tip >}} 同じ方法で他のPythonライブラリもインストールできます。例: @@ -84,6 +81,8 @@ uv run python [scipy-user-guide]: https://docs.conda.io/projects/conda/en/latest/index.html +{{< admonition note >}} + パッケージ管理ツール[`pixi`]を使用して[conda-forge]からSciPyをインストールする手順は、`uv`を使った場合と非常に似ています。 コンピューターを再起動した後、`try-scipy`プロジェクトディレクトリに移動し、`uv run python`を実行して、SciPyをインポート可能なPythonインタプリタに戻る必要があります。 @@ -92,7 +91,7 @@ Pythonスクリプトを実行するには、`uv run myscript.py`を使用でき 詳細は[uvのプロジェクトでの作業ガイド][uv-projects]をご覧ください。 -[uv-projects]: [https://docs.astral.sh/uv/guides/projects/]\(https://docs.astral.sh/uv/guides/projects/\) +[uv-projects]: https://docs.astral.sh/uv/guides/projects/ {{< /admonition >}} @@ -103,16 +102,16 @@ Condaはあらゆる言語のパッケージを管理できるため、Python自 Condaは任意の言語でパッケージを管理できるため、 Python自体や、コンパイラ、その他の言語をインストールするのにも使用できます。 -[Conda]: [https://docs.conda.io/projects/conda/en/latest/index.html]\(https://docs.conda.io/projects/conda/en/latest/index.html\) +[Conda]: https://docs.conda.io/projects/conda/en/latest/index.html パッケージ管理ツール[`pixi`]を使用して[conda-forge]からSciPyをインストールする手順は、`uv`の手順と非常によく似ています。 -[conda-forge]: [https://conda-forge.org/]\(https://conda-forge.org/\) -[`pixi`]: [https://pixi.sh/latest/]\(https://pixi.sh/latest/\) +[conda-forge]: https://conda-forge.org/ +[`pixi`]: https://pixi.sh/latest/ 1. [`pixi`ドキュメントのインストール手順][install-pixi]に従って、`pixi`をインストールします。 -[install-pixi]: [https://pixi.sh/latest/]\(https://pixi.sh/latest/\) +[install-pixi]: https://pixi.sh/latest/ 2. 新しいサブディレクトリに新しいプロジェクトを作成します。 @@ -151,13 +150,12 @@ content = ''' -1. [Pythonをインストール](\[https://www.python.org/downloads/)します]([https://www.google.com/search?q=https://www.python.org/downloads/)%E3%81%97%E3%81%BE%E3%81%99](https://www.google.com/search?q=https://www.python.org/downloads/)%E3%81%97%E3%81%BE%E3%81%99))。 +1. [Pythonをインストール](https://www.python.org/downloads/)します。 2. `venv` を使用して仮想環境を作成し、アクティブ化します。 {{< admonition hint >}} -[Python Packaging User Guideのチュートリアル](\[https://packaging.python.org/en/latest/tutorials/installing-packages/#creating-virtual-environments)をご覧ください]([https://www.google.com/search?q=https://packaging.python.org/en/latest/tutorials/installing-packages/%23creating-virtual-environments)%E3%82%92%E3%81%94%E8%A6%A7%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84](https://www.google.com/search?q=https://packaging.python.org/en/latest/tutorials/installing-packages/%23creating-virtual-environments)%E3%82%92%E3%81%94%E8%A6%A7%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84))。 -{{< /admonition >}} +[Python Packaging User Guideのチュートリアル](https://packaging.python.org/en/latest/tutorials/installing-packages/#creating-virtual-environments)をご覧ください。 {{< /admonition >}} 3. [`pip`] を使用して SciPy をインストールします。 @@ -168,7 +166,7 @@ python -m pip install scipy -[`pip`]: [https://pip.pypa.io/en/stable/getting-started/]\(https://pip.pypa.io/en/stable/getting-started/\) +[`pip`]: https://pip.pypa.io/en/stable/getting-started/ ### `conda` を使用したインストール @@ -181,8 +179,9 @@ conda install scipy # または mamba install scipy ``` -[Miniforge]: [https://conda-forge.org/download/]\(https://conda-forge.org/download/\) -[`mamba`]: [https://mamba.readthedocs.io/en/latest/]\(https://mamba.readthedocs.io/en/latest/\) +[Miniforge]: https://conda-forge.org/download/ + +[`mamba`]: https://mamba.readthedocs.io/en/latest/ ''' @@ -229,7 +228,7 @@ content = ''' 注意点: ソースコードからSciPyをビルドするのは簡単ではない場合があります。 お使いのプラットフォームで、上記の方法のいずれかを通じてバイナリソフトが利用可能な場合は、それを使用することをおすすめします。 ソースコードからのビルド方法の詳細については、 -\[ビルドドキュメント] を参照してください。 +[ビルドドキュメント] を参照してください。 [building-docs]: https://scipy.github.io/devdocs/building/index.html @@ -237,7 +236,7 @@ content = ''' {{}} -次のステップは[SciPyユーザーガイド]([https://docs.scipy.org/doc/scipy/tutorial/)をご覧ください]([https://www.google.com/search?q=https://docs.scipy.org/doc/scipy/tutorial/)%E3%82%92%E3%81%94%E8%A6%A7%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84](https://www.google.com/search?q=https://docs.scipy.org/doc/scipy/tutorial/)%E3%82%92%E3%81%94%E8%A6%A7%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84))。 +次のステップは[SciPyユーザーガイド](https://docs.scipy.org/doc/scipy/tutorial/)をご覧ください。 {{< admonition tip >}} IDE(統合開発環境)で正確な型ヒントを提供するために、型スタブのインストールが必要になる場合があります。 @@ -261,4 +260,4 @@ conda install "scipy-typed>=1.14" ``` 静的型付けのサポートに関する質問は、 -[`scipy-stubs` GitHubリポジトリ]([https://github.com/jorenham/scipy-stubs)にお寄せください](https://www.google.com/search?q=https://github.com/jorenham/scipy-stubs)%E3%81%AB%E3%81%8A%E5%AF%84%E3%81%9B%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84)。 +[`scipy-stubs` GitHubリポジトリ](https://github.com/jorenham/scipy-stubs)にお寄せください。 From 3154f8916f92065c79af69236cf6abe669579f20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Melissa=20Weber=20Mendon=C3=A7a?= Date: Tue, 29 Apr 2025 10:59:17 -0300 Subject: [PATCH 8/9] Fix ja/_index.md --- content/ja/_index.md | 1 - 1 file changed, 1 deletion(-) diff --git a/content/ja/_index.md b/content/ja/_index.md index 8e5cba2d..0fc4c50c 100644 --- a/content/ja/_index.md +++ b/content/ja/_index.md @@ -38,7 +38,6 @@ title = '使いやすさ' body = ''' SciPyの高いレベルで抽象化されたAPIは、どんな技術的バックグラウンドや経験を持つのプログラマーでも簡単に利用することができ、生産性を高めることができます。 ''' -''' [[item]] type = 'card' From 232dfc9e7e20a869f7d2f03cc46724e1e0cae9f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Melissa=20Weber=20Mendon=C3=A7a?= Date: Mon, 19 May 2025 10:53:51 -0300 Subject: [PATCH 9/9] Change comment for clarity Co-authored-by: Helder Geovane Gomes de Lima --- config.yaml.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.yaml.in b/config.yaml.in index b5dcb3cc..8945dadf 100644 --- a/config.yaml.in +++ b/config.yaml.in @@ -8,7 +8,7 @@ markup: renderer: unsafe: true -# Uncomment this to disable the translations for the specified languages. +# Add languages to the list to disable their translations. # This may be useful to be able to merge partial translations without deploying # them to scipy.org immediately. disableLanguages: []