Skip to content

Commit 2cfd151

Browse files
authored
Merge pull request #54 from PyCampES/resources-index
Add useful resources to the index page
2 parents 8da9c96 + 8fe9024 commit 2cfd151

File tree

5 files changed

+51
-1
lines changed

5 files changed

+51
-1
lines changed
File renamed without changes.

.overrides/README.rst

+11
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
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 %}
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

+16-1
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

0 commit comments

Comments
 (0)