Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Add useful resources to the index page#54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
raulcd merged 3 commits into3.7fromresources-index
May 4, 2020
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
11 changes: 11 additions & 0 deletions.overrides/README.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
Overrides
=========

This directory is recursively copied into `cpython/Doc`.
It needs to have the same structure than `cpython/Doc`.

It allows us

- to have our own `CONTRIBUTING.rst` guide
- change the index sidebar with links that are interesting for translators
- etc
13 changes: 13 additions & 0 deletions.overrides/tools/templates/customsourcelink.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
{%- if show_source and has_source and sourcename %}
<div role="note" aria-label="source link">
<h3>{{ _('This Page') }}</h3>
<ul class="this-page-menu">
<li><a href="{{ pathto('bugs') }}">{% trans %}Report a Bug{% endtrans %}</a></li>
<li>
<a href="https://github.com/PyCampES/python-docs-es/blob/{{ version }}/{{ sourcename|replace('.rst.txt', '.po') }}"
rel="nofollow">{{ _('Show Source') }}
</a>
</li>
</ul>
</div>
{%- endif %}
11 changes: 11 additions & 0 deletions.overrides/tools/templates/indexsidebar.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
<h3>¡Ayúdanos a traducir!</h3>
<ul>
<li><a href="CONTRIBUTING.html">Guía para contribuir</a></li>
</ul>

<h3>Recursos</h3>
<ul>
<li><a href="https://mail.python.org/mailman3/lists/docs-es.python.org/">Lista de correos</a></li>
<li><a href="https://t.me/python_docs_es">Canal de Télegram</a></li>
<li><a href="https://github.com/PyCampES/python-docs-es">Repositorio GitHub</a></li>
</ul>
17 changes: 16 additions & 1 deletionconf.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -33,7 +33,22 @@

os.system('mkdir -p cpython/locales/es/')
os.system('ln -nfs `pwd` cpython/locales/es/LC_MESSAGES')
os.system('ln -nfs `pwd`/CONTRIBUTING.rst cpython/Doc/CONTRIBUTING.rst')


# Override all the files from ``.overrides`` directory
import glob
for root, dirs, files in os.walk('.overrides'):
for fname in files:
if fname == 'README.rst' and root == '.overrides':
continue
destroot = root.replace('.overrides', '').lstrip('/')
outputdir = os.path.join(
'cpython',
'Doc',
destroot,
fname,
)
os.system(f'ln -nfs `pwd`/{root}/{fname} {outputdir}')

gettext_compact = False
locale_dirs = ['../locales', 'cpython/locales'] # relative to the sourcedir
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp