Skip to content

Commit e910122

Browse files
authored
Merge branch '3.8' into traduccion-faqprogramming
2 parents 0abf9fe + 54b405b commit e910122

File tree

504 files changed

+50241
-32667
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

+50241
-32667
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 rama 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 asteriscos)
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+
Previsualizar los cambios
85+
-------------------------
86+
87+
Hay dos formas de visualizar, junto con el resultado final de la documentación, los cambios que has hecho.
88+
89+
Read the Docs
90+
`````````````
91+
92+
Una vez que hayas hecho un Pull Request en GitHub, este mostrará al final de página una sección de "check".
93+
Allí debería haber uno que diga ``docs/readthedocs.org:python-docs-es`` y al lado un link de "Details".
94+
95+
Haciendo click en ese link verás 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 resultado 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: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
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+
Términos y bigramas
32+
===================
33+
34+
Éstos son las palabras que hemos coordinado hasta el momento:
35+
36+
37+
awaitable
38+
aguardable ``glossary``
39+
40+
built-in
41+
incorporada ``glossary.po``
42+
43+
built-in exceptions
44+
excepciones predefinidas ``tutorial/errors.po``
45+
46+
bytecodes
47+
queda igual ``glossary.po``
48+
49+
callable
50+
invocable ``glossary.po``
51+
52+
deallocated
53+
desalojable ``glossary.po``
54+
55+
docstring
56+
docstring. ``library/idle.po``
57+
58+
handler
59+
gestor ``tutorial/errors.po``
60+
61+
handle exception
62+
Gestionar excepción. ``tutorial/inputoutput.po``
63+
64+
loop
65+
Bucle. ``tutorial/controlflow.po``
66+
67+
mapping
68+
mapeo ``glossary.po``
69+
70+
named tuple.
71+
tupla nombrada ``glossary.po``
72+
73+
path
74+
Ruta. ``glossary.po``
75+
76+
realease
77+
version ``HOWTO``
78+
79+
underscore
80+
guión bajo ``glossary.po``
81+
82+
83+
Reglas de estilo
84+
================
85+
86+
Estas son las reglas de estilo que hemos convenido hasta el momento:
87+
88+
* En títulos [de sección] sólo se usará mayúscula en la primera palabra salvo nombre propios,
89+
en contraste con el inglés, que lo hace en todas las palabras principales (conectores no).
90+
91+
Referencia: https://www.rae.es/dpd/may%C3%BAsculas 4.17
92+
93+
Ejemplo: ``tutorial/errors.po``
94+
`en`: Predefined Clean-up Actions
95+
`es`: Acciones de limpieza predefinidas
96+
97+
* Se priorizará la segunda persona del singular no formal (tu/vos) frente al formal (usted).
98+
Sin embargo, allí donde sea posible, se usarán formas impersonales (con se), ya que son comunes a
99+
todas las variantes del español.
100+
101+
Referencia: https://www.rae.es/dpd/se punto 2
102+
103+
Ejemplo: ``tutorial/errors.po``
104+
`en`: Look at the following example, [...]
105+
`es`: Véase el siguiente ejemplo, [...]
106+
107+
* En general se evitará la traducción literal de la voz pasiva del original en inglés y se usará
108+
el impersonal (pasiva refleja) en la traducción al español.
109+
110+
Referencia: https://www.rae.es/dpd/se punto 2
111+
112+
Ejemplo: ``tutorial/errors.po``
113+
`en`: [...] where the error was detected.
114+
`es`: [...] donde se detectó el error.
115+
Nota cf. "fue detectado"

.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

0 commit comments

Comments
 (0)