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

Localization of second link does not work correctly #13186

Open
nijel opened this issue Dec 20, 2024 · 0 comments
Open

Localization of second link does not work correctly #13186

nijel opened this issue Dec 20, 2024 · 0 comments
Labels

Comments

@nijel
Copy link
Contributor

nijel commented Dec 20, 2024

Describe the bug

When using separate the link and the target definition, the localization works only for a first link in a string, but not for the second one (with same text).

How to Reproduce

index.rst with donate page link included twice in a single block:

You can boost Weblate’s development on the `donate page`_. Funds collected
there are used to enable gratis hosting for libre software projects and further
development of Weblate.
Please check the `donate page`_ for options, such
as funding goals and the rewards you get as a proud funder.

.. _donate page: https://weblate.org/donate/

PO file with a translation:

#: ../index.rst:13
msgid "You can boost Weblate’s development on the `donate page`_. Funds collected there are used to enable gratis hosting for libre software projects and further development of Weblate. Please check the `donate page`_ for options, such as funding goals and the rewards you get as a proud funder."
msgstr ""
"Você pode impulsionar o desenvolvimento do Weblate na `página de doação`_. "
"Os fundos coletados lá são usados para permitir hospedagem de grátis para "
"projetos de software livre e o desenvolvimento adicional do Weblate. Por "
"favor, verifique a `página de doação`_ para obter opções, como metas de "
"financiamento e as recompensas que você obtém como um financiador orgulhoso."

Building localized documentation emits an error:

index.rst:13: ERROR: Unknown target name: "página de doação". [docutils]

Resulting HTML has one link resolved and one "problematic":

<p>
Você pode impulsionar o desenvolvimento do Weblate na <a class="reference external" href="https://weblate.org/donate/">página de doação</a>. 
Os fundos coletados lá são usados para permitir hospedagem de grátis para projetos de software livre e o desenvolvimento adicional do Weblate. 
Por favor, verifique a <a href="#id1"><span class="problematic" id="id2">`página de doação`_</span></a> 
para obter opções, como metas de financiamento e as recompensas que você obtém como um financiador orgulhoso.
</p>

Environment Information

Platform:              linux; (Linux-6.1.0-26-amd64-x86_64-with-glibc2.36)
Python version:        3.11.2 (main, Sep 14 2024, 03:00:30) [GCC 12.2.0])
Python implementation: CPython
Sphinx version:        8.1.3
Docutils version:      0.21.2
Jinja2 version:        3.1.4
Pygments version:      2.18.0

Sphinx extensions

Reproduced without any extensions.

Additional context

Originally reported by @rffontenelle at WeblateOrg/weblate#13356

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant