You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned in #33, it could be useful if the warnings and messages generated by the make-pot command are available in another format, for example JSON.
This way users can programmatically run the command, easily extract the output and process it further.
My own use case would be to run wp i18n make-pot every time I push code to GitHub and import translations into GlotPress. I want to be able to send a notification if there are any wrong translator comments or anything else.
Activity
swissspidy commentedon Jul 25, 2018
I was wondering if I could just extend
WP_CLI\Loggers\Basefor this and callset_logger()to keep it simple. 🤔swissspidy commentedon Jul 26, 2018
For my own use case it would be awesome if I could get something like this at the end:
{ "source": "/path/to/foo-plugin/", "mainFile": "/path/to/foo-plugin/foo-plugin.php", "textdomain": "foo-plugin", "mergedWith": "/path/to/foo-plugin/languages/js-strings.pot", "destination": "/path/to/foo-plugin/languages/foo-plugin.pot", "extractedStrings": 127, "warnings": [ { "type": "invalid-comment", "file": "/path/to/foo-plugin/src/some-file.php", "line": 123 }, { "type": "invalid-comment", "file": "/path/to/foo-plugin/src/some-file.php", "line": 410 }, { "type": "invalid-domain", "file": "/path/to/foo-plugin/src/another-file.php", "line": 10 } ] }