Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#15331 closed Uncategorized (duplicate)

xgettext skips some translation strings in javascript files when using the "condition ? true_result : false_result" pattern

Reported by: aarranz@… Owned by: nobody
Component: Internationalization Version: 1.2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Javascript example code:

gettext("foo");

true ? true : false;

gettext("bar");

true ? true : false;

gettext("baz");

true ? true : false; // ?

gettext("quz");

"?";

gettext("foobar");

"bar" is ignored when running "manage.py makemessages". Apparently this is related to the presence of "?" commonly used in the "condition ? true_result : false_result" pattern.

This bug is similar to #4695

Change History (3)

comment:1 Changed 4 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Summary changed from xgettext skips some translation strings in javascript files to xgettext skips some translation strings in javascript files when using the "condition ? true_result : false_result" pattern

comment:2 Changed 4 years ago by ramiro

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #14045.

comment:3 Changed 4 years ago by nedbatchelder

  • Severity set to Normal
  • Type set to Uncategorized

See the patches on #7704 for a fix.

Note: See TracTickets for help on using tickets.
Back to Top