having a way to specify a source format in the potfiles list would be nice
Bug #377872 reported by
Claude Paroz
This bug affects 5 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
intltool |
Triaged
|
High
|
Unassigned |
Bug Description
Reported by Sebastien Bacher in http://
"Currently there is no way to list a python file not using the .py naming and a
glade file in the POTFILES.in and to have all the strings listed in the
translation template, having a way to specify [type: python] on a POTFILES.in
line would be useful"
I've encountered a similar situation with a Perl file without extension and where xgettext doesn't automatically recognize the language (and hence doesn't properly extract concatenated strings with "." Perl operator).
Changed in intltool: | |
assignee: | nobody → Данило Шеган (danilo) |
milestone: | none → 0.42.0 |
Changed in intltool: | |
milestone: | 0.42.0 → none |
assignee: | Данило Шеган (danilo) → nobody |
To post a comment you must log in.
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"