[issue46130] Untranslatable link text in whatsnew/3.10
Rafael Fontenelle
report at bugs.python.org
Sun Dec 19 05:22:01 EST 2021
New submission from Rafael Fontenelle <rffontenelle at gmail.com>:
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.
----------
assignee: docs at python
components: Documentation
messages: 408889
nosy: docs at python, rffontenelle
priority: normal
severity: normal
status: open
title: Untranslatable link text in whatsnew/3.10
versions: Python 3.10, Python 3.11
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46130>
_______________________________________
More information about the Python-bugs-list
mailing list