Skip to content

Commit f231777

Browse files
committed
Exclude all dates when comparing generated POT files.
1 parent 1111add commit f231777

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

lib/pot.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ function normalizeForComparison(pot) {
5757
// Normalize the content type case.
5858
clone.headers['content-type'] = clone.headers['content-type'].toLowerCase();
5959

60-
// Blank out the date.
60+
// Blank out the dates.
6161
clone.headers['pot-creation-date'] = '';
62+
clone.headers['po-revision-date'] = '';
6263

6364
// Blank out the headers in the translations object. These are used for
6465
// reference only and won't be compiled, so they shouldn't be used when

test/fixtures/makepot/plugin-with-pot/plugin-with-pot.pot

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# Copyright (C) 2018
2-
# This file is distributed under the same license as the Example Plugin package.
1+
# Copyright
32
msgid ""
43
msgstr ""
54
"Project-Id-Version: Example Plugin\n"

test/makepot.js

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ test('makepot no changes', function(t) {
4141

4242
makepot({
4343
cwd: path.resolve('tmp/makepot/plugin-with-pot'),
44+
potComments: 'Copyright',
4445
potHeaders: {
4546
'x-generator': 'node-wp-i18n'
4647
},

0 commit comments

Comments
 (0)