sphinx-doc / sphinx-doc/sphinx

Template Translation are not included in the gettext_compact domain

Open
#9,030 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

Describe the bug
With a project that has custom templates with translatable messages these messages are not added to the gettext domain specified with gettext_compact. This causes issues with translation management websites that expect all messages to be in one translation file. For example weblate.

To Reproduce
Steps to reproduce the behavior:

make gettext message files for a project that overrides the default templates with translatable messages.

Expected behavior
The gettext builder should generate one message file and not output sphinx.po when gettext_compact specifies a custom domain.

Your project
https://svn.blender.org/svnroot/bf-manual/trunk/blender_docs/

Environment info

  • OS: Ubuntu 20.10
  • Python versin: 3.8.6
  • Sphinx version: 3.5.2
  • Sphinx extensions: sphinx-intl

Additional context

https://docs.weblate.org/en/latest/devel/integration.html#project-and-component-structure

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 reproducing the gettext build with the linked Blender documentation project, using a custom gettext_compact domain and translatable template messages. Inspect Sphinx's gettext builder behavior; done means the messages are included in the specified domain and no separate sphinx.po file is generated.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.