sphinx-doc / sphinx-doc/sphinx

glossary duplicate term when translated in italic

Open
#9,019 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

domains:std i18n type:bug
Dominant language
Python
Stars
8k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

Highly related to: https://github.com/sphinx-doc/sphinx/issues/7418

To Reproduce

$ wget -O- https://mdk.fr/x/2to3.tar.bz2 | tar -xjvf -
$ cd 2to3
$ sphinx-build -b html -qW -D locale_dirs=locales -E -D language=fr  . build/html
Warning, treated as error:
2to3/glossary.rst:8:duplicate term description of 2to3, other instance in glossary

This is due to 2to3 being translated *2to3*.

Expected behavior

I don't expect translation to interfer term linking.

Your project

We found this one on https://github.com/python/python-docs-fr, but it's easier to reproduce using our minimal reproducer.

Environment info

  • OS: Debian
  • Python version: 3.9

We tried multiple Sphinx releases (upstream, not with my reproducer):

  • Sphinx==2.4.4: it works
  • Sphinx==3.2.1: duplicate term when translated error
  • Sphinx==3.3.0: It works
  • Sphinx==3.3.1: It works
  • Sphinx==3.4.0: duplicate term when translated error
  • Sphinx==3.4.1: duplicate term when translated error
  • Sphinx==3.4.2: duplicate term when translated error
  • Sphinx==3.5.1: duplicate term when translated error

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the minimal reproducer's glossary.rst and run the documented sphinx-build command using the affected Sphinx versions. Trace how the translated italic term is registered and compare it with the working versions; done means the French build completes without a duplicate term description warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.