File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- // https://github.com/blazersix /grunt-wp-i18n
1+ // https://github.com/cedaro /grunt-wp-i18n
22module . exports = {
33 theme : {
44 options : {
55 domainPath : '<%= paths.languages %>' ,
6- updateTimestamp : false ,
76 exclude : [
87 '<%= paths.composer %>.*'
98 ] ,
109 potHeaders : {
11- poedit : true ,
12- 'report-msgid-bugs-to' : '<%= package.pot.reportmsgidbugsto %>' ,
13- 'last-translator' : '<%= package.pot.lasttranslator %>' ,
14- 'language-team' : '<%= package.pot.languageteam %>'
10+ 'language' : 'en' ,
11+ 'plural-forms' : 'nplurals=2; plural=(n != 1);' ,
12+ 'poedit' : true ,
13+ 'report-msgid-bugs-to' : 'https://www.wpsitecare.com/contact/'
14+ } ,
15+ processPot : function ( pot ) {
16+ var translation ,
17+ excludedMeta = [
18+ 'Theme Name of the plugin/theme' ,
19+ 'Theme URI of the plugin/theme' ,
20+ 'Author of the plugin/theme' ,
21+ 'Author URI of the plugin/theme'
22+ ] ;
23+
24+ for ( translation in pot . translations [ '' ] ) {
25+ if ( 'undefined' !== typeof pot . translations [ '' ] [ translation ] . comments . extracted ) {
26+ if ( 0 <= excludedMeta . indexOf ( pot . translations [ '' ] [ translation ] . comments . extracted ) ) {
27+ console . log ( 'Excluded meta: ' + pot . translations [ '' ] [ translation ] . comments . extracted ) ;
28+ delete pot . translations [ '' ] [ translation ] ;
29+ }
30+ }
31+ }
32+
33+ return pot ;
1534 } ,
1635 type : 'wp-theme'
1736 }
You can’t perform that action at this time.
0 commit comments