Skip to content

Commit 93ca663

Browse files
committed
Cloned in Cedaro's config
1 parent 69af82a commit 93ca663

1 file changed

Lines changed: 25 additions & 6 deletions

File tree

config/grunt/makepot.js

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,36 @@
1-
// https://github.com/blazersix/grunt-wp-i18n
1+
// https://github.com/cedaro/grunt-wp-i18n
22
module.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
}

0 commit comments

Comments
 (0)