8000 Merge branch '3.11' into correccion_formato · python/python-docs-es@5fec5a0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5fec5a0

Browse files
authored
Merge branch '3.11' into correccion_formato
2 parents 71bdbf8 + 0ea8d36 commit 5fec5a0

File tree

370 files changed

+108311
-91055
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

370 files changed

+108311
-91055
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ on:
99
jobs:
1010
test:
1111
name: Test
12-
runs-on: ubuntu-latest
12+
runs-on: ubuntu-22.04
1313
steps:
1414
- uses: actions/checkout@v2
15-
- name: Preparar Python v3.10
15+
- name: Preparar Python v3.11
1616
uses: actions/setup-python@v2
1717
with:
18-
python-version: "3.10"
18+
python-version: "3.11"
1919
- name: Sincronizar con CPython
2020
run: |
2121
git submodule update --init --depth=1 cpython
@@ -36,4 +36,14 @@ jobs:
3636
run: |
3737
python scripts/check_spell.py
3838
- name: Construir documentación
39-
run: PYTHONWARNINGS=ignore::FutureWarning sphinx-build -j auto -W --keep-going -b html -d cpython/Doc/_build/doctree -D language=es . cpython/Doc/_build/html
39+
run: |
40+
# FIXME: Relative paths for includes in 'cpython'
41+
sed -i -e 's|.. include:: ../includes/wasm-notavail.rst|.. include:: ../../../../includes/wasm-notavail.rst|g' cpython/Doc/**/*.rst
42+
sed -i -e 's|.. include:: ../distutils/_setuptools_disclaimer.rst|.. include:: ../../../../distutils/_setuptools_disclaimer.rst|g' cpython/Doc/**/*.rst
43+
sed -i -e 's|.. include:: ./_setuptools_disclaimer.rst|.. include:: ../../../_setuptools_disclaimer.rst|g' cpython/Doc/**/*.rst
44+
sed -i -e 's|.. include:: token-list.inc|.. include:: ../../../token-list.inc|g' cpython/Doc/**/*.rst
45+
sed -i -e 's|.. include:: ../../using/venv-create.inc|.. include:: ../using/venv-create.inc|g' cpython/Doc/**/*.rst
46+
sed -i -e 's|.. include:: ../../../using/venv-create.inc|.. include:: ../../using/venv-create.inc|g' cpython/Doc/**/*.rst
47+
sed -i -e 's|.. include:: /using/venv-create.inc|.. include:: ../../../../using/venv-create.inc|g' cpython/Doc/**/*.rst
48+
# Normal build
49+
PYTHONWARNINGS=ignore::FutureWarning sphinx-build -j auto -W --keep-going -b html -d cpython/Doc/_build/doctree -D language=es . cpython/Doc/_build/html

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,9 @@ coverage.xml
7575

7676
# OSX
7777
.DS_Store
78+
79+
.potodo/
80+
git_diff.po
81+
CONTRIBUTING.po
82+
reviewers-guide.po
83+
upgrade-python-version.po

.overrides/CONTRIBUTING.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ Antes de comenzar
6464

6565
#. Selecciona un :ref:`archivo para traducir <que-archivo-traducir>`.
6666

67-
#. Verifica que estás en la rama principal del repositorio, **3.10** (esto es muy
67+
#. Verifica que estás en la rama principal del repositorio, **3.11** (esto es muy
6868
importante para evitar crear una nueva rama a partir de una traducción
6969
anterior)::
7070

71-
git checkout 3.10
71+
git checkout 3.11
7272

7373
#. Crea una rama nueva en base al artículo en el que vayas a trabajar. Por
7474
ejemplo, si vas a trabajar en el archivo ``library/glosario.po``, usa un nombre

.overrides/upgrade-python-version.rst

Lines changed: 53 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,43 +8,59 @@ We are currently in branch 3.10, and we want to update the strings from 3.11.
88

99
#. Make sure you are in a clean state of the branch 3.10
1010

11-
#. Create a new branch
11+
#. Create a new branch called ``3.11``
1212

13-
#. Fetch the `latest commit of 3.10 branch <https://github.com/python/cpython/commit/69b6b56d857440183e227ca0b10c84bca4239985>`_::
13+
#. Initialize the submodules::
14+
15+
git submodule init
16+
git submodule update
17+
18+
#. Fetch the `latest commit of 3.11 branch <https://github.com/python/cpython/commit/b3cafb60afeb2300002af9982d43703435b8302d>`_: 10000 :
1419

1520
cd cpython/
16-
git fetch --depth 1 origin 69b6b56d857440183e227ca0b10c84bca4239985
21+
git fetch --depth 1 origin b3cafb60afeb2300002af9982d43703435b8302d
1722

1823
.. note:: you could also base the hash on the 'git tag' from the desired
19-
version: `git checkout tags/v3.11.0 -b 3.11` considering that
20-
`3.11` doesn't exist locally.
24+
version: ``git checkout tags/v3.11.0 -b 3.11`` considering that
25+
``3.11`` doesn't exist locally.
2126

2227
#. Checkout that commit locally::
2328

24-
git checkout 69b6b56d857440183e227ca0b10c84bca4239985
29+
git checkout b3cafb60afeb2300002af9982d43703435b8302d
2530

26-
#. Update the branch on the `Makefile` and check the `requirements.txt` from
31+
#. Update the branch on the ``Makefile`` and check the ``requirements.txt`` from
2732
the cpython repository, to see if upgrades on the modules like sphinx is
2833
needed.
2934

30-
#. Verify that the docs build with the new versions you changed from
31-
`requirements.txt` mainly the sphinx version.
32-
3335
#. Commit the update of the submodule change::
3436

3537
git add cpython
3638
git commit -m "Update the cpython submodule"
3739

38-
.. note:: This is important, so the later `make build` step will not reset
40+
.. note:: This is important, so the later ``make build`` step will not reset
3941
the cpython submodule to the previous hash on the old branch.
4042

43+
#. Verify that the docs build with the new versions you changed from
44+
``requirements.txt`` mainly the sphinx version::
45+
46+
make html
47+
48+
.. note::
49+
50+
It may fail the build because there may be files
51+
that don't exist anymore in the new branch.
52+
If that's the case, just continue with the steps
53+
and verify the build later.
54+
4155
#. Clean possible garbage (form previous builds)::
4256

4357
rm -rf _build ../python-docs-es-pot cpython/Doc/CONTRIBUTING.rst cpython/Doc/upgrade-python-version.rst
4458

45-
.. note: the 'python-docs-es-pot' is a temporary directory that is created
46-
in the next step. It's included here because it might be a leftover
47-
from previous attempts on your machine.
59+
.. note::
60+
61+
The 'python-docs-es-pot' is a temporary directory that is created
62+
in the next step. It's included here because it might be a leftover
63+
from previous attempts on your machine.
4864

4965
#. Create a virtual environment and install the dependencies of the project::
5066

@@ -53,41 +69,56 @@ We are currently in branch 3.10, and we want to update the strings from 3.11.
5369
pip install -r requirements.txt
5470

5571

56-
#. Create the .po files from the new source code. This will generate all the .po files for version 3.8::
72+
#. Create the .po files from the new source code. This will generate all the .po files for version 3.11::
5773

5874
SPHINX_GETTEXT=True sphinx-build -j auto -b gettext -d _build/doctrees . ../python-docs-es-pot
5975

6076
.. note::
6177

62-
In `../python-docs-es-pot` directory, we will have the new .pot files with new strings from 3.11 branch.
78+
In ``../python-docs-es-pot`` directory, we will have the new .pot files with new strings from 3.11 branch.
6379
All these strings will be *untranslated* at this point.
6480

6581
#. Now, we update our translated files form the source language (English) with new strings::
6682

6783
sphinx-intl update --language es --pot-dir ../python-docs-es-pot --locale-dir cpython/locales/
6884

69-
#. At this point, all the `.po` files will have a different comment on each translation phrase,
85+
#. At this point, all the ``.po`` files will have a different comment on each translation phrase,
7086
for example::
7187

72-
-#: ../Doc/whatsnew/3.9.rst:3
73-
+#: ../python-docs-es/cpython/Doc/whatsnew/3.9.rst:3
88+
-#: ../python-docs-es/cpython/Doc/whatsnew/3.11.rst:3
89+
+#: ../Doc/whatsnew/3.11.rst:3
7490

7591
As you can see, it added the path of the local repository, but you can
7692
remove it from it with this regular expression::
7793

7894
sed -i **/*.po -e "s|python-docs-es/cpython/||g"
7995

80-
..note:: if you have your local repository cloned with a different name,
81-
please make sure to adapt the expression.
96+
.. note::
97+
98+
If you have your local repository cloned with a different name,
99+
please make sure to adapt the expression.
82100

83-
#. Pass `powrap` to make the column widths consistent::
101+
#. Pass ``powrap`` to make the column widths consistent::
84102

85103
powrap --modified
86104

105+
.. note::
106+
107+
Make sure you have installed ``gettext``,
108+
since it's required for the previous command.
109+
87110
#. Prepare for fireworks! Now it's time for an initial build::
88111

89112
make build
90113

91114
you will find many warnings that needs to be fixed before the push
92115
of the new branch is done. So prepare a cup of any hot beverage
93116
and fix them.
117+
118+
119+
Once the process is completely and you are happy with the results,
120+
there are a few extra steps to finish the process::
121+
122+
#. Upgrade GitHub Actions to use Python 3.11
123+
124+
#. Update Read the Docs project to use 3.11 in the build and also as default branch/version

.readthedocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ sphinx:
1010
configuration: conf.py
1111

1212
build:
13-
os: ubuntu-20.04
13+
os: ubuntu-22.04
1414
tools:
15-
python: "3.10"
15+
python: "3.11"
1616

1717

1818
# Optionally set the version of Python and requirements required to build your docs

Makefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Configuration
99

1010
CPYTHON_PATH := cpython #Current commit for this upstream repo is setted by the submodule
11-
BRANCH := 3.8
11+
BRANCH := 3.11
1212
LANGUAGE_TEAM := python-docs-es
1313
LANGUAGE := es
1414

@@ -41,6 +41,15 @@ help:
4141
# treated as errors, which is good to skip simple Sphinx syntax mistakes.
4242
.PHONY: build
4343
build: setup
44+
# FIXME: Relative paths for includes in 'cpython'
45+
sed -i -e 's|.. include:: ../includes/wasm-notavail.rst|.. include:: ../../../../includes/wasm-notavail.rst|g' cpython/Doc/**/*.rst
46+
sed -i -e 's|.. include:: ../distutils/_setuptools_disclaimer.rst|.. include:: ../../../../distutils/_setuptools_disclaimer.rst|g' cpython/Doc/**/*.rst
47+
sed -i -e 's|.. include:: ./_setuptools_disclaimer.rst|.. include:: ../../../_setuptools_disclaimer.rst|g' cpython/Doc/**/*.rst
48+
sed -i -e 's|.. include:: token-list.inc|.. include:: ../../../token-list.inc|g' cpython/Doc/**/*.rst
49+
sed -i -e 's|.. include:: ../../using/venv-create.inc|.. include:: ../using/venv-create.inc|g' cpython/Doc/**/*.rst
50+
sed -i -e 's|.. include:: ../../../using/venv-create.inc|.. include:: ../../using/venv-create.inc|g' cpython/Doc/**/*.rst
51+
sed -i -e 's|.. include:: /using/venv-create.inc|.. include:: ../../../../using/venv-create.inc|g' cpython/Doc/**/*.rst
52+
# Normal build
4453
PYTHONWARNINGS=ignore::FutureWarning $(VENV)/bin/sphinx-build -j auto -W --keep-going -b html -d $(OUTPUT_DOCTREE) -D language=$(LANGUAGE) . $(OUTPUT_HTML) && \
4554
echo "Success! Open file://`pwd`/$(OUTPUT_HTML)/index.html, " \
4655
"or run 'make serve' to see them in http://localhost:8000";
@@ -71,7 +80,7 @@ venv:
7180
# Makefile's "serve" target. Run "build" before using this target.
7281
.PHONY: serve
7382
serve:
74-
$(MAKE) -C $(CPYTHON_WORKDIR)/Doc serve
83+
$(MAKE) -C $(CPYTHON_WORKDIR)/Doc htmlview
7584

7685

7786
# clean: remove all .mo files and the venv directory that may exist and

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numb 10000 erDiff line change
@@ -1,9 +1,9 @@
1-
.. image:: https://travis-ci.org/python/python-docs-es.svg?branch=3.10
1+
.. image:: https://travis-ci.org/python/python-docs-es.svg?branch=3.11
22
:target: https://travis-ci.org/python/python-docs-es
33
:alt: Build Status
44

5-
.. image:: https://readthedocs.org/projects/python-docs-es/badge/?version=3.10
6-
:target: https://python-docs-es.readthedocs.io/es/3.10/?badge=3.10
5+
.. image:: https://readthedocs.org/projects/python-docs-es/badge/?version=3.11
6+
:target: https://python-docs-es.readthedocs.io/es/3.11/?badge=3.11
77
:alt: Documentation Status
88

99

about.po

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
# Copyright (C) 2001-2020, Python Software Foundation
22
# This file is distributed under the same license as the Python package.
33
# Maintained by the python-doc-es workteam.
4-
# docs-es@python.org / https://mail.python.org/mailman3/lists/docs-es.python.org/
5-
# Check https://github.com/python/python-docs-es/blob/3.8/TRANSLATORS to get the list of volunteers
4+
# docs-es@python.org /
5+
# https://mail.python.org/mailman3/lists/docs-es.python.org/
6+
# Check https://github.com/python/python-docs-es/blob/3.8/TRANSLATORS to get
7+
# the list of volunteers
68
#
79
msgid ""
810
msgstr ""
911
"Project-Id-Version: Python 3.8\n"
1012
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2019-05-06 11:59-0400\n"
13+
"POT-Creation-Date: 2022-10-25 19:47+0200\n"
1214
"PO-Revision-Date: 2019-12-22 12:23+0100\n"
13-
"MIME-Version: 1.0\n"
14-
"Content-Type: text/plain; charset=UTF-8\n"
15-
"Content-Transfer-Encoding: 8bit\n"
16-
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
1715
"Last-Translator: \n"
18-
"Language-Team: python-doc-es\n"
1916
"Language: es\n"
20-
"X-Generator: Poedit 2.2.4\n"
17+
"Language-Team: python-doc-es\n"
18+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
19+
"MIME-Version: 1.0\n"
20+
"Content-Type: text/plain; charset=utf-8\n"
21+
"Content-Transfer-Encoding: 8bit\n"
22+
"Generated-By: Babel 2.10.3\n"
2123

2224
#: ../Doc/about.rst:3
2325
msgid "About these documents"
@@ -57,26 +59,28 @@ msgstr ""
5759
"herramientas de Python y escritor de gran parte del contenido;"
5860

5961
#: ../Doc/about.rst:24
62+
#, fuzzy
6063
msgid ""
61-
"the `Docutils <http://docutils.sourceforge.net/>`_ project for creating "
64+
"the `Docutils <https://docutils.sourceforge.io/>`_ project for creating "
6265
"reStructuredText and the Docutils suite;"
6366
msgstr ""
6467
"el proyecto `Docutils <http://docutils.sourceforge.net/>`_ para creación de "
6568
"reStructuredText y el juego de Utilidades de Documentación;"
6669

6770
#: ../Doc/about.rst:26
71+
#, fuzzy
6872
msgid ""
69-
"Fredrik Lundh for his `Alternative Python Reference <http://effbot.org/zone/"
70-
"pyref.htm>`_ project from which Sphinx got many good ideas."
73+
"Fredrik Lundh for his Alternative Python Reference project from which Sphinx "
74+
"got many good ideas."
7175
msgstr ""
7276
"Fredrik Lundh por su proyecto `Referencia Alternativa de Python <http://"
7377
"effbot.org/zone/pyref.htm>`_ para la cual Sphinx tuvo muchas ideas."
7478

75-
#: ../Doc/about.rst:32
79+
#: ../Doc/about.rst:31
7680
msgid "Contributors to the Python Documentation"
7781
msgstr "Contribuidores de la documentación de Python"
7882

79-
#: ../Doc/about.rst:34
83+
#: ../Doc/about.rst:33
8084
msgid ""
8185
"Many people have contributed to the Python language, the Python standard "
8286
"library, and the Python documentation. See :source:`Misc/ACKS` in the "
@@ -86,7 +90,7 @@ msgstr ""
8690
"estándar de Python, y la documentación de Python. Revisa :source:`Misc/ACKS` "
8791
"la distribución de Python para una lista parcial de contribuidores."
8892

89-
#: ../Doc/about.rst:38
93+
#: ../Doc/about.rst:37
9094
msgid ""
9195
"It is only with the input and contributions of the Python community that "
9296
"Python has such wonderful documentation -- Thank You!"

0 commit comments

Comments
 (0)
0