Is it possible to generate a single .pot file from Sphinx documentation?
gettext, internationalization, localization, python, python-sphinx
Solution
After over 7 months, extensive research and a couple of attempted answers, it seems safe to say that no - at least with the current version 1.1.3 - it is not possible to generate a single `.pot` file from Sphinx documentation.
The workaround described in the original question is also the most straightforward for automatically removing duplicate strings when merging the different `.pot` files into a single one.
Problem
I'm undergoing the task of i18n / l10n the documentation of a largish project. The documentation is done with Sphinx, that has off-the shelf basic support for i18n. My problem is similar to that of this other question: namely the fact a large chunk of the strings for each pot file is the same, and I would like my translators not to re-enter the same translation over and again. I would rather have a single template file. My problem is not really merging the files (that is just a `msgcat *.pot > all.pot` away), but rather the fact that - for the domains to work when building the documentation in a particular language - I have to copy and rename `all.pot` back to the original file names. So my workaroundish way of working is: - Generate `fileA.pot`, `fileB.pot` - Merge the two into `all.pot` - `cp all.pot fileA.pot` + `cp all.pot fileB.pot` Is there a cleaner way to do the same? gettext_compact brings me only half-way through my goal...