mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
[misc] update wording of `versionadded
to
Added in [...]
` (#12184)
Motivated by the community feedback, the wording of ``versionadded`` is changed from ``New in [...]`` to ``Added in [...]``.
This commit is contained in:
parent
17a84a6443
commit
db4939f007
@ -57,6 +57,11 @@ Features added
|
|||||||
.. _OSC 8: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
|
.. _OSC 8: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
|
||||||
.. _groff: https://lists.gnu.org/archive/html/groff/2021-10/msg00000.html
|
.. _groff: https://lists.gnu.org/archive/html/groff/2021-10/msg00000.html
|
||||||
|
|
||||||
|
* #11015: :rst:dir:`versionadded` wording changes from ``New in [...]``
|
||||||
|
to ``Added in [...]``.
|
||||||
|
Patch by Bénédikt Tran.
|
||||||
|
|
||||||
|
|
||||||
Bugs fixed
|
Bugs fixed
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ if TYPE_CHECKING:
|
|||||||
|
|
||||||
|
|
||||||
versionlabels = {
|
versionlabels = {
|
||||||
'versionadded': _('New in version %s'),
|
'versionadded': _('Added in version %s'),
|
||||||
'versionchanged': _('Changed in version %s'),
|
'versionchanged': _('Changed in version %s'),
|
||||||
'deprecated': _('Deprecated since version %s'),
|
'deprecated': _('Deprecated since version %s'),
|
||||||
'versionremoved': _('Removed in version %s'),
|
'versionremoved': _('Removed in version %s'),
|
||||||
|
@ -110,7 +110,7 @@ def get_full_module_name(node: Node) -> str:
|
|||||||
def repr_domxml(node: Node, length: int = 80) -> str:
|
def repr_domxml(node: Node, length: int = 80) -> str:
|
||||||
"""
|
"""
|
||||||
return DOM XML representation of the specified node like:
|
return DOM XML representation of the specified node like:
|
||||||
'<paragraph translatable="False"><inline classes="versionmodified">New in version...'
|
'<paragraph translatable="False"><inline classes="versionadded">Added in version...'
|
||||||
|
|
||||||
:param nodes.Node node: target node
|
:param nodes.Node node: target node
|
||||||
:param int length:
|
:param int length:
|
||||||
|
@ -9,7 +9,7 @@ def test_build(app):
|
|||||||
|
|
||||||
# TODO: Use better checking of html content
|
# TODO: Use better checking of html content
|
||||||
htmltext = (app.outdir / 'changes.html').read_text(encoding='utf8')
|
htmltext = (app.outdir / 'changes.html').read_text(encoding='utf8')
|
||||||
assert 'New in version 0.6: Some funny stuff.' in htmltext
|
assert 'Added in version 0.6: Some funny stuff.' in htmltext
|
||||||
assert 'Changed in version 0.6: Even more funny stuff.' in htmltext
|
assert 'Changed in version 0.6: Even more funny stuff.' in htmltext
|
||||||
assert 'Deprecated since version 0.6: Boring stuff.' in htmltext
|
assert 'Deprecated since version 0.6: Boring stuff.' in htmltext
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ def tail_check(check):
|
|||||||
# abbreviations
|
# abbreviations
|
||||||
('markup.html', ".//abbr[@title='abbreviation']", '^abbr$'),
|
('markup.html', ".//abbr[@title='abbreviation']", '^abbr$'),
|
||||||
# version stuff
|
# version stuff
|
||||||
('markup.html', ".//div[@class='versionadded']/p/span", 'New in version 0.6: '),
|
('markup.html', ".//div[@class='versionadded']/p/span", 'Added in version 0.6: '),
|
||||||
('markup.html', ".//div[@class='versionadded']/p/span",
|
('markup.html', ".//div[@class='versionadded']/p/span",
|
||||||
tail_check('First paragraph of versionadded')),
|
tail_check('First paragraph of versionadded')),
|
||||||
('markup.html', ".//div[@class='versionchanged']/p/span",
|
('markup.html', ".//div[@class='versionchanged']/p/span",
|
||||||
|
@ -967,7 +967,7 @@ def test_html_versionchanges(app):
|
|||||||
assert expect1 == matched_content
|
assert expect1 == matched_content
|
||||||
|
|
||||||
expect2 = (
|
expect2 = (
|
||||||
"""<p><span class="versionmodified added">New in version 1.0: </span>"""
|
"""<p><span class="versionmodified added">Added in version 1.0: </span>"""
|
||||||
"""THIS IS THE <em>FIRST</em> PARAGRAPH OF VERSIONADDED.</p>\n""")
|
"""THIS IS THE <em>FIRST</em> PARAGRAPH OF VERSIONADDED.</p>\n""")
|
||||||
matched_content = get_content(result, "versionadded")
|
matched_content = get_content(result, "versionadded")
|
||||||
assert expect2 == matched_content
|
assert expect2 == matched_content
|
||||||
|
Loading…
Reference in New Issue
Block a user