Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update wording of versionadded to neutral Added in [...] instead of New in [...]. #12184

Merged
merged 6 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------

Expand Down
2 changes: 1 addition & 1 deletion sphinx/domains/changeset.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@


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'),
Expand Down
2 changes: 1 addition & 1 deletion sphinx/util/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_builders/test_build_changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/test_builders/test_build_html_5_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def checker(nodes):
# 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",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_intl/test_intl.py
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ def get_content(result, name):
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
Expand Down