Cleanup docs and add i18n wrappers (#7354)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Nate Prewitt · committed by GitHub · parent ef439eb · Browse files · 6 files·+49 added−328 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
6 files+49 added−328 removed
- other:+49 added−328 removed
Provenance
- Commit
185f587- Tree
0e9b19c- Author
Nate Prewitt <nate.prewitt@gmail.com>- Committer
GitHub <noreply@github.com>- Parent
ef439eb
6 files changed+49 added−328 removed
modified:docs/_static/custom.css+8 added-172 removed
123125673491011121314151617181920562223247826272891011121330313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177body > div.document > div.sphinxsidebar > div > form > table > tbody > tr:nth-child(2) > td > select { width: 100%!important;}img.logo {margin-left: -20px!important;}
#python27 > a { color: white;}div#searchbox h3 {text-transform: capitalize;}
/* Carbon by BuySellAds */#carbonads { display: block; overflow: hidden; margin: 1.5em 0 2em; padding: 1em; border: solid 1px #cccccc; border-radius: 2px; background-color: #eeeeee; text-align: center; line-height: 1.5;}div.document {width: 1008px;}
#carbonads a { border-bottom: 0;}div.highlight pre {padding: 11px 14px;}
#carbonads span { display: block; overflow: hidden;@media screen and (max-width: 1008px) { div.sphinxsidebar {display: none;} div.document {width: 100%!important;} div.highlight pre {margin-right: -30px;}}
.carbon-img { display: block; margin: 0 auto 1em; text-align: center;}
.carbon-text { display: block; margin-bottom: 1em;}
.carbon-poweredby { display: block; text-transform: uppercase; letter-spacing: 1px; font-size: 10px; line-height: 1;}
/* Native CPC by BuySellAds */
#native-ribbon #_custom_ { position: fixed; right: 0; bottom: 0; left: 0; box-shadow: 0 -1px 4px 1px hsla(0, 0%, 0%, .15); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif; transition: all .25s ease-in-out; transform: translateY(calc(100% - 35px));
flex-flow: column nowrap;}
#native-ribbon #_custom_:hover { transform: translateY(0);}
.native-img { margin-right: 20px; max-height: 50px; border-radius: 3px;}
.native-sponsor { margin: 10px 20px; text-align: center; text-transform: uppercase; letter-spacing: .5px; font-size: 12px; transition: all .3s ease-in-out; transform-origin: left;}
#native-ribbon #_custom_:hover .native-sponsor { margin: 0 20px; opacity: 0; transform: scaleY(0);}
.native-flex { display: flex; padding: 10px 20px 25px; text-decoration: none;
flex-flow: row nowrap; justify-content: center; align-items: center;}
.native-main { display: flex;
flex-flow: row nowrap; align-items: center;}
.native-details { display: flex; margin-right: 30px;
flex-flow: column nowrap;}
.native-company { margin-bottom: 4px; text-transform: uppercase; letter-spacing: 2px; font-size: 10px;}
.native-desc { letter-spacing: 1px; font-weight: 300; font-size: 14px; line-height: 1.4;}
.native-cta { padding: 10px 14px; border-radius: 3px; box-shadow: 0 6px 13px 0 hsla(0, 0%, 0%, .15); text-transform: uppercase; white-space: nowrap; letter-spacing: 1px; font-weight: 400; font-size: 12px; transition: all .3s ease-in-out; transform: translateY(-1px);}
.native-cta:hover { box-shadow: none; transform: translateY(1px);}
@media only screen and (min-width: 320px) and (max-width: 759px) { .native-flex { padding: 5px 5px 15px; flex-direction: column;
flex-wrap: wrap; }
.native-img { margin: 0; display: none; }
.native-details { margin: 0; }
.native-main { flex-direction: column; text-align: left;
flex-wrap: wrap; align-content: center; }
.native-cta { display: none; }}deleted:docs/_templates/hacks.html-80 removed
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980<!-- Alabaster (krTheme++) Hacks -->
<!-- CSS Adjustments (I'm very picky.) --><style type="text/css">
/* Rezzy requires precise alignment. */ img.logo {margin-left: -20px!important;}
/* "Quick Search" should be capitalized. */ div#searchbox h3 {text-transform: capitalize;}
/* Make the document a little wider, less code is cut-off. */ div.document {width: 1008px;}
/* Much-improved spacing around code blocks. */ div.highlight pre {padding: 11px 14px;}
/* Remain Responsive! */ @media screen and (max-width: 1008px) { div.sphinxsidebar {display: none;} div.document {width: 100%!important;}
/* Have code blocks escape the document right-margin. */ div.highlight pre {margin-right: -30px;} }</style>
<!-- Native CPC by BuySellAds -->
<script type="text/javascript" src="//m.servedby-buysellads.com/monetization.js"></script>
<div id="native-ribbon"></div>
<script>_bsa.init('custom', 'CK7D62JU', 'placement:pythonrequestsorg', { target: '#native-ribbon', template: `<div class="native-sponsor">Sponsored by ##company## — Learn More</div> <a href="##link##" class="native-flex"> <style> #native-ribbon #_custom_ { background: linear-gradient(-30deg, ##backgroundColor##E5, ##backgroundColor##E5 45%, ##backgroundColor## 45%) #fff; }
.native-details, .native-sponsor, .native-bsa { color: ##textColor## !important; }
.native-details:hover { color: ##textColorHover## !important; }
.native-cta { color: ##ctaTextColor##; background-color: ##ctaBackgroundColor##; }
.native-cta:hover { color: ##ctaTextColorHover##; background-color: ##ctaBackgroundColorHover##; } </style> <div class="native-main"> <img class="native-img" src="##logo##"> <div class="native-details"> <span class="native-company">##title##</span> <span class="native-desc">##description##</span> </div> </div> <span class="native-cta">##callToAction##</span> </a></div>` } );</script>added:docs/_templates/sidebar.html+33 added
123456789101112131415161718192021222324252627282930313233<p class="logo"> <a href="{{ pathto(root_doc) }}"> <img class="logo" src="{{ pathto('_static/requests-sidebar.png', 1) }}" alt="{{ _('Requests logo') }}" /> </a></p>
<p> <iframe src="https://ghbtns.com/github-btn.html?user=psf&repo=requests&type=watch&count=true&size=large" allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe></p>
<p> {{ _('Requests is an elegant and simple HTTP library for Python, built for human beings.') }}</p>
<h3>{{ _('Useful Links') }}</h3><ul> <li><a href="{{ pathto('user/quickstart') }}">{{ _('Quickstart') }}</a></li> <li><a href="{{ pathto('user/advanced') }}">{{ _('Advanced Usage') }}</a></li> <li><a href="{{ pathto('api') }}">{{ _('API Reference') }}</a></li> <li><a href="{{ pathto('community/updates') + '#release-history' }}">{{ _('Release History') }}</a></li> <li><a href="{{ pathto('dev/contributing') }}">{{ _('Contributors Guide') }}</a></li>
<p></p>
<li><a href="{{ pathto('community/recommended') }}">{{ _('Recommended Packages and Extensions') }}</a></li>
<p></p>
<li><a href="https://github.com/psf/requests">{{ _('Requests @ GitHub') }}</a></li> <li><a href="https://pypi.org/project/requests/">{{ _('Requests @ PyPI') }}</a></li> <li><a href="https://github.com/psf/requests/issues">{{ _('Issue Tracker') }}</a></li></ul>deleted:docs/_templates/sidebarintro.html-37 removed
12345678910111213141516171819202122232425262728293031323334353637<p class="logo"> <a href="{{ pathto(master_doc) }}"> <img class="logo" src="{{ pathto('_static/requests-sidebar.png', 1) }}" alt="Requests logo" /> </a></p>
<p> <iframe src="https://ghbtns.com/github-btn.html?user=psf&repo=requests&type=watch&count=true&size=large" allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe></p>
<p> Requests is an elegant and simple HTTP library for Python, built for human beings.</p>
<h3>Useful Links</h3><ul> <li><a href="{{ pathto('user/quickstart') }}">Quickstart</a></li> <li><a href="{{ pathto('user/advanced') }}">Advanced Usage</a></li> <li><a href="{{ pathto('api') }}">API Reference</a></li> <li><a href="{{ pathto('community/updates') + '#release-history' }}">Release History</a></li> <li><a href="{{ pathto('dev/contributing') }}">Contributors Guide</a></li>
<p></p>
<li><a href="{{ pathto('community/recommended') }}">Recommended Packages and Extensions</a></li>
<p></p>
<li><a href="https://github.com/psf/requests">Requests @ GitHub</a></li> <li><a href="https://pypi.org/project/requests/">Requests @ PyPI</a></li> <li><a href="https://github.com/psf/requests/issues">Issue Tracker</a></li></ul>
<div id="native-ribbon"></div>deleted:docs/_templates/sidebarlogo.html-30 removed
123456789101112131415161718192021222324252627282930<p> <iframe src="https://ghbtns.com/github-btn.html?user=psf&repo=requests&type=watch&count=true&size=large" allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe></p>
<p> Requests is an elegant and simple HTTP library for Python, built for human beings. You are currently looking at the documentation of the development release.</p>
<h3>Useful Links</h3><ul> <li><a href="{{ pathto('user/quickstart') }}">Quickstart</a></li> <li><a href="{{ pathto('user/advanced') }}">Advanced Usage</a></li> <li><a href="{{ pathto('api') }}">API Reference</a></li> <li><a href="{{ pathto('community/updates') + '#release-history' }}">Release History</a></li> <li><a href="{{ pathto('dev/contributing') }}">Contributors Guide</a></li>
<p></p>
<li><a href="{{ pathto('community/recommended') }}">Recommended Packages and Extensions</a></li>
<p></p>
<li><a href="https://github.com/psf/requests">Requests @ GitHub</a></li> <li><a href="https://pypi.org/project/requests/">Requests @ PyPI</a></li> <li><a href="https://github.com/psf/requests/issues">Issue Tracker</a></li></ul>
modified:docs/conf.py+8 added-9 removed
52 unmodified lines53 # The encoding of source files.54 # source_encoding = 'utf-8-sig'55 56 # The master toctree document.57-master_doc = "index"57+root_doc = "index"58 59 # General information about the project.60 project = u"Requests"61-copyright = u'MMXVIX. A Kenneth Reitz Project'61+copyright = u"Kenneth Reitz and contributors"62 author = u"Kenneth Reitz"63 64 # The version info for the project you're documenting, acts as replacement for65 # |version| and |release|, also used in various other places throughout the59 unmodified lines125 # further. For a list of options available for each theme, see the126 # documentation.127 html_theme_options = {128 "show_powered_by": False,129- "github_user": "requests",129+ "github_user": "psf",130 "github_repo": "requests",131 "github_banner": True,132 "show_related": False,133 "note_bg": "#FFF59C",37 unmodified lines171 html_use_smartypants = False172 173 # Custom sidebar templates, maps document names to template names.174 html_sidebars = {175- "index": ["sidebarintro.html", "sourcelink.html", "searchbox.html", "hacks.html"],175+ "index": ["sidebar.html", "sourcelink.html", "searchbox.html"],176 "**": [177- "sidebarlogo.html",177+ "sidebar.html",178 "localtoc.html",179 "relations.html",180 "sourcelink.html",181 "searchbox.html",182- "hacks.html",182 ],183 }184 185 # Additional templates that should be rendered to pages, maps page names to59 unmodified lines245 # Grouping the document tree into LaTeX files. List of tuples246 # (source start file, target name, title,247 # author, documentclass [howto, manual, or own class]).248 latex_documents = [250- (master_doc, "Requests.tex", u"Requests Documentation", u"Kenneth Reitz", "manual")249+ (root_doc, "Requests.tex", u"Requests Documentation", u"Kenneth Reitz", "manual")250 ]251 252 # The name of an image file (relative to this directory) to place at the top of253 # the title page.19 unmodified lines273 # -- Options for manual page output ---------------------------------------274 275 # One entry per manual page. List of tuples276 # (source start file, name, description, authors, manual section).278-man_pages = [(master_doc, "requests", u"Requests Documentation", [author], 1)]277+man_pages = [(root_doc, "requests", u"Requests Documentation", [author], 1)]278 279 # If true, show URL addresses after external links.280 # man_show_urls = False281 4 unmodified lines286 # (source start file, target name, title, author,287 # dir menu entry, description, category)288 texinfo_documents = [289 (291- master_doc,290+ root_doc,291 "Requests",292 u"Requests Documentation",293 author,294 "Requests",91 unmodified lines