mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #10048 from pradyunsg/change-heading-anchor-tooltip
Change "headline" to "heading"
This commit is contained in:
commit
3cb680acb6
@ -196,7 +196,7 @@ var Documentation = {
|
||||
$('div[id] > :header:first').each(function() {
|
||||
$('<a class="headerlink">\u00B6</a>').
|
||||
attr('href', '#' + this.id).
|
||||
attr('title', _('Permalink to this headline')).
|
||||
attr('title', _('Permalink to this heading')).
|
||||
appendTo(this);
|
||||
});
|
||||
$('dt[id]').each(function() {
|
||||
|
@ -434,12 +434,12 @@ class HTMLTranslator(SphinxTranslator, BaseTranslator):
|
||||
node.parent.hasattr('ids') and node.parent['ids']):
|
||||
# add permalink anchor
|
||||
if close_tag.startswith('</h'):
|
||||
self.add_permalink_ref(node.parent, _('Permalink to this headline'))
|
||||
self.add_permalink_ref(node.parent, _('Permalink to this heading'))
|
||||
elif close_tag.startswith('</a></h'):
|
||||
self.body.append('</a><a class="headerlink" href="#%s" ' %
|
||||
node.parent['ids'][0] +
|
||||
'title="%s">%s' % (
|
||||
_('Permalink to this headline'),
|
||||
_('Permalink to this heading'),
|
||||
self.config.html_permalinks_icon))
|
||||
elif isinstance(node.parent, nodes.table):
|
||||
self.body.append('</span>')
|
||||
|
@ -389,12 +389,12 @@ class HTML5Translator(SphinxTranslator, BaseTranslator):
|
||||
node.parent.hasattr('ids') and node.parent['ids']):
|
||||
# add permalink anchor
|
||||
if close_tag.startswith('</h'):
|
||||
self.add_permalink_ref(node.parent, _('Permalink to this headline'))
|
||||
self.add_permalink_ref(node.parent, _('Permalink to this heading'))
|
||||
elif close_tag.startswith('</a></h'):
|
||||
self.body.append('</a><a class="headerlink" href="#%s" ' %
|
||||
node.parent['ids'][0] +
|
||||
'title="%s">%s' % (
|
||||
_('Permalink to this headline'),
|
||||
_('Permalink to this heading'),
|
||||
self.config.html_permalinks_icon))
|
||||
elif isinstance(node.parent, nodes.table):
|
||||
self.body.append('</span>')
|
||||
|
@ -1664,7 +1664,7 @@ def test_html_permalink_icon(app):
|
||||
|
||||
assert ('<h1>The basic Sphinx documentation for testing<a class="headerlink" '
|
||||
'href="#the-basic-sphinx-documentation-for-testing" '
|
||||
'title="Permalink to this headline"><span>[PERMALINK]</span></a></h1>' in content)
|
||||
'title="Permalink to this heading"><span>[PERMALINK]</span></a></h1>' in content)
|
||||
|
||||
|
||||
@pytest.mark.sphinx('html', testroot='html_signaturereturn_icon')
|
||||
|
Loading…
Reference in New Issue
Block a user