sphinx icon indicating copy to clipboard operation
sphinx copied to clipboard

gettext should generate msgid irrespective of .. ifconfig :: evaluation result

Open MacqGit opened this issue 3 years ago • 0 comments

Use Case: We are generating alternate documents from a "master" document using conditional compiling (.. ifconfig ::). We also have to manage multiple translations out from those "alternate" documents. It would be nice to be able to generate.pot files including all translation possibilities, irrespective of the 'ifconfig' clausule.

Workarounds applied so far: Comment out all the .. ifconfig:: before running gettext: this is indeed possible but is quite cumbersome process, prone to errors. Moreover, source files must be set back to initial state before build phase. Iterating on this is painful.

Current Caveat: No ability for the gettext build to accept -D type options (like e.g. in sphinx-build -b html)

Possible Solution Implemention: Add the 'ifconfig' node 'translatable' based on a config --option

Hope I didn't miss something there so please let me know should any another option be possible. ;)

MacqGit avatar Aug 01 '22 16:08 MacqGit