Merge pull request #17 from rubenv/fix_issue16

fix issue #16
This commit is contained in:
Ruben Vermeersch 2015-09-21 09:34:41 +02:00
commit 7ceda82794
2 changed files with 7 additions and 1 deletions

View File

@ -64,7 +64,12 @@ PO.parse = function (data) {
data = data.replace(/\r\n/g, '\n'); data = data.replace(/\r\n/g, '\n');
var po = new PO(); var po = new PO();
var sections = data.split(/\n\n/); var sections = data.split(/\n\n/);
var headers = sections.shift(); var headers = [sections.shift()];
//everything until the first 'msgid ""' is considered header
while (headers[headers.length - 1].indexOf('msgid ""') < 0) {
headers.push(sections.shift());
}
headers = headers.join('\n');
var lines = sections.join('\n').split(/\n/); var lines = sections.join('\n').split(/\n/);
po.headers = { po.headers = {

View File

@ -1,4 +1,5 @@
# French translation of Link (6.x-2.9) # French translation of Link (6.x-2.9)
# Copyright (c) 2011 by the French translation team # Copyright (c) 2011 by the French translation team
# #
msgid "" msgid ""