Comment 1 for bug 377872

Revision history for this message
David Planella (dpm) wrote :

The problem is most noticeable with extensionless executable scripts. Intltool (well, or probably xgettext, unless it is passed the right -L parameter) only guesses the type (language) correctly by extension, so whenever you add whenever such extensionless file in POTFILES.in, it is interpreted as a C file, so it has c-format flags all over the place.

As Seb mentions, Intltool does not support specifying the type in POTFILES.in for the builtin types (those detected by extension), i.e. there is no such type specifier as "gettext/shell" or "gettext/python", (to use two scripting languages in which it is quite common to find extensionless executables). Looking at the code, it seems that only the following types are supported by a specifier:

"gettext/glade", "gettext/ini", "gettext/keys", "gettext/rfc822deb", "gettext/schemas", "gettext/scheme", "gettext/xml", "gettext/quoted", "gettext/quotedxml", "gettext/tlk"

I see for example that python-distutils-extra works around this with python scripts without extension by creating a temporary symlink to a .py file, calling intltool-update and then deleting it, so it would be nice not to have to jump through hoops to get this functionality.

As a wishlist, a start could be to add support for:

 * "gettext/shell"
 * "gettext/python"
 * "gettext/perl"