This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Untranslatable link text in whatsnew/3.10
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.11, Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, kj, mdk, miss-islington, rffontenelle
Priority: normal Keywords: patch

Created on 2021-12-19 10:22 by rffontenelle, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 30199 merged rffontenelle, 2021-12-19 10:29
PR 30201 merged miss-islington, 2021-12-19 14:06
PR 30236 merged rffontenelle, 2021-12-23 08:19
Messages (4)
msg408889 - (view) Author: Rafael Fontenelle (rffontenelle) * Date: 2021-12-19 10:22
The following string can be found in What's New in Python 3.10 source file (Doc/whatsnew/3.10.rst):

> For major changes, see `New Features Related to Type Hints`_.

where "`New Features Related to Type Hints`_" is a link to a section in the very same page with this name.

The issue with this link text is that translators should translate it (in python-doc organization in Transifex) but warning as errors will pop up if translated. For example, in Portuguese:

> Para mais alterações, veja `Novos recrusos relacionados a dicas de tipo`_

or to

> Para mais alterações, veja `Novos recrusos relacionados a dicas de tipo <New Features Related to Type Hints>`_

Sphinx would complain with:

Doc/whatsnew/3.10.rst:1432: WARNING: inconsistent references in translated message. original: ['`New Features Related to Type Hints`_'], translated: []

To solve this issue, I see two solutions:

1- Create an anchor for "New Features Related to Type Hints" section in this page (let's say, "new-feat-related-type-hints") and then call it like :ref:`new-feat-related-type-hints` so that it gets the section title name automatically. Translators won't need to edit it in order to get translated title name. (recommended)

2- Rewrite the source string adding the internal link to the paragraph using `New Features Related to Type Hints <#new-features-related-to-type-hints>`_, so that it can be translated without popping up the warning message.
msg408899 - (view) Author: Ken Jin (kj) * (Python committer) Date: 2021-12-19 14:06
New changeset 3d3615f41f4ea73fe6707eb3673dfab482cb6a2b by Rafael Fontenelle in branch 'main':
bpo-46130: [docs] Add anchor for whatsnew/3.10 type hint section (GH-30199)
https://github.com/python/cpython/commit/3d3615f41f4ea73fe6707eb3673dfab482cb6a2b
msg408901 - (view) Author: miss-islington (miss-islington) Date: 2021-12-19 14:33
New changeset 9a28cf19b5d5f79eb072afc582f7baa9e7bd3ac2 by Miss Islington (bot) in branch '3.10':
bpo-46130: [docs] Add anchor for whatsnew/3.10 type hint section (GH-30199)
https://github.com/python/cpython/commit/9a28cf19b5d5f79eb072afc582f7baa9e7bd3ac2
msg408903 - (view) Author: Ken Jin (kj) * (Python committer) Date: 2021-12-19 14:49
Thanks Rafael for your efforts in docs translations.
History
Date User Action Args
2022-04-11 14:59:53adminsetgithub: 90288
2021-12-23 08:19:09rffontenellesetpull_requests: + pull_request28457
2021-12-19 14:49:01kjsetstatus: open -> closed
resolution: fixed
messages: + msg408903

stage: patch review -> resolved
2021-12-19 14:33:10miss-islingtonsetmessages: + msg408901
2021-12-19 14:06:53miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request28422
2021-12-19 14:06:50kjsetnosy: + kj
messages: + msg408899
2021-12-19 11:11:59AlexWaygoodsetnosy: + mdk
type: behavior
2021-12-19 10:29:44rffontenellesetkeywords: + patch
stage: patch review
pull_requests: + pull_request28420
2021-12-19 10:22:01rffontenellecreate