From b3a1d8fb988c64439e78b90aae955b7c38890184 Mon Sep 17 00:00:00 2001 From: zdm Date: Sun, 18 Feb 2024 00:48:10 +0200 Subject: [PATCH] fix: translations --- lib/get-text.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/get-text.js b/lib/get-text.js index ca3900ec..cc16ed7b 100644 --- a/lib/get-text.js +++ b/lib/get-text.js @@ -187,7 +187,6 @@ export default class GetText { return result( [ 500, message ] ); } - // XXX #parseCallExpression ( ast, node, { start } = {} ) { let method; @@ -265,9 +264,12 @@ export default class GetText { start, } ); - // XXX singular must be template - - // XXX must be trmplate + if ( !singular.isTemplate || !plural.isTemplate ) { + throw this.#error( `Plural message must be msgid tagged template`, { + node, + start, + } ); + } extractedMessage.pluralId = plural.value; }