Skip to content

Commit ab61f1e

Browse files
authored
Merge branch '3.8' into traduccion_zipimport
2 parents 978fab9 + dd1b80a commit ab61f1e

File tree

504 files changed

+49487
-32531
lines changed

Some content is hidden

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

504 files changed

+49487
-32531
lines changed

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
*.mo
22
/_build/
33

4+
# Submodules to avoid issues
5+
cpython
6+
.migration/tutorialpyar
7+
8+
# Files overriden by our scripts
9+
Doc/tools/templates/customsourcelink.html
10+
Doc/tools/templates/indexsidebar.html
11+
Doc/CONTRIBUTING.rst
12+
Doc/translation-memory.rst
13+
Doc/upgrade-python-version.rst
14+
locales/
15+
416
# Byte-compiled / optimized / DLL files
517
__pycache__/
618
*.py[cod]
@@ -48,3 +60,5 @@ coverage.xml
4860
# Ides
4961
.vscode/
5062
.idea/
63+
/translation-memory.po
64+
/locale/

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[submodule "cpython"]
22
path = cpython
33
url = https://github.com/python/cpython.git
4-
branch = 3.7
4+
branch = 3.8
55
shallow = true
66
[submodule "tutorialpyar"]
77
path = .migration/tutorialpyar

.overrides/CONTRIBUTING.rst

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
:orphan:
2+
3+
Guía para contribuir en la traducción
4+
=====================================
5+
6+
¡Muchas gracias por tu interés en participar de la traducción de la documentación oficial de Python al Español!
7+
Necesitamos *mucho* de tu ayuda para poder seguir adelante con este proyecto.
8+
9+
.. note::
10+
11+
Si tienes cualquier duda, puedes enviarnos un email a docs-es@python.org.
12+
13+
14+
#. Crea un fork del repositorio_.
15+
16+
.. note::
17+
18+
Puedes consular la `ayuda oficial de GitHub`_, si lo deseas.
19+
20+
#. Clona el fork del repositorio que acabas de crear::
21+
22+
git clone git@github.com:<TU-USUARIO>/python-docs-es.git
23+
24+
#. Ingresa en la carpeta que `git clone` creó en tu computadora::
25+
26+
cd python-docs-es/
27+
28+
#. Agrega el repositorio original como "upstream"::
29+
30+
git remote add upstream https://github.com/pycampes/python-docs-es.git
31+
32+
#. Crea una branch nueva en base al artículo en el que vayas a trabajar.
33+
Por ejemplo, si vas a trabajar en el archivo ``glosario.po``, usa un nombre similar a::
34+
35+
git checkout -b traduccion-glosario
36+
37+
#. Una vez que hayas elegido el archivo, lo puedes abrir con el editor poedit_ y empezar a traducir.
38+
39+
#. Cuando hayas terminado tu sesión, debes guardar tus cambios y enviarlos a GitHub de nuevo::
40+
41+
git commit -am 'Traducido archivo {nombre de archivo}'
42+
git push origin traduccion-glosario
43+
44+
#. No olvides añadir tu nombre al archivo ``TRANSLATORS`` si no lo has hecho todavía.
45+
Los nombres se encuentran ordenados alfabéticamente por apellido.
46+
47+
#. Luego ve a tu página de GitHub y propone hacer un Pull Request.
48+
49+
.. note::
50+
51+
Puedes consultar la `ayuda oficial de GitHub para crear un Pull Request`_ si lo deseas.
52+
53+
54+
¿Qué archivo traducir?
55+
----------------------
56+
57+
Tenemos una `lista de issues en GitHub`_ en dónde vamos coordinando el trabajo realizado para no traducir dos veces lo mismo.
58+
El proceso para traducir un archivo es el siguiente:
59+
60+
61+
#. Elige cualquier de los que *no están asignados* a otra persona.
62+
#. Deja un comentario en el issue diciendo que quieres trabajar en él.
63+
#. Espera a que un administrador te asigne el issue.
64+
#. ¡Empieza a traducir!
65+
66+
67+
68+
A tener en cuenta
69+
-----------------
70+
71+
* No debes traducir el contenido de ``:ref:...`` y ``:term:...``.
72+
* Si tienes que palabras en inglés, debes ponerlas en *italics* (rodeadas por asteristicos)
73+
* Si traduces un título que es un link, por favor traduce el link también (por ejemplo un artículo a Wikipedia).
74+
En caso de que no haya una traducción del artículo en Wikipedia, deja el título sin traducir.
75+
* Tenemos una `Memoria de Traducción`_, que usamos para tener consistencia con algunos términos.
76+
77+
78+
79+
.. note::
80+
81+
También puedes unirte a `nuestro canal de Telegram`_ si necesitas ayuda.
82+
83+
84+
85+
Previsualizar los cambios
86+
-------------------------
87+
88+
Hay dos formas de visualizar, junto con el resultado final de la documentación, los cambios que has hecho.
89+
90+
Read the Docs
91+
`````````````
92+
93+
Una vez que hayas hecho un Pull Request en GitHub, este mostrará al final de página una sección de "check".
94+
Ahí, debería haber uno que diga ``docs/readthedocs.org:python-docs-es``, y al lado un link de "Details".
95+
Haciendo click en ese link, deberías poder ver una versión de la documentación con tus cambios.
96+
97+
Construcción local
98+
``````````````````
99+
100+
Desde el mismo directorio ``python-docs-es/`` que se creó cuando hiciste ``git clone``, puedes ejecutar::
101+
102+
make build
103+
104+
Este comando demorará unos minutos y generará toda la documentación en formato HTML en tu computadora.
105+
Puedes ver el con tu navegador de internet (Firefox, Chrome, etc) ejecutando::
106+
107+
make serve
108+
109+
Y luego accediendo a http://localhost:8000/
110+
111+
112+
.. _repositorio: https://github.com/PyCampES/python-docs-es
113+
.. _ayuda oficial de GitHub: https://help.github.com/es/github/getting-started-with-github/fork-a-repo
114+
.. _ayuda oficial de GitHub para crear un Pull Request: https://help.github.com/es/github/collaborating-with-issues-and-pull-requests/about-pull-requests
115+
.. _poedit: https://poedit.net/
116+
117+
.. _nuestro canal de Telegram: https://t.me/python_docs_es
118+
.. _Memoria de traducción: https://python-docs-es.readthedocs.io/page/translation-memory.html
119+
.. _lista de issues en GitHub: https://github.com/PyCampES/python-docs-es/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc

.overrides/README.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Overrides
2+
=========
3+
4+
This directory is recursively copied into `cpython/Doc`.
5+
It needs to have the same structure than `cpython/Doc`.
6+
7+
It allows us
8+
9+
- to have our own `CONTRIBUTING.rst` guide
10+
- change the index sidebar with links that are interesting for translators
11+
- etc

.overrides/progress.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
:orphan:
2+
3+
===========================
4+
Progreso de la traducción
5+
===========================
6+
7+
Aquí puedes ver a la lista de todos los archivo de la documentación,
8+
con sus respectivos porcentajes de lo traducido, los párrafos marcados como ``fuzzy``,
9+
y otras estadísticas.
10+
11+
.. note::
12+
13+
Esta lista se actualiza automáticamente cuando Pull Requests se *mergean* a la rama ``3.8``.
14+
15+
.. runblock:: console
16+
17+
$ potodo --offline --path .
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{%- if show_source and has_source and sourcename %}
2+
<div role="note" aria-label="source link">
3+
<h3>{{ _('This Page') }}</h3>
4+
<ul class="this-page-menu">
5+
<li><a href="{{ pathto('bugs') }}">{% trans %}Report a Bug{% endtrans %}</a></li>
6+
<li>
7+
<a href="https://github.com/PyCampES/python-docs-es/blob/{{ version }}/{{ sourcename|replace('.rst.txt', '.po') }}"
8+
rel="nofollow">{{ _('Show Source') }}
9+
</a>
10+
</li>
11+
</ul>
12+
</div>
13+
{%- endif %}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<h3>¡Ayúdanos a traducir!</h3>
2+
<ul>
3+
<li><a href="CONTRIBUTING.html">Guía para contribuir</a></li>
4+
<li><a href="progress.html">Progreso de la traducción</a></li>
5+
</ul>
6+
7+
<h3>Recursos</h3>
8+
<ul>
9+
<li><a href="https://mail.python.org/mailman3/lists/docs-es.python.org/">Lista de correos</a></li>
10+
<li><a href="https://t.me/python_docs_es">Canal de Télegram</a></li>
11+
<li><a href="https://github.com/PyCampES/python-docs-es">Repositorio GitHub</a></li>
12+
</ul>

.overrides/translation-memory.rst

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
:orphan:
2+
3+
=======================
4+
Memoria de traducción
5+
=======================
6+
7+
8+
Esta página contiene la Memoria de Traducción, con todos los términos que hemos ido teniendo dudas,
9+
y coordinamos cuál era la mejor traducción dado el contexto.
10+
11+
Si quieres ver cómo se ha utilizado un término anteriormente, puedes utilizar la herramienta
12+
``find_in_po.py`` que muestra dónde se usó ese término: original y traducción lado a lado:
13+
14+
.. code-block:: text
15+
16+
$ python scripts/find_in_po.py docstring
17+
╒════════════════════════════════════════════════════════════════════════════════════════════════╤═══════════════════════════════════════════════════════════════════════════════════════════════╕
18+
│ The first statement of the function body can optionally be a string literal; this string │ La primera sentencia del cuerpo de la función puede ser opcionalmente una cadena de texto │
19+
│ literal is the function's documentation string, or :dfn:`docstring`. (More about docstrings │ literal; esta es la cadena de texto de documentación de la función, o :dfn:`docstring`. │
20+
│ can be found in the section :ref:`tut-docstrings`.) There are tools which use docstrings to │ (Puedes encontrar más acerca de docstrings en la sección :ref:`tut-docstrings`.). Existen │
21+
│ automatically produce online or printed documentation, or to let the user interactively browse │ herramientas que usan las ``docstrings`` para producir documentación imprimible o disponible │
22+
│ through code; it's good practice to include docstrings in code that you write, so make a habit │ en línea, o para dejar que los usuarios busquen interactivamente a través del código; es una │
23+
│ of it. │ buena práctica incluir ``docstrings`` en el código que escribes, y hacerlo un buen hábito. │
24+
├────────────────────────────────────────────────────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
25+
│ Here is an example of a multi-line docstring:: │ Este es un ejemplo de un ``docstring`` multi-línea:: │
26+
├────────────────────────────────────────────────────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
27+
│ Use docstrings. │ Usar ``docstrings``. │
28+
├────────────────────────────────────────────────────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
29+
30+
31+
Éstos son las palabras que hemos coordinado hasta el momento:
32+
33+
34+
loop
35+
Bucle. ``tutorial/controlflow.po``
36+
37+
handle exception
38+
Gestionar excepción. ``tutorial/inputoutput.po``
39+
40+
docstring
41+
docstring. ``library/idle.po``
42+
43+
path
44+
Ruta. ``glossary.po``
45+
46+
named tuple.
47+
tupla nombrada ``glossary.po``
48+
49+
bytecodes
50+
queda igual ``glossary.po``
51+
52+
deallocated
53+
desalojable ``glossary.po``
54+
55+
callable
56+
invocable ``glossary.po``
57+
58+
built-in
59+
incorporada ``glossary.po``
60+
61+
mapping
62+
mapeo ``glossary.po``
63+
64+
underscore
65+
guión bajo ``glossary.po``
66+
67+
awaitable
68+
aguardable ``glossary``

.overrides/upgrade-python-version.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
:orphan:
2+
3+
=======================================
4+
How to update to a new Python version
5+
=======================================
6+
7+
We are currently in branch 3.7, and we want to update the strings from 3.8.
8+
9+
10+
#. Fetch the `lastet commit of 3.8 branch <https://github.com/python/cpython/commit/70fe95cdc9ac1b00d4f86b7525dca80caf7003e1>`_::
11+
12+
cd cpython/
13+
git fetch --depth 1 origin 70fe95cdc9ac1b00d4f86b7525dca80caf7003e1
14+
15+
#. Checkout that commit locally::
16+
17+
git checkout 70fe95cdc9ac1b00d4f86b7525dca80caf7003e1
18+
19+
#. Clean possible garbage (form previous builds)::
20+
21+
rm -rf _build ../python-docs-es-pot cpython/Doc/CONTRIBUTING.rst cpython/Doc/upgrade-python-version.rst
22+
23+
#. Create the .po files from the new source code. This will generate all the .po files for version 3.8::
24+
25+
SPHINX_GETTEXT=True sphinx-build -j auto -b gettext -d _build/doctrees . ../python-docs-es-pot
26+
27+
.. note::
28+
29+
In `../python-docs-es-pot` directory, we will have the new .pot files with new strings from 3.8 branch.
30+
All these strings will be *unstranslated* at this point.
31+
32+
#. Now, we update our translated files form the source language (English) with new strings::
33+
34+
sphinx-intl update --language es --pot-dir ../python-docs-es-pot --locale-dir cpython/locales/
35+
36+
#. Remove `python-docs-cpython/` prefix added by `sphinx-build` to avoid clazy diffs::
37+
38+
sed -i **/*.po -e "s|python-docs-es/cpython/||g"
39+
40+
#. Pass `powrap` to make the column widths consistent::
41+
42+
powrap --modified

.pre-commit-config.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,10 @@ repos:
99
rev: pre-commit
1010
hooks:
1111
- id: pospell
12-
args: ['--personal-dict', 'dict', '--modified', '--language', 'es_ES']
12+
args: ['--personal-dict', 'dict', '--modified', '--language', 'es_ES', '--language', 'es_AR']
13+
14+
- repo: https://github.com/pre-commit/pre-commit-hooks
15+
rev: v2.5.0
16+
hooks:
17+
- id: file-contents-sorter
18+
files: dict

.readthedocs.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,17 @@ version: 2
99
sphinx:
1010
configuration: conf.py
1111

12+
build:
13+
image: latest
14+
1215
# Optionally set the version of Python and requirements required to build your docs
1316
python:
14-
version: 3.7
17+
version: 3.8
1518
install:
1619
- requirements: requirements.txt
1720

21+
formats:
22+
- pdf
23+
1824
submodules:
1925
include: all

.travis.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
language: python
2-
dist: xenial
3-
python: 3.7
2+
dist: bionic
3+
python: 3.8
44
before_install:
55
- sudo apt-get update
66
- sudo apt-get install -y hunspell hunspell-es
77
install:
8-
- pip install pospell "powrap>=0.3.0"
8+
- make setup
99
- pospell --version
1010
- powrap --version
1111
script:
1212
- powrap --check --quiet **/*.po
13-
- pospell -p dict -l es_ES **/*.po
13+
- pospell -p dict -l es_AR -l es_ES **/*.po
1414
- make build
15+
branches:
16+
only:
17+
- /^3\.\d$/

0 commit comments

Comments
 (0)