File tree Expand file tree Collapse file tree 3 files changed +35
-10
lines changed
Expand file tree Collapse file tree 3 files changed +35
-10
lines changed Original file line number Diff line number Diff line change 11// https://github.com/blazersix/grunt-wp-i18n
22module . exports = {
33 options : {
4- textdomain : '<%= pkg.plugin.textdomain %>' ,
5- updateDomains : [ 'all' ]
4+ textdomain : '<%= package.textdomain %>'
65 } ,
76 php : {
8- files : {
9- src : [ '<%= files.php %>' ]
10- }
7+ options : {
8+ updateDomains : [ 'all' ]
9+ } ,
10+ expand : true ,
11+ src : [
12+ '<%= files.php %>'
13+ ]
1114 }
1215} ;
Original file line number Diff line number Diff line change @@ -4,10 +4,32 @@ module.exports = {
44 options : {
55 domainPath : '<%= paths.languages %>' ,
66 potHeaders : {
7- poedit : true ,
8- 'report-msgid-bugs-to' : '<%= pkg.pot.reportmsgidbugsto %>' ,
9- 'last-translator' : '<%= pkg.pot.lasttranslator %>' ,
10- 'language-team' : '<%= pkg.pot.languageteam %>'
7+ 'language' : 'en' ,
8+ 'plural-forms' : 'nplurals=2; plural=(n != 1);' ,
9+ 'poedit' : true ,
10+ 'report-msgid-bugs-to' : 'https://www.wpsitecare.com/contact/' ,
11+ 'language-team' : 'WP Site Care <hello@wpsitecare.com>' ,
12+ 'last-translator' : 'WP Site Care <hello@wpsitecare.com>'
13+ } ,
14+ processPot : function ( pot ) {
15+ var translation ,
16+ excludedMeta = [
17+ 'Theme Name of the plugin/theme' ,
18+ 'Theme URI of the plugin/theme' ,
19+ 'Author of the plugin/theme' ,
20+ 'Author URI of the plugin/theme'
21+ ] ;
22+
23+ for ( translation in pot . translations [ '' ] ) {
24+ if ( 'undefined' !== typeof pot . translations [ '' ] [ translation ] . comments . extracted ) {
25+ if ( 0 <= excludedMeta . indexOf ( pot . translations [ '' ] [ translation ] . comments . extracted ) ) {
26+ console . log ( 'Excluded meta: ' + pot . translations [ '' ] [ translation ] . comments . extracted ) ;
27+ delete pot . translations [ '' ] [ translation ] ;
28+ }
29+ }
30+ }
31+
32+ return pot ;
1133 } ,
1234 type : 'wp-plugin'
1335 }
Original file line number Diff line number Diff line change 3030 "grunt-rtlcss" : " 2.x" ,
3131 "grunt-sass" : " 2.x" ,
3232 "grunt-version" : " 1.x" ,
33- "grunt-wp-i18n" : " 0 .x" ,
33+ "grunt-wp-i18n" : " 1 .x" ,
3434 "time-grunt" : " 1.x"
3535 }
3636}
You can’t perform that action at this time.
0 commit comments