Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add gettext target to documentation's Makefile #119009

Closed
Labels
type-featureA feature request or enhancement
@rffontenelle

Description

@rffontenelle

Feature or enhancement

Proposal:

As some may know already, Sphinx'sgettext builder is used to extract strings from the docs and store them in message catalog templates (pot files).

Currently there is no straightforwardmake gettext command to generate pot files, so the language teams need to run commands like:

sphinx-build -b gettext -D gettext_compact=0. locales/pot

or viamake command using doc’s Makefile:

make build BUILDER=gettext SPHINXOPTS='-D gettext_compact=0'

(On a side note, the first command doesn’t generate ‘changelog.pot’.)

In my personal opinion, having agettext target would simplify the process, reducing the complexity of the command construction and uniformizing the outputs. It would also be a small step to simplifying the setup for new teams.

Having agettext target would allow to simply runmake gettext and have the pot files inbuild/gettext directory. See output:

$ make gettextmkdir -p buildBuilding NEWS from Misc/NEWS.d with blurb/home/rffontenelle/Projects/cpython/Doc/build/NEWS is already up to datePATH=./venv/bin:$PATH sphinx-build -b gettext -d build/doctrees -j auto   -W . build/gettext Running Sphinx v7.3.7building [gettext]: targets for 7 template filesreading templates... [100%] /home/rffontenelle/Projects/cpython/Doc/tools/templates/search.htmlbuilding [gettext]: targets for 469 source files that are out of dateupdating environment: [new config] 469 added, 0 changed, 0 removedreading sources... [100%] using/unix .. whatsnew/indexlooking for now-outdated files... none foundpickling environment... donechecking consistency... donepreparing documents... donecopying assets... donewriting output... [100%] whatsnew/indexwriting message catalogs... [100%] whatsnew/indexbuild succeeded.The message catalogs are in build/gettext.$ ls build/gettext/about.pot  c-api         copyright.pot  extending  glossary.pot  installing  license.pot  sphinx.pot  usingbugs.pot   contents.pot  distributing   faq        howto         library     reference    tutorial    whatsnew$ find build/gettext/ -name '*.pot' | wc -l470

Has this already been discussed elsewhere?

I have already discussed this feature proposal on Discourse

Links to previous discussion of this feature:

https://discuss.python.org/t/add-gettext-builder-as-target-for-docs-makefile/53229

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp