This commit is contained in:
Florian Dold 2016-01-27 01:57:34 +01:00
parent 5caa4f45b2
commit b150470eb6

View File

@ -17,6 +17,9 @@
/** /**
* Generate .po file from list of source files. * Generate .po file from list of source files.
*
* Note that duplicate message IDs are NOT merged, to get the same output as
* you would from xgettext, just run msguniq.
*/ */
/// <reference path="../lib/decl/node.d.ts" /> /// <reference path="../lib/decl/node.d.ts" />
@ -79,7 +82,7 @@ export function processFile(sourceFile: ts.SourceFile) {
} }
let candidate = lastComments[lastComments.length-1]; let candidate = lastComments[lastComments.length-1];
let candidateEndLine = ts.getLineAndCharacterOfPosition(sourceFile, candidate.end).line; let candidateEndLine = ts.getLineAndCharacterOfPosition(sourceFile, candidate.end).line;
if (candidateEndLine != lc.line -1) { if (candidateEndLine != lc.line - 1) {
return; return;
} }
let text = sourceFile.text.slice(candidate.pos, candidate.end); let text = sourceFile.text.slice(candidate.pos, candidate.end);