umpirsky / Twig-Gettext-Extractor

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

Install 1.1.* throwg composer #4

Closed oleksandr-diudiun closed 11 years ago

oleksandr-diudiun commented 11 years ago

Composer message:

Problem 1

umpirsky commented 11 years ago

Can you please try to add "minimum-stability": "dev" to your composer.json?

oleksandr-diudiun commented 11 years ago

where it to add? in root or in requires {} block?

umpirsky commented 11 years ago

Like in https://github.com/umpirsky/Twig-Gettext-Extractor/blob/master/composer.json#L24

oleksandr-diudiun commented 11 years ago

ok, its help! but i try to run and its show me:

Невозможно выполнить программу: /Users/noon-ehos/work/sources/Twig-Gettext-Extractor/vendor/bin/twig-gettext-extractor --sort-output --force-po -o "/var/folders/vg/06ypnj11cs5hd0yxwd6hbyc0000gn/T/poeditdljV8U/17extracted.pot" --from-code=UTF-8 -k -kgettext -kgettext_noop -L PHP --files "/Users/noon-ehos/work/sources/vnmu.loc/Twig-Gettext-Extractor/Twig/Gettext/Test/Fixtures/twig/empty.twig" "/Users/noon-ehos/work/sources/vnmu.loc/Twig-Gettext-Extractor/Twig/Gettext/Test/Fixtures/twig/plural.twig" "/Users/noon-ehos/work/sources/vnmu.loc/Twig-Gettext-Extractor/Twig/Gettext/Test/Fixtures/twig/singular.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/backend-forms.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/backend-header.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/backend-image-uploader.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/backend-item-meta.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/backend-links-header.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/backend-message.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/backend-meta.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/backend-uploaded-files.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/backend-uploaded-images.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/backend-uploader-file.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/backend-uploader-image.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/backend.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/frontend-links-header.twig"

oleksandr-diudiun commented 11 years ago

run in terminal say: Fatal error: Class 'Symfony\Component\Translation\Translator' not found in /Users/noon-ehos/work/sources/Twig-Gettext-Extractor/vendor/umpirsky/twig-gettext-extractor/twig-gettext-extractor on line 30

oleksandr-diudiun commented 11 years ago

when I install extractor, I have terminal log: noon-ehos$ sudo php composer.phar install Loading composer repositories with package information Installing dependencies

symfony/routing suggests installing doctrine/common (>=2.2,<2.4-dev) symfony/routing suggests installing symfony/config (2.1.) symfony/routing suggests installing symfony/yaml (2.1.) symfony/twig-bridge suggests installing symfony/form (2.1.) symfony/twig-bridge suggests installing symfony/templating (2.1.) symfony/twig-bridge suggests installing symfony/translation (2.1.) symfony/twig-bridge suggests installing symfony/yaml (2.1.) symfony/twig-bridge suggests installing symfony/security (2.1.*) Writing lock file Generating autoload files

umpirsky commented 11 years ago

Hm, my bad, try to install it with:

$ composer install --dev

And if you find time please submit pull request to move that dependency from require-dev to require section.

oleksandr-diudiun commented 11 years ago

sudo php composer.phar install --dev Password: Loading composer repositories with package information Installing dependencies

Loading composer repositories with package information Installing dev dependencies Nothing to install or update symfony/routing suggests installing doctrine/common (>=2.2,<2.4-dev) symfony/routing suggests installing symfony/config (2.1.) symfony/routing suggests installing symfony/yaml (2.1.) symfony/twig-bridge suggests installing symfony/form (2.1.) symfony/twig-bridge suggests installing symfony/templating (2.1.) symfony/twig-bridge suggests installing symfony/translation (2.1.) symfony/twig-bridge suggests installing symfony/yaml (2.1.) symfony/twig-bridge suggests installing symfony/security (2.1.*) Writing lock file Generating autoload files

oleksandr-diudiun commented 11 years ago

same result int terminal: Fatal error: Class 'Symfony\Component\Translation\Translator' not found in /Users/noon-ehos/work/sources/Twig-Gettext-Extractor/vendor/umpirsky/twig-gettext-extractor/twig-gettext-extractor on line 30

and same message in POEDIT

oleksandr-diudiun commented 11 years ago

ok i add pull request but i never add it before. Now on pull reqests page I not see buttons like "new pull" or "new issue"

oleksandr-diudiun commented 11 years ago

can it be, becouse my php version is 5.3.15 and it not contains namespaces?

umpirsky commented 11 years ago

Can you please try:

$ rm -rf vendor composer.lock
$ composer.phar install --dev 
oleksandr-diudiun commented 11 years ago

Done it. But same error in terminal: Fatal error: Class 'Symfony\Component\Translation\Translator' not found in /Users/noon-ehos/work/sources/Twig-Gettext-Extractor/vendor/umpirsky/twig-gettext-extractor/twig-gettext-extractor on line 30

oleksandr-diudiun commented 11 years ago

and same error in poedit: /Users/noon-ehos/work/sources/Twig-Gettext-Extractor/vendor/bin/twig-gettext-extractor --sort-output --force-po -o "/var/folders/vg/06ypnj11cs5hd0yxwd6hbyc0000gn/T/poeditYfd0aB/17extracted.pot" --from-code=UTF-8 -k -kgettext -kgettext_noop -L PHP --files "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/backend-forms.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/backend-header.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/backend-image-uploader.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/backend-item-meta.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/backend-links-header.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/backend-message.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/backend-meta.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/backend-uploaded-files.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/backend-uploaded-images.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/backend-uploader-file.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/backend-uploader-image.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/backend.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/frontend-links-header.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/frontend-meta.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/frontend.twig" "/Users/noon-ehos/work/sources/vnmu.loc/views/abstracts/tpl-tabs.twig"

umpirsky commented 11 years ago

Give me your composr.json please, I will try to reproduce it.

oleksandr-diudiun commented 11 years ago

composer.json

{
    "minimum-stability": "dev",
    "require": {
        "umpirsky/twig-gettext-extractor": "1.1.*"
    }
}

result of php composer.phar install --dev:

Loading composer repositories with package information
Installing dependencies
  - Installing twig/twig (dev-master 5218db7)
    Cloning 5218db779633b2292102863da464896deee0c8cb
  - Installing symfony/filesystem (2.1.x-dev v2.1.7)
    Cloning v2.1.7
  - Installing symfony/routing (2.1.x-dev v2.1.7)
    Cloning v2.1.7
  - Installing symfony/twig-bridge (2.1.x-dev v2.1.7)
    Cloning v2.1.7
  - Installing twig/extensions (dev-master 5c2d515)
    Cloning 5c2d515d4624bdd588226d688173cf0399a4d8cf
  - Installing umpirsky/twig-gettext-extractor (1.1.1)
    Downloading: 100%         
Loading composer repositories with package information
Installing dev dependencies
Nothing to install or update
symfony/routing suggests installing doctrine/common (>=2.2,<2.4-dev)
symfony/routing suggests installing symfony/config (2.1.*)
symfony/routing suggests installing symfony/yaml (2.1.*)
symfony/twig-bridge suggests installing symfony/form (2.1.*)
symfony/twig-bridge suggests installing symfony/templating (2.1.*)
symfony/twig-bridge suggests installing symfony/translation (2.1.*)
symfony/twig-bridge suggests installing symfony/yaml (2.1.*)
symfony/twig-bridge suggests installing symfony/security (2.1.*)
Writing lock file
Generating autoload files
oleksandr-diudiun commented 11 years ago
...
Nothing to install or update
symfony/routing suggests installing doctrine/common (>=2.2,<2.4-dev)
symfony/routing suggests installing symfony/config (2.1.*)
symfony/routing suggests installing symfony/yaml (2.1.*)
symfony/twig-bridge suggests installing symfony/form (2.1.*)
symfony/twig-bridge suggests installing symfony/templating (2.1.*)
symfony/twig-bridge suggests installing symfony/translation (2.1.*)
symfony/twig-bridge suggests installing symfony/yaml (2.1.*)
symfony/twig-bridge suggests installing symfony/security (2.1.*)
Writing lock file
Generating autoload files
oleksandr-diudiun commented 11 years ago

Nothing to install or update symfony/routing suggests installing doctrine/common (>=2.2... symfony/routing suggests installing symfony/config (2.1.) symfony/routing suggests installing symfony/yaml (2.1.) symfony/twig-bridge suggests installing symfony/form (2.1.) symfony/twig-bridge suggests installing symfony/templating (2.1.) symfony/twig-bridge suggests installing symfony/translation (2.1.) symfony/twig-bridge suggests installing symfony/yaml (2.1.) symfony/twig-bridge suggests installing symfony/security (2.1.*) Writing lock file Generating autoload files

oleksandr-diudiun commented 11 years ago

i can also send you all my vendor folder that was created by installation

umpirsky commented 11 years ago

Thanks, that would be enough, I will fix it in a minute.

umpirsky commented 11 years ago

Fixed.

Just run:

$ composer.phar update
oleksandr-diudiun commented 11 years ago
php composer.phar update
Loading composer repositories with package information
Updating dependencies
  - Installing symfony/translation (2.1.x-dev v2.1.7)
    Cloning v2.1.7
  - Removing umpirsky/twig-gettext-extractor (1.1.1)
  - Installing umpirsky/twig-gettext-extractor (1.1.2)
    Downloading: 100%         
symfony/translation suggests installing symfony/config (2.1.*)
symfony/translation suggests installing symfony/yaml (2.1.*)
Writing lock file
Generating autoload files

result:

Fatal error: Class 'Symfony\Component\Form\FormRenderer' not found in /Users/noon-ehos/work/sources/Twig-Gettext-Extractor/vendor/symfony/twig-bridge/Symfony/Bridge/Twig/Form/TwigRenderer.php on line 20
oleksandr-diudiun commented 11 years ago

if i try

$ rm -rf vendor composer.lock
$ composer.phar install --dev 

result not changed, still error on line 20

umpirsky commented 11 years ago

Can you paste full trace?

Try to run:

$ composer.phar require symfony/form:2.1.*
oleksandr-diudiun commented 11 years ago
php composer.phar install --dev
Loading composer repositories with package information
Installing dependencies
  - Installing symfony/translation (2.1.x-dev v2.1.7)
    Cloning v2.1.7
  - Installing twig/twig (dev-master 5218db7)
    Cloning 5218db779633b2292102863da464896deee0c8cb
  - Installing symfony/filesystem (2.1.x-dev v2.1.7)
    Cloning v2.1.7
  - Installing symfony/routing (2.1.x-dev v2.1.7)
    Cloning v2.1.7
  - Installing symfony/twig-bridge (2.1.x-dev v2.1.7)
    Cloning v2.1.7
  - Installing twig/extensions (dev-master 5c2d515)
    Cloning 5c2d515d4624bdd588226d688173cf0399a4d8cf
  - Installing umpirsky/twig-gettext-extractor (1.1.2)
    Loading from cache
Loading composer repositories with package information
Installing dev dependencies
Nothing to install or update
symfony/translation suggests installing symfony/config (2.1.*)
symfony/translation suggests installing symfony/yaml (2.1.*)
symfony/routing suggests installing doctrine/common (>=2.2,<2.4-dev)
symfony/routing suggests installing symfony/config (2.1.*)
symfony/routing suggests installing symfony/yaml (2.1.*)
symfony/twig-bridge suggests installing symfony/form (2.1.*)
symfony/twig-bridge suggests installing symfony/templating (2.1.*)
symfony/twig-bridge suggests installing symfony/yaml (2.1.*)
symfony/twig-bridge suggests installing symfony/security (2.1.*)
Writing lock file
Generating autoload files
oleksandr-diudiun commented 11 years ago

<2.4-dev) symfony/routing suggests installing symfony/config (2.1.) symfony/routing suggests installing symfony/yaml (2.1.) symfony/twig-bridge suggests installing symfony/form (2.1.) symfony/twig-bridge suggests installing symfony/templating (2.1.) symfony/twig-bridge suggests installing symfony/yaml (2.1.) symfony/twig-bridge suggests installing symfony/security (2.1.) Writing lock file Generating autoload files

umpirsky commented 11 years ago

No, not install, require, please read my previous comment.

oleksandr-diudiun commented 11 years ago

Sorry

php composer.phar require symfony/form:2.1.*
composer.json has been updated
Loading composer repositories with package information
Updating dependencies
  - Installing symfony/options-resolver (2.1.x-dev v2.1.7)
    Cloning v2.1.7
  - Installing symfony/locale (2.1.x-dev v2.1.7)
    Cloning v2.1.7
  - Installing symfony/event-dispatcher (2.1.x-dev v2.1.7)
    Cloning v2.1.7
  - Installing symfony/form (2.1.x-dev v2.1.7)
    Cloning v2.1.7
symfony/locale suggests installing ext-intl (>=5.3.3)
symfony/event-dispatcher suggests installing symfony/dependency-injection (2.1.*)
symfony/event-dispatcher suggests installing symfony/http-kernel (2.1.*)
symfony/form suggests installing symfony/validator (2.1.*)
symfony/form suggests installing symfony/http-foundation (2.1.*)
Writing lock file
Generating autoload files
oleksandr-diudiun commented 11 years ago

now error:

Uncaught exception 'RuntimeException' with message 'Gettext command "xgettext --sort-output --force-po -o /var/folders/vg/0_6ypnj11cs5hd0yxwd6hbyc0000gn/T/poeditOPZUFq/17extracted.pot --from-code=UTF-8 -k_ -kgettext -kgettext_noop -L PHP /tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php /tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php /tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php /tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php /tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php /tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php /tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php /tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php /tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php /tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php /tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php /tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php /tmp/cache/5104515 in /Users/noon-ehos/work/sources/Twig-Gettext-Extractor/vendor/umpirsky/twig-gettext-extractor/Twig/Gettext/Extractor.php on line 79
umpirsky commented 11 years ago

Can you run that command from your command line, and paste the output?

oleksandr-diudiun commented 11 years ago

its command line output:

Uncaught exception 'RuntimeException' with message 'Gettext command "xgettext --sort-output 
--force-po -o /var/folders/vg/0_6ypnj11cs5hd0yxwd6hbyc0000gn/T/poeditOPZUFq/17extracted.pot 
--from-code=UTF-8 -k_ -kgettext -kgettext_noop -L PHP 
/tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php 
/tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php 
/tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php 
/tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php 
/tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php 
/tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php 
/tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php 
/tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php 
/tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php 
/tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php 
/tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php 
/tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php 
/tmp/cache/5104515 
in /Users/noon-ehos/work/sources/Twig-Gettext-Extractor/vendor/umpirsky/twig-gettext-extractor/Twig/Gettext/Extractor.php on line 79
umpirsky commented 11 years ago

Please run:

xgettext --sort-output 
--force-po -o /var/folders/vg/0_6ypnj11cs5hd0yxwd6hbyc0000gn/T/poeditOPZUFq/17extracted.pot 
--from-code=UTF-8 -k_ -kgettext -kgettext_noop -L PHP 
/tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php 
/tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php 
/tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php 
/tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php 
/tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php 
/tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php 
/tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php 
/tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php 
/tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php 
/tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php 
/tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php 
/tmp/cache/51045159b9678/f0/9d/e8ec729d8f0c5a034863632073d1.php 
/tmp/cache/5104515 
oleksandr-diudiun commented 11 years ago
xgettext: невозможно создать файл вывода "/var/folders/vg/0_6ypnj11cs5hd0yxwd6hbyc0000gn/T/poeditOPZUFq/17extracted.pot": No such file or directory
oleksandr-diudiun commented 11 years ago

may be you can simple send me archive with worked Extractor and all condinitions in vendor and autoload.php on my email?

umpirsky commented 11 years ago

OK, change path to some other location, update your command please.