Generating a POT file

3.8k views Asked by At

PoEdit causes problems because it scans also the Python sources in subdirectories where no scan is desired. So I want PoEdit to get new information about strings from a POT file. Here it is said that xgettext enables me to create a POT file from the sources. But I can't figure out how. It always generates a PO file.

How do I create a POT file with xgettext? Or is the old pygettext acceptable? Or is there another tool?

2

There are 2 answers

0
mzjn On BEST ANSWER

Just run xgettext and rename the resulting domainname.po file to domainname.pot.

See http://www.gnu.org/software/gettext/manual/html_node/Template.html#Template

0
Antti Haapala -- Слава Україні On

Get Babel. It does just about everything you need pertaining to i18n and l10n you would need in a python project.

See also instructions for setting it up in a Setuptools/Distribute project; if you are not yet using them, I suggest you do