sphinx-doc / sphinx-doc/sphinx

make gettext fails to extract sidebar titles conditionally

Open
#6,598 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Issue
make gettext does not extract a sidebar title when the sidebar content includes any one of the following:

  • List item
  • Numbered item
  • :raw: RST directive

To Reproduce
Steps to reproduce the behavior:

Add a sidebar similar to the following to an RST file:


  - <link>
  - <link>```

conf.py:

```locale_dirs = ['./locale']
language = 'fr'
gettext_compact = False```

Commands:

```make gettext```

**Expected behavior**
The sidebar title ("Related Topics") is extracted to the POT file along with the other strings.

**Environment info**
- OS: Mac Mojave
- Python version: 3.7.3
- Sphinx version: 2.2.11_2
- Sphinx-doc version: 2.0.1

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 by creating the reported RST sidebar and running make gettext with the shown conf.py settings, then inspect the generated POT file. The fix is complete when the sidebar title is extracted even when its content includes a list item, numbered item, or :raw: directive, without regressing other gettext extraction.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
localization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.