Skip to content

Commit

Permalink
fix: translations
Browse files Browse the repository at this point in the history
  • Loading branch information
zdm committed Feb 17, 2024
1 parent aa26963 commit 519b182
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions lib/get-text.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ export default class GetText {
return result( [ 500, message ] );
}

// XXX extract commants
#parseCallExpression ( ast, node, { start } = {} ) {
let method;

Expand Down Expand Up @@ -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( {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 519b182

Please sign in to comment.