Handle extracted comments in headers
This commit is contained in:
1
test/fixtures/comment.po
vendored
1
test/fixtures/comment.po
vendored
@@ -1,6 +1,7 @@
|
||||
# French translation of Link (6.x-2.9)
|
||||
# Copyright (c) 2011 by the French translation team
|
||||
#
|
||||
#. extracted from test
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Link (6.x-2.9)\n"
|
||||
|
||||
@@ -61,6 +61,9 @@ describe('Parse', function () {
|
||||
assert.notEqual(po, null);
|
||||
assert.equal(po.items.length, 2);
|
||||
|
||||
assert.equal(po.extractedComments.length, 1);
|
||||
assert.equal(po.extractedComments[0], 'extracted from test');
|
||||
|
||||
var item = po.items[0];
|
||||
assert.equal(item.msgid, 'Title, as plain text');
|
||||
assert.equal(item.msgstr, 'Attribut title, en tant que texte brut');
|
||||
|
||||
@@ -74,6 +74,7 @@ describe('Write', function () {
|
||||
var input = fs.readFileSync(__dirname + '/fixtures/comment.po', 'utf8');
|
||||
var po = PO.parse(input);
|
||||
var str = po.toString();
|
||||
assertHasLine(str, '#. extracted from test');
|
||||
assertHasLine(str, '#. Extracted comment');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user