bugGNU gettext - Bugs: bug #62203, JavaScript parser stops at the 1st...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #62203: JavaScript parser stops at the 1st template string in curly braces ”{}“ after left shift operators ”<<“

Submitter:  tuberry
Submitted:  Sat 19 Mar 2022 07:11:24 PM UTC
   
 
Category:  JavaScript Severity:  3 - Normal
Item Group:  None Status:  Fix Released
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed

Sun 01 Dec 2024 04:35:31 PM UTC, comment #3: 

The fix is contained in gettext 0.23.

Bruno Haible <haible>
Group administrator
Thu 26 Sep 2024 11:13:44 PM UTC, comment #2: 
Bruno Haible <haible>
Group administrator
Fri 10 Feb 2023 06:03:15 PM UTC, comment #1: 

I have a similar problem, i don't have a "<<" but a "++".
In my case JavaScript parser stops at the 1st template string in curly braces ”{}“ after increment operators ”++“.

```js
// test.js
if (this._nAttempts++  < 100) {
_('a');
{
    _('b')
    `${1}`;
    _('c');
}
_('d');
```
Only string `a` and `b` will be extracted when running `xgettext test.js --output=-` in a terminal. (gettext 0.21-11 / Debian Testing)

Gianni Lerro <glerro>
Sat 19 Mar 2022 07:11:24 PM UTC, original submission:  

As the title,
```js
// test.js
1 << 1;
_('a');
{
    _('b')
    `${1}`;
    _('c');
}
_('d');

```
Only string `a` and `b` will be extracted when running `xgettext test.js --output=-` in a terminal. (gettext 0.21-2 / Arch)

tuberry

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by haible (Posted a comment)
  • -email is unavailable- added by glerro (Posted a comment)
  • -email is unavailable- added by tuberry (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-12-01 haible StatusFixed Fix Released
    2024-09-26 haible StatusNone Fixed
        Assigned toNone haible
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.14-31c1.
    Corresponding source code