fixed makepot task
- added proper grunt module (grunt-cli) - updated translations extract code to remove warnings when no translations are found
This commit is contained in:
@ -89,14 +89,14 @@ class RoboFile extends \Robo\Tasks {
|
||||
}
|
||||
|
||||
function makepot() {
|
||||
$this->_exec('grunt makepot'.
|
||||
$this->_exec('./node_modules/.bin/grunt makepot'.
|
||||
' --gruntfile '.__DIR__.'/tasks/makepot/makepot.js'.
|
||||
' --base_path '.__DIR__
|
||||
);
|
||||
}
|
||||
|
||||
function pushpot() {
|
||||
$this->_exec('grunt pushpot'.
|
||||
$this->_exec('./node_modules/.bin/grunt pushpot'.
|
||||
' --gruntfile '.__DIR__.'/tasks/makepot/makepot.js'.
|
||||
' --base_path '.__DIR__
|
||||
);
|
||||
@ -123,7 +123,7 @@ class RoboFile extends \Robo\Tasks {
|
||||
$this->compileJs();
|
||||
|
||||
$this->_exec(join(' ', array(
|
||||
'./node_modules/mocha/bin/mocha',
|
||||
'./node_modules/.bin/mocha',
|
||||
'-r tests/javascript/mochaTestHelper.js',
|
||||
'tests/javascript/testBundles/**/*.js'
|
||||
)));
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -45,7 +45,7 @@
|
||||
"amd-inject-loader": "latest",
|
||||
"chai": "2.2.0",
|
||||
"chai-jq": "0.0.8",
|
||||
"grunt": "^0.4.5",
|
||||
"grunt-cli": "latest",
|
||||
"jquery": "2.1.4",
|
||||
"jsdom": "3.1.2",
|
||||
"mocha": "2.2.1",
|
||||
|
3
tasks/makepot/node_modules/grunt-wp-i18n/vendor/wp-i18n-tools/extract.php
generated
vendored
3
tasks/makepot/node_modules/grunt-wp-i18n/vendor/wp-i18n-tools/extract.php
generated
vendored
@ -178,9 +178,10 @@ class StringExtractor {
|
||||
* - line - line number
|
||||
*/
|
||||
public function find_function_calls( $function_names, $code, $extension = '.php') {
|
||||
$function_calls = array();
|
||||
|
||||
if($extension === 'php') {
|
||||
$tokens = token_get_all( $code );
|
||||
$function_calls = array();
|
||||
$latest_comment = false;
|
||||
$in_func = false;
|
||||
foreach( $tokens as $token ) {
|
||||
|
Reference in New Issue
Block a user