bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gettext] [bug #50920] support Javascript template strings in xgette


From: Vaclav Slavik
Subject: [bug-gettext] [bug #50920] support Javascript template strings in xgettext
Date: Fri, 12 May 2017 08:09:25 -0400 (EDT)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.1 Safari/603.1.30

Follow-up Comment #5, bug #50920 (project gettext):

This is a little bit more serious than simply not extracting such strings - it
sometimes breaks parsing of the JS file even if a template string is not used
in connection with gettext. As an example, feeding xgettext this file:


window.location.href = `/${path}`;    
_('hello');


will not extract "hello" (a normal string) or any subsequent _() calls simply
because a template string with / in it happened before:


$ xgettext -o- x.js
x.js:3: warning: RegExp literal terminated too early
$


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?50920>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]