Is it possible to create a single file from a Sphinx database?

I am performing the i18n / l10n task of documentation of a large project. The documentation is done using Sphinx, which has sixth basic support for i18n .

My problem is similar to that of this other question : namely, the fact that a large chunk of lines for each bank file is the same, and I would like my translators not to re-enter the same translation again and again. I would rather have one template file .

My problem is not to merge the files (it’s easy msgcat *.pot > all.pot), but rather that - for domains to work when creating documentation in a certain language - I need to copy and rename all.potback to the original file names. Therefore my working way:

  • Create fileA.pot,fileB.pot
  • Combine the two in 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 of my goal ...

+5
source share
2 answers

7 , , - , 1.1.3 - .pot Sphinx.

, , .pot .

+1

:

- Sphinx, ..., , , .

: , -M msggrep , , . -N .

, :

  • A.pot, fileB.pot( msguniq )
  • all.pot
  • for x in file*.pot; do msgmerge -o ${x%t} all-translated.po $x; done

TFM, msgmerge ( ) ( po), up- ( pot = msgstrings).

0

All Articles