Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to generate a single .pot file from Sphinx documentation?

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:

  1. Generate fileA.pot, fileB.pot
  2. Merge the two into all.pot
  3. 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...

like image 995
mac Avatar asked Mar 14 '13 11:03

mac


1 Answers

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.

like image 54
mac Avatar answered Sep 28 '22 04:09

mac