Reported by <fiurgeist@gmail.com> at <https://savannah.gnu.org/bugs/?66643>.
* gettext-tools/src/x-javascript.c (phase5_get): Treat a '<' character in
level type level_embedded_js_in_xml like in the other level types.
* gettext-tools/tests/xgettext-javascript-6: Add another test case.
* NEWS: Mention the fix.
* The contents of the po/ directory has been changed:
- A file Makefile.in replaces the old Makefile.in.in.
# Programming languages support:
+ * JavaScript:
+ - xgettext now parses recursive JSX expressions correctly.
* C++:
- A new example 'hello-c++-gnome3' has been added.
* Ruby:
case '<':
{
/* We assume:
- - XMLMarkup and XMLElement are not allowed after an expression,
- - embedded JavaScript expressions in XML do not recurse.
+ XMLMarkup and XMLElement are not allowed after an expression.
*/
if (level_type () == level_xml_element
- || (level_type () != level_embedded_js_in_xml
- && ! is_after_expression ()))
+ || ! is_after_expression ())
{
/* Recognize XML markup: XML comment, CDATA, Processing
Instruction. */
var s17 = _("Expected translation string #17");
var s18 = `begin${ <div> _("Expected translation string #18") </div> }end`;
var s19 = _("Expected translation string #19");
+const s20 = () => (
+ <Foo
+ a1={_("Expected translation string #20")}
+ a2={foo && <div>_("Expected translation string #21")</div>}
+ a3={_("Expected translation string #22")}
+ />
+);
EOF
: ${XGETTEXT=xgettext}
msgid "Expected translation string #19"
msgstr ""
+
+msgid "Expected translation string #20"
+msgstr ""
+
+msgid "Expected translation string #21"
+msgstr ""
+
+msgid "Expected translation string #22"
+msgstr ""
EOF
: ${DIFF=diff}