diff --git a/lib/extract.js b/lib/extract.js index dd8fdca..f4b80d0 100644 --- a/lib/extract.js +++ b/lib/extract.js @@ -343,7 +343,15 @@ var Extractor = (function () { if (possibleAttributes.indexOf(attr) > -1) { var attrValue = extracted[attr]; str = node.html(); // this shouldn't be necessary, but it is - self.addString(reference(n.startIndex), str || getAttr(attr) || '', attrValue.plural, attrValue.extractedComment, attrValue.context); + + // slight hack for
text
+ var gotAttr = getAttr(attr); + var isTranslate = attr === 'translate' && gotAttr === 'translate'; + if (isTranslate) { + gotAttr = null; + } + + self.addString(reference(n.startIndex), gotAttr || str || '', attrValue.plural, attrValue.extractedComment, attrValue.context); } else if (matches = self.noDelimRegex.exec(getAttr(attr))) { str = matches[2].replace(/\\\'/g, '\''); self.addString(reference(n.startIndex), str);