From ef5aa49b69341c6e7bb94638b26a2f795d3012c8 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 29 Sep 2019 10:54:32 +0200 Subject: [PATCH] xgettext: Verify parsing of JavaScript template literals inside objects. Reported by Andy Holmes in . * gettext-tools/tests/xgettext-javascript-7: Test template literals inside an object. --- gettext-tools/tests/xgettext-javascript-7 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gettext-tools/tests/xgettext-javascript-7 b/gettext-tools/tests/xgettext-javascript-7 index 2d612a96d..1f668f9ba 100755 --- a/gettext-tools/tests/xgettext-javascript-7 +++ b/gettext-tools/tests/xgettext-javascript-7 @@ -21,6 +21,9 @@ var f1 = function () { return _("first normal string") + `${foo}` + _("second normal string"); }; var s11 = _("another normal string"); +var s12 = { property: `A template literal with ${n} substitution` }; +var s13 = _("yet another normal string"); + EOF : ${XGETTEXT=xgettext} @@ -78,6 +81,9 @@ msgstr "" msgid "another normal string" msgstr "" + +msgid "yet another normal string" +msgstr "" EOF : ${DIFF=diff} -- 2.47.2