-1

How to parse all the labels i.e. msgids to .pot file using following script from the project code.

https://github.com/open-classifieds/common/blob/master/vendor/POTCreator/POTCreator.php

I am using ZF1 so I have made class from this script file and using it like this:

$obj = new Helper_potcreator();
$obj->set_root = APPLICATION_PATH . '/views';
$obj->set_exts('php|phtml');
$obj->set_regular('/_[_|e]\([\"|\']([^\"|\']+)[\"|\']\)/i');
$obj->set_base_path('..');
$obj->set_read_subdir(true);

$potfile = APPLICATION_PATH.'/languages/abc.pot';
$obj->write_pot($potfile);

but not getting any success in parsing labels.

Jaskaran Singh
  • 2,392
  • 24
  • 39
  • Note to those trying to answer the question: The script appears to be an xgettext replacement written in php by neo22s and not part of standard gettext. I could not find any documentation on the script. from what little look at the source code I did it appears to be project specific in its assumptions. – hildred Apr 07 '15 at 16:00

1 Answers1

0

It may be easier to just use the standard xgettext utility unless you are wishing to contribute to that specific project. For open-classifieds specific help I would recommend raising a github issue.

hildred
  • 453
  • 11
  • 29