0

I can't get out the strings from .tpl, from .hlp and from .js files. I'm trying to use Poedit 2.4.2 and PoeditSmarty -- I'm not quite sure, if it's necessary... I've tried to follow How to use Poedit with smarty templates?, but nothing happens (mean: noting extracted from .tpl files, only from .php files.)

In Poedit -> File -> Settings -> Extractors I have an item named "Smarty". In the "Extensions" box there are ‪*.tpl, *.hlp, *.js, in the command line: ‪"c:\Program Files (x86)\Java\jre1.8.0_281\bin\java" -jar "c:\Desktop\PoeditSmarty-master\PoeditSmarty.jar" -o %o -c %C -k %K -f %F, and in the next three boxes: %K, %F, %C.

In Catalog -> Properties -> Paths page are set the paths of the files (there are more than 100 files in different directories, I would like to translate), and the keywords, witch are marking the strings to translate ({ts}) are listed, too.

But if I hit the 'Update from source' button, only the strings from the .php files are extracted.

What do I wrong?

Pál Rudan
  • 123
  • 4

1 Answers1

0

The only thing that jumps out is the comma between extensions. The field label seems to recommend semicolons, e.g. *.cpp;*.h. Perhaps you can try a single extension first to rule this out as a cause.

Other than that, I can only share our working setup. We use a different extractor, smarty-gettext. We have a wiki page for translators describing our Poedit configuration. Specifically,

  • Command to extract translations: php /path/to/tsmarty2c.php -o %o %F
  • An item in input files list: %f

We basically only use tsmarty2c.php and block.t.php from that package. Our copies of those files include minor changes suited to our needs, like compressing whitespace to a single space.

Cătălin Frâncu
  • 1,179
  • 8
  • 15