My module includes with it saved views, so I have painstakingly wrapped all the strings in t()
Potx didn't see them though, so I hacked it.
in _potx_explore_dir():
$extensions = array('php', 'inc', 'module', 'engine', 'theme', 'install', 'info', 'profile');
I added 'views.inc'
And it worked well.

Comments

gábor hojtsy’s picture

Category: task » support
Status: Active » Fixed

Well, the inc in itself should be enough to find views.inc and whatever else .inc files. As long as you extract "all files from the directory" and not "all files from the module". The latter uses file name matching for the module name, and views.inc does not include your module name in the file name obviously, so it will not work that way. Just extract all files from the directory instead.

gábor hojtsy’s picture

The help text which explains this is "Extract from files named %pattern in the %directory directory.", where %pattern is replaced with something like "yourmodulename.*". You can find this help text on the radio button you choose when exporting.

Basically, you should not have more then one module in a directory, so potx can just extract from the directory without looking at the file names in detail. If multiple modules are in one directory, one needs to look at the file names, and would not be able to tell which of the modules the views.inc file belongs to.

dave reid’s picture

Status: Fixed » Closed (duplicate)

This is probably actually a duplicate of #402734: admin.inc files not included in pot file.

gábor hojtsy’s picture

Status: Closed (duplicate) » Fixed

No, not at all duplicate. This issue is about a filename which *does not include* the module name, while yours *does*.

dave reid’s picture

Hmm...I took the original post to mean he had a file named 'mymodule.views.inc', which currently does not get picked up, and is fixed by 402734.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.