8000 Merge branch '3.7' into inputoutput · python/python-docs-es@4850caa · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4850caa

Browse files
authored
Merge branch '3.7' into inputoutput
2 parents e699e3f + 2cfd151 commit 4850caa

File tree

8 files changed

+376
-12
lines changed

8 files changed

+376
-12
lines changed

CONTRIBUTING.rst renamed to .overrides/CONTRIBUTING.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ Actualmente se puede colaborar utilizando una de las dos siguientes formas que:
1818
Desde GitHub
1919
------------
2020

21-
#. Crea un fork del repositorio.
21+
#. Crea un fork del repositorio_.
22+
23+
.. _repositorio: https://github.com/PyCampES/python-docs-es
2224

2325
.. note::
2426

@@ -38,6 +40,10 @@ Desde GitHub
3840

3941
git remote add upstream https://github.com/pycampes/python-docs-es.git
4042

43+
#. Crea una branch nueva en base al artículo en el que vayas a trabajar.
44+
45+
git checkout -b traduccion_glosario
46+
4147
#. Mira que archivo necesita ser traducido. El siguiente comando te mostrará una lista de archivos y los porcentajes traducidos.
4248
Elige uno que no esté completo::
4349

@@ -48,7 +54,7 @@ Desde GitHub
4854
#. Cuando hayas terminado tu sesión, debes guardar tus cambios y enviarlos a GitHub de nuevo::
4955

5056
git commit -am 'Traducido archivo {nombre de archivo}'
51-
git push origin update-translation
57+
git push origin traduccion_glosario
5258

5359
#. Luego ve a tu página de GitHub y propone hacer un Pull Request
5460

.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
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: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<h3>¡Ayúdanos a traducir!</h3>
2+
<ul>
3+
<li><a href="CONTRIBUTING.html">Guía para contribuir</a></li>
4+
</ul>
5+
6+
<h3>Recursos</h3>
7+
<ul>
8+
<li><a href="https://mail.python.org/mailman3/lists/docs-es.python.org/">Lista de correos</a></li>
9+
<li><a href="https://t.me/python_docs_es">Canal de Télegram</a></li>
10+
<li><a href="https://github.com/PyCampES/python-docs-es">Repositorio GitHub</a></li>
11+
</ul>

conf.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,22 @@
3333

3434
os.system('mkdir -p cpython/locales/es/')
3535
os.system('ln -nfs `pwd` cpython/locales/es/LC_MESSAGES')
36-
os.system('ln -nfs `pwd`/CONTRIBUTING.rst cpython/Doc/CONTRIBUTING.rst')
36+
37+
38+
# Override all the files from ``.overrides`` directory
39+
import glob
40+
for root, dirs, files in os.walk('.overrides'):
41+
for fname in files:
42+
if fname == 'README.rst' and root == '.overrides':
43+
continue
44+
destroot = root.replace('.overrides', '').lstrip('/')
45+
outputdir = os.path.join(
46+
'cpython',
47+
'Doc',
48+
destroot,
49+
fname,
50+
)
51+
os.system(f'ln -nfs `pwd`/{root}/{fname} {outputdir}')
3752

3853
gettext_compact = False
3954
locale_dirs = ['../locales', 'cpython/locales'] # relative to the sourcedir
@@ -50,8 +65,8 @@ def add_contributing_banner(app, doctree):
5065
from docutils import nodes, core
5166

5267
message = '¡Ayúdanos a traducir la documentación oficial de Python al Español! ' \
53-
f'Puedes encontrar más información en `Como contribuir </es/{version}/CONTRIBUTING.html>`_ ' \
54-
'y así ayudarnos a acercar Python a más personas de habla hispana.'
68+
f'Puedes encontrar más información en `Como contribuir </es/{version}/CONTRIBUTING.html>`_. ' \
69+
'Ayuda a acercar Python a más personas de habla hispana.'
5570

5671
paragraph = core.publish_doctree(message)[0]
5772
banner = nodes.warning(ids=['contributing-banner'])

0 commit comments

Comments
 (0)
0