Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot execute program on windows7 #13

Open
pouyasalimi opened this issue Jan 26, 2014 · 14 comments
Open

Cannot execute program on windows7 #13

pouyasalimi opened this issue Jan 26, 2014 · 14 comments

Comments

@pouyasalimi
Copy link

Hi I have problem setting Twig Gettext on windows7

I installed composer and did the jobs for downloading Twig-Gettext-Extractor. also set custom parser for TWIG files like you said.

When i run Pedit, I will got this error messages:

01/26/14 20:08:36: Execution of command './vendor/bin/twig-gettext-extractor --sort-output --force-po -o "C:\Users\Sony\AppData\Local\Temp\poe4ED0.tmp\11extracted.pot" --from-code=UTF-8 -k__ -k_e -kwp.__ -L PHP --files "../irsaplus/core/plugins/settings/templates/settings/tabs.twig" "../irsaplus/core/plugins/settings/templates/settings/wrapper.twig" "../irsaplus/core/plugins/settings/templates/settings/fields/boolean.twig" "../irsaplus/core/plugins/settings/templates/settings/fields/image.twig" "../irsaplus/core/plugins/settings/templates/settings/fields/select.twig" "../irsaplus/core/plugins/settings/templates/settings/fields/select_post_type.twig" "../irsaplus/core/plugins/settings/templates/settings/fields/select_post_type_for_submission.twig" "../irsaplus/core/plugins/settings/templates/settings/fields/select_user_role.twig" "../irsaplus/core/plugins/settings/templates/settings/fields/textarea.twig" "../irsaplus/core/plugins/settings/templates/settings/fields/textinput.twig" "../irsaplus/plugins/accounts/templates/accounts/login.twig" "../irsaplus/plugins/accounts/templates/accounts/register.twig" "../irsaplus/plugins/agencies/templates/agencies/widget.twig" "../irsaplus/plugins/agents/templates/agents/widget.twig" "../irsaplus/plugins/call-to-action/templates/call-to-action/widget.twig" "../irsaplus/plugins/partners/templates/partners/widget.twig"' failed (error 193: unknown error c1)
01/26/14 20:08:36: Cannot execute program: ./vendor/bin/twig-gettext-extractor --sort-output --force-po -o "C:\Users\Sony\AppData\Local\Temp\poe4ED0.tmp\11extracted.pot" --from-code=UTF-8 -k__ -k_e -kwp.__ -L PHP --files "../irsaplus/core/plugins/settings/templates/settings/tabs.twig" "../irsaplus/core/plugins/settings/templates/settings/wrapper.twig" "../irsaplus/core/plugins/settings/templates/settings/fields/boolean.twig" "../irsaplus/core/plugins/settings/templates/settings/fields/image.twig" "../irsaplus/core/plugins/settings/templates/settings/fields/select.twig" "../irsaplus/core/plugins/settings/templates/settings/fields/select_post_type.twig" "../irsaplus/core/plugins/settings/templates/settings/fields/select_post_type_for_submission.twig" "../irsaplus/core/plugins/settings/templates/settings/fields/select_user_role.twig" "../irsaplus/core/plugins/settings/templates/settings/fields/textarea.twig" "../irsaplus/core/plugins/settings/templates/settings/fields/textinput.twig" "../irsaplus/plugins/accounts/templates/accounts/login.twig" "../irsaplus/plugins/accounts/templates/accounts/register.twig" "../irsaplus/plugins/agencies/templates/agencies/widget.twig" "../irsaplus/plugins/agents/templates/agents/widget.twig" "../irsaplus/plugins/call-to-action/templates/call-to-action/widget.twig" "../irsaplus/plugins/partners/templates/partners/widget.twig"

@umpirsky
Copy link
Owner

@ipouya Can you run it from command line? Maybe it is permissions problem, I am not into windows that much.

@pouyasalimi
Copy link
Author

@umpirsky I got this error on command line:

Fatal error: Uncaught exception 'RuntimeException' with message 'Gettext command
"xgettext --sort-output --force-po -o C:\Users\Sony\AppData\Local\Temp\poe3B6A.
tmp\11extracted.pot --from-code=UTF-8 -k__ -k_e -kwp.__ -L D:\EasyPHP\binaries\p
hp\php_runningversion\php.exe /tmp/cache/52e5f5eb8e890/54/8f/63991c591f63fc71bc4
fd4c43bb30c57a99d9e15d31af8fa119243a11620.php /tmp/cache/52e5f5eb8e890/54/8f/639
91c591f63fc71bc4fd4c43bb30c57a99d9e15d31af8fa119243a11620.php /tmp/cache/52e5f5e
b8e890/54/8f/63991c591f63fc71bc4fd4c43bb30c57a99d9e15d31af8fa119243a11620.php /t
mp/cache/52e5f5eb8e890/54/8f/63991c591f63fc71bc4fd4c43bb30c57a99d9e15d31af8fa119
243a11620.php /tmp/cache/52e5f5eb8e890/54/8f/63991c591f63fc71bc4fd4c43bb30c57a99
d9e15d31af8fa119243a11620.php /tmp/cache/52e5f5eb8e890/54/8f/63991c591f63fc71bc4
fd4c43bb30c57a99d9e15d31af8fa119243a11620.php /tmp/cache/52e5f5eb8e890/54/8f/639
91c591f63fc71bc4fd4c43bb30c57a99d9e15d31af8fa119243a11620.php /tmp/cache/52e5f5e
b8e890/54/8f/63991c591f63fc71bc4fd4c43bb30c57a99d9e15d31af8fa119243a11620.php in
D:\EasyPHP\data\localweb\wordpress\wp-content\themes\irmaskan\languages\vendor
umpirsky\twig-gettext-extractor\Twig\Gettext\Extractor.php on line 79

@umpirsky
Copy link
Owner

@ipouya And when you run this xgettext command?

@pouyasalimi
Copy link
Author

I run this command after poedit shows error in first comment i left above. I don't run xgettext, i don't know why it shows xgettext i run this command:

D:\EasyPHP\data\localweb\wordpress\wp-content\themes\irmaskan\languages\vendor\b
in>twig-gettext-extractor --sort-output --force-po -o "C:\Users\Sony\AppData\Loc
al\Temp\poe3B6A.tmp\11extracted.pot" --from-code=UTF-8 -k__ -k_e -kwp.__ -L D:
EasyPHP\binaries\php\php_runningversion\php.exe --files "../irsaplus/core/plugi
ns/settings/templates/settings/tabs.twig" "../irsaplus/core/plugins/settings/tem
plates/settings/wrapper.twig" "../irsaplus/core/plugins/settings/templates/setti
ngs/fields/boolean.twig" "../irsaplus/core/plugins/settings/templates/settings/f
ields/image.twig" "../irsaplus/core/plugins/settings/templates/settings/fields/s
elect.twig" "../irsaplus/core/plugins/settings/templates/settings/fields/select_
post_type.twig" "../irsaplus/core/plugins/settings/templates/settings/fields/sel
ect_post_type_for_submission.twig" "../irsaplus/core/plugins/settings/templates/
settings/fields/select_user_role.twig" "../irsaplus/core/plugins/settings/templa
tes/settings/fields/textarea.twig" "../irsaplus/core/plugins/settings/templates/
settings/fields/textinput.twig" "../irsaplus/plugins/accounts/templates/accounts
/login.twig" "../irsaplus/plugins/accounts/templates/accounts/register.twig" "..
/irsaplus/plugins/agencies/templates/agencies/widget.twig" "../irsaplus/plugins/
agents/templates/agents/widget.twig" "../irsaplus/plugins/call-to-action/templat
es/call-to-action/widget.twig" "../irsaplus/plugins/partners/templates/partners/
widget.twig"

@umpirsky
Copy link
Owner

Because it uses xgettext in the background, and that may be the source of your problem.
Thats why I am suggesting to run

xgettext --sort-output --force-po -o C:\Users\Sony\AppData\Local\Temp\poe3B6A.
tmp\11extracted.pot --from-code=UTF-8 -k__ -k_e -kwp.__ -L D:\EasyPHP\binaries\p
hp\php_runningversion\php.exe /tmp/cache/52e5f5eb8e890/54/8f/63991c591f63fc71bc4
fd4c43bb30c57a99d9e15d31af8fa119243a11620.php /tmp/cache/52e5f5...

and see what is the problem.

@umpirsky
Copy link
Owner

@pouyasalimi
Copy link
Author

Thanks, I'll see what can i do ;)

@kbtz
Copy link

kbtz commented Feb 17, 2014

So...
?

@umpirsky
Copy link
Owner

Any updates on this @ipouya?

@Vendredi3
Copy link

Hi all,
I run into the same problem :
First I installed via composer and set a new parser for twig.

when I tried to update my catalog in Poedit and received this error :

11/10/14 16:53:59: Execution of command 'X:/wamp/www/NH_Italie/reporting/vendor/bin/twig-gettext-extractor --sort-output --force-po -o "C:\Users\Arnaud\AppData\Local\Temp\poeE6E9.tmp\259extracted.pot" --from-code=UTF-8  -k_ -ktrans -L PHP --files  "X:/wamp/www/NH_Italie/reporting/includes/twig_old/package.xml.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/Copy (2) of courbes_detail.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/Copy of admin_detail_poste.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/Copy of aff_global.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/Copy of courbes_detail.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/Copy of stats_onglets.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/acces_interdit.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/arrivee.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/audit_ajout.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/audit_commercial_ajout.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/audit_listing.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/audit_listing_region.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/audit_modif.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/audit_region_detail.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/audit_role.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/bons_livraison.tpl"' failed (error 193 : unknown error c1)
11/10/14 16:53:59: Cannot execute program: X:/wamp/www/NH_Italie/reporting/vendor/bin/twig-gettext-extractor --sort-output --force-po -o "C:\Users\Arnaud\AppData\Local\Temp\poeE6E9.tmp\259extracted.pot" --from-code=UTF-8  -k_ -ktrans -L PHP --files  "X:/wamp/www/NH_Italie/reporting/includes/twig_old/package.xml.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/Copy (2) of courbes_detail.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/Copy of admin_detail_poste.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/Copy of aff_global.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/Copy of courbes_detail.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/Copy of stats_onglets.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/acces_interdit.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/arrivee.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/audit_ajout.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/audit_commercial_ajout.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/audit_listing.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/audit_listing_region.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/audit_modif.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/audit_region_detail.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/audit_role.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/bons_livraison.tpl"

So i tried to execute the following command in the console :

X:/wamp/www/NH_Italie/reporting/vendor/bin/twig-gettext-extractor --sort-output --force-po -o "C:\Users\Arnaud\AppData\Local\Temp\poe4AF8.tmp\259extracted.pot" --from-code=UTF-8  -k_ -ktrans -L PHP --files  "X:/wamp/www/NH_Italie/reporting/includes/twig_old/package.xml.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/Copy (2) of courbes_detail.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/Copy of admin_detail_poste.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/Copy of aff_global.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/Copy of courbes_detail.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/Copy of stats_onglets.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/acces_interdit.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/arrivee.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/audit_ajout.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/audit_commercial_ajout.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/audit_listing.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/audit_listing_region.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/audit_modif.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/audit_region_detail.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/audit_role.tpl" "X:/wamp/www/NH_Italie/reporting/templates/fr/admin/bons_livraison.tpl

and get the following error :

xgettext: cannot create output file "C:\Users\Arnaud\AppData\Local\Temp\poe4AF8.
tmp\259extracted.pot": No such file or directory
PHP Fatal error:  Uncaught exception 'RuntimeException' with message 'Gettext co
mmand "xgettext --sort-output --force-po -o C:\Users\Arnaud\AppData\Local\Temp\p
oe4AF8.tmp\259extracted.pot --from-code=UTF-8 -k_ -ktrans -L PHP /tmp/cache/5460
e27bb328a/fa/dd/c55dd0ce7c54962e732020f4c21f9d2d3cafb2941b09672f928d734c616a.php
 /tmp/cache/5460e27bb328a/fa/dd/c55dd0ce7c54962e732020f4c21f9d2d3cafb2941b09672f
928d734c616a.php /tmp/cache/5460e27bb328a/fa/dd/c55dd0ce7c54962e732020f4c21f9d2d
3cafb2941b09672f928d734c616a.php /tmp/cache/5460e27bb328a/fa/dd/c55dd0ce7c54962e
732020f4c21f9d2d3cafb2941b09672f928d734c616a.php /tmp/cache/5460e27bb328a/fa/dd/
c55dd0ce7c54962e732020f4c21f9d2d3cafb2941b09672f928d734c616a.php /tmp/cache/5460
e27bb328a/fa/dd/c55dd0ce7c54962e732020f4c21f9d2d3cafb2941b09672f928d734c616a.php
 /tmp/cache/5460e27bb328a/fa/dd/c55dd0ce7c54962e732020f4c21f9d2d3cafb2941b09672f
928d734c616a.php /tmp/cache/5460e27bb328a/fa/dd/c55dd0ce7c54962e732020f4c21f9d2d
3cafb2941b09672f928d734c616a.php /tmp/cache/5460e27bb328a/fa/dd/c55dd0ce7c54962e
73 in X:\wamp\www\Naturhouse_Italie\reporting\vendor\umpirsky\twig-gettext-extra
ctor\Twig\Gettext\Extractor.php on line 79

I tried the xgettext command :

xgettext --sort-output --force-po -o C:\Users\Arnaud\AppData\Local\Temp\poe4AF8.tmp\259extracted.pot --from-code=UTF-8 -k_ -ktrans -L PHP /tmp/cache/5460e4f22d458/fa/dd/c55dd0ce7c54962e732020f4c21f9d2d3cafb2941b09672f928d734c616a.php /tmp/cache/5460e4f22d458/fa/dd/c55dd0ce7c54962e732020f4c21f9d2d3cafb2941b09672f928d734c616a.php /tmp/cache/5460e4f22d458/fa/dd/c55dd0ce7c54962e732020f4c21f9d2d3cafb2941b09672f928d734c616a.php /tmp/cache/5460e4f22d458/fa/dd/c55dd0ce7c54962e732020f4c21f9d2d3cafb2941b09672f928d734c616a.php /tmp/cache/5460e4f22d458/fa/dd/c55dd0ce7c54962e732020f4c21f9d2d3cafb2941b09672f928d734c616a.php

I had the following error :

xgettext: cannot create output file "C:\Users\Arnaud\AppData\Local\Temp\poe4AF8.tmp\259extracted.pot": No such file or directory

For testing purpose I replaced %o in the Parser command by X:\wamp\www\NH_Italie\reporting\locale\it_IT\LC_MESSAGES\extracted.pot that point to an existing file, An re run the update in Poedit => same error.

BUT when I tried to run X:/wamp/www/NH_Italie/reporting/vendor/bin/twig-gettext-extractor --sort-output --force-po -o "X:\wamp\www\NH_Italie\reporting\locale\it_IT\LC_MESSAGES\extracted.pot" --from-code=UTF-8 [...] on the console, it has updated the extracted.pot file with the following content :

# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-11-10 17:32+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

I'm a little bit confused, and any help will be much appreciated

@umpirsky
Copy link
Owner

@Vendredi3 Thanks for your feedback.

I never tested it on Windows, really nonsense erorr:

xgettext: cannot create output file "C:\Users\Arnaud\AppData\Local\Temp\poe4AF8.tmp\259extracted.pot": No such file or directory

Can it be a permissions issue?

@Vendredi3
Copy link

Hi @umpirsky , thanks for answering.

I don't think it can be a permission issue (as to be sure I gave full control to Users on Temp directory)

@umpirsky
Copy link
Owner

@Vendredi3 Hehum, I really have no idea, sorry. Windows support is never planned for this project, but if someone can submit PR I will gladly review and merge.

@Vendredi3
Copy link

Ok, thanks anyway. I finally scanned the twig cache (which contains php files)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants