File tree 1 file changed +23
-0
lines changed
1 file changed +23
-0
lines changed 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
37
38
gettext_compact = False
38
39
locale_dirs = ['../locales' , 'cpython/locales' ] # relative to the sourcedir
39
40
40
41
def setup (app ):
42
+
43
+ def add_contributing_banner (app , doctree , fromdocname ):
44
+ """
45
+ Insert a banner at the top of the index.
46
+
47
+ This way, we can easily communicate people to help with the translation,
48
+ pointing them to different resources.
49
+ """
50
+
51
+ message = 'Ayúdanos a traducir la documentación de Python al Español. Más información en :doc:`contributing`'
52
+
53
+ from docutils import nodes , core
54
+ paragraph = core .publish_doctree (message )[0 ]
55
+
56
+ banner = nodes .warning (ids = ['contributing-banner' ])
57
+ banner .append (paragraph )
58
+
59
+ for document in doctree .traverse (nodes .document ):
60
+ document .insert (0 , banner )
61
+
41
62
# Change the sourcedir programmatically because Read the Docs always call it with `.`
42
63
app .srcdir = 'cpython/Doc'
64
+
65
+ app .connect ('doctree-resolved' , add_contributing_banner )
You can’t perform that action at this time.
0 commit comments