umpirsky / Twig-Gettext-Extractor

The Twig Gettext Extractor is Poedit friendly tool which extracts translations from twig templates.
MIT License
112 stars 32 forks source link

POEdit Catalog Empty #26

Closed jakenoble closed 9 years ago

jakenoble commented 9 years ago

I am using the correct settings and this is my command extract in POEdit

/Applications/MAMP/htdocs/project/vendor/umpirsky/twig-gettext-extractor/twig-gettext-extractor --sort-output --force-po -o %o %C %K -L PHP --files %F

This points to the only executable file I can see in the vendor folder, there is no bin folder?

I have added a directory to my catalog, but nothing shows up at all.

Have I missed something or done something wrong?

umpirsky commented 9 years ago

Hi @jakenoble.

I am just testing it. My composer.json file:

{
    "require": {
        "umpirsky/twig-gettext-extractor": "1.1.*"
    }
}

After composer install I have:

$ ll vendor/bin/
total 8
drwxrwxr-x 2 umpirsky umpirsky 4096 јул  3 19:00 ./
drwxrwxr-x 7 umpirsky umpirsky 4096 јул  3 19:00 ../
lrwxrwxrwx 1 umpirsky umpirsky   57 јул  3 19:00 twig-gettext-extractor -> ../umpirsky/twig-gettext-extractor/twig-gettext-extractor*

So, it should be there, if it is not, please try to reinstall it:

rm -rf vendor/umpirsky/twig-gettext-extractor
composer update umpirsky/twig-gettext-extractor

That about bin script, but pointing directly to vendor/umpirsky/twig-gettext-extractor/twig-gettext-extractor should work as well.

If you want to debug the script, you can copy it to your project and make changes, or directly change in vendors to see what commands are executed and run them directly from your command line. More about debugging it you can find in https://github.com/umpirsky/Twig-Gettext-Extractor/issues/5.

If you have more question or need help don't hesitate to ask.

umpirsky commented 9 years ago

@jakenoble Did you solve it? Can you share what was the problem? Thanks.

jakenoble commented 9 years ago

TBH I gave up. I had it working using Symfony2's built in translation features. It was just pluralisation that wasn't working.

But having gone back to it's now working and so I don't need gettext for Twig.

umpirsky commented 9 years ago

@jakenoble OK, thanks for sharing. Feel free to reopen if you have problems or more details.