Added grunt-checktextdomain

This commit is contained in:
Claudio Sanches 2018-09-21 14:13:28 -03:00
parent f8e62576a0
commit 0136912a06
3 changed files with 74 additions and 2 deletions

View File

@ -36,9 +36,42 @@ module.exports = function( grunt ) {
}
}
},
checktextdomain: {
options:{
text_domain: 'wc-admin',
keywords: [
'__:1,2d',
'_e:1,2d',
'_x:1,2c,3d',
'esc_html__:1,2d',
'esc_html_e:1,2d',
'esc_html_x:1,2c,3d',
'esc_attr__:1,2d',
'esc_attr_e:1,2d',
'esc_attr_x:1,2c,3d',
'_ex:1,2c,3d',
'_n:1,2,4d',
'_nx:1,2,4c,5d',
'_n_noop:1,2,3d',
'_nx_noop:1,2,3c,4d'
]
},
files: {
src: [
'**/*.php', // Include all files/
'!node_modules/**', // Exclude node_modules/
'!tests/**', // Exclude tests/
'!vendor/**', // Exclude vendor/
'!tmp/**' // Exclude tmp/
],
expand: true
}
}
} );
grunt.loadNpmTasks( 'grunt-wp-i18n' );
grunt.loadNpmTasks( 'grunt-checktextdomain' );
grunt.registerTask( 'i18n', ['addtextdomain', 'makepot'] );
grunt.util.linefeed = '\n';

View File

@ -5996,13 +5996,15 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@ -6025,7 +6027,8 @@
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
@ -6192,6 +6195,7 @@
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@ -6895,6 +6899,34 @@
}
}
},
"grunt-checktextdomain": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/grunt-checktextdomain/-/grunt-checktextdomain-1.0.1.tgz",
"integrity": "sha1-slTQHh3pEwBdTbHFMD2QI7mD4Zs=",
"dev": true,
"requires": {
"chalk": "~0.2.1",
"text-table": "~0.2.0"
},
"dependencies": {
"ansi-styles": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-0.2.0.tgz",
"integrity": "sha1-NZq0sV3NZLptdHNLcsNjYKmvLBk=",
"dev": true
},
"chalk": {
"version": "0.2.1",
"resolved": "http://registry.npmjs.org/chalk/-/chalk-0.2.1.tgz",
"integrity": "sha1-dhPhV1FFshOGSD9/SFql/6jL0Qw=",
"dev": true,
"requires": {
"ansi-styles": "~0.2.0",
"has-color": "~0.1.0"
}
}
}
},
"grunt-known-options": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-1.1.0.tgz",
@ -7025,6 +7057,12 @@
}
}
},
"has-color": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz",
"integrity": "sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8=",
"dev": true
},
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",

View File

@ -67,6 +67,7 @@
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"gridicons": "3.1.1",
"grunt": "^1.0.2",
"grunt-checktextdomain": "^1.0.1",
"grunt-wp-i18n": "^1.0.2",
"history": "^4.7.2",
"husky": "^0.14.3",