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

msgmerge not updating PO files #17

Open
enventa opened this issue May 6, 2017 · 3 comments
Open

msgmerge not updating PO files #17

enventa opened this issue May 6, 2017 · 3 comments

Comments

@enventa
Copy link

enventa commented May 6, 2017

Hi @stephenharris!

great plugin! I'm just having trouble updating .PO files. I set msgmerge: true but no update is happening.

GNU gettext tools are in my system (Windows 8.1) and in PATH.

I added some log messages to your "pot.js" file so I can trace if execution goes through your code... and it does! But exec( 'msgmerge -U ' + poFile + ' ' + potFile, function(error, stdout, stderr) {} ); seems to do nothing.

No error is thrown and the process finishes with an exit code of 0.

If I manually execute the command msgmerge -U fileNme.po fileName.pot from Win command line... it works, .PO files get updated.

Any idea what I'm missing??

Thank you very much!

@stephenharris
Copy link
Owner

Does the executed script match exactly the command you've tried manually? My only thought is that the values of poFile or potFile are not what they should be / you expect them to be...

(Clutching at straws, to be honest, because I can't replicate the issue. I've not tested it on Windows, so there's every possibility it is related to the operating system - but I would have expected an error message in such instance).

@enventa
Copy link
Author

enventa commented May 8, 2017

Hi @stephenharris, thanks for answering!

Yes, the command I tried is exactly the same that your task "pot.js" file should be executing. I know that because I outputted poFile and potFile values to the log console. And I also executed from the path where my "gruntfile.js" is placed.

Just for testing purposes, I have tried the solution that @tivnet proposes in issue #11... and it worked! So my guess the issue comes from exec and asynchronous execution, not from msgmerge command... which is not even called. There might be a dependency we are missing on Windows (I'm a Grunt newbie)?

Thanks Stephen!

@harrilehtisaari
Copy link

We are having this exact issue on MacOS but only with one project where we can't figure out what's different (compared to others).
What we've gathered is that poFile and potFile are correct.
When we change the exec to:
var test = exec( 'msgmerge -U ' + poFile +' ' + potFile, function(error, stdout, stderr) {});
console.log(test);
magic happens and it works. So what we're thinking is it's an issue with async.

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

3 participants