[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:
Bénédikt Tran 2024-04-05 13:32:55 +02:00 committed by GitHub
parent 17a84a6443
commit db4939f007
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 10 additions and 5 deletions

View File

@ -57,6 +57,11 @@ Features added
.. _OSC 8: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
.. _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
----------

View File

@ -20,7 +20,7 @@ if TYPE_CHECKING:
versionlabels = {
'versionadded': _('New in version %s'),
'versionadded': _('Added in version %s'),
'versionchanged': _('Changed in version %s'),
'deprecated': _('Deprecated since version %s'),
'versionremoved': _('Removed in version %s'),

View File

@ -110,7 +110,7 @@ def get_full_module_name(node: Node) -> str:
def repr_domxml(node: Node, length: int = 80) -> str:
"""
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 int length:

View File

@ -9,7 +9,7 @@ def test_build(app):
# TODO: Use better checking of html content
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 'Deprecated since version 0.6: Boring stuff.' in htmltext

View File

@ -113,7 +113,7 @@ def tail_check(check):
# abbreviations
('markup.html', ".//abbr[@title='abbreviation']", '^abbr$'),
# 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",
tail_check('First paragraph of versionadded')),
('markup.html', ".//div[@class='versionchanged']/p/span",

View File

@ -967,7 +967,7 @@ def test_html_versionchanges(app):
assert expect1 == matched_content
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""")
matched_content = get_content(result, "versionadded")
assert expect2 == matched_content