diff --git a/lib/get-text.js b/lib/get-text.js index ccf3b7b6..ed85364f 100644 --- a/lib/get-text.js +++ b/lib/get-text.js @@ -207,7 +207,6 @@ export default class GetText { return result( [ 500, message ] ); } - // XXX extract commants #parseCallExpression ( ast, node, { start } = {} ) { let method; @@ -303,16 +302,10 @@ export default class GetText { if ( !single.id && !plural.id ) return; - // XXX - var extractedComments; - // extracted comments - // const extractedComments = this.#extractNodeComments( ast, node ); - // if ( extractedComments ) { - // message.extractedComments = {}; - // message.extractedComments.comments ??= []; - // message.extractedComments.comments.push( extractedComments ); - // } + const comment = this.#extractNodeComment( ast, node ); + + if ( comment ) var extractedComments = [ comment ]; if ( single.id ) { this.#poFile.addEctractedMessages( { @@ -379,7 +372,7 @@ export default class GetText { return res; } - #extractNodeComments ( ast, node ) { + #extractNodeComment ( ast, node ) { const comments = []; const astComments = ast.templateBody ? ast.templateBody.comments : ast.comments;