File tree 5 files changed +51
-1
lines changed
5 files changed +51
-1
lines changed File renamed without changes.
Original file line number Diff line number Diff line change
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 number Diff line number Diff line change
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 number Diff line number Diff line change
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 >
Original file line number Diff line number Diff line change 33
33
34
34
os .system ('mkdir -p cpython/locales/es/' )
35
35
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 } ' )
37
52
38
53
gettext_compact = False
39
54
locale_dirs = ['../locales' , 'cpython/locales' ] # relative to the sourcedir
You can’t perform that action at this time.
0 commit comments