Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#21347 closed Bug (fixed)

JS variable should be local but is global

Reported by: szymon.barglowski@… Owned by: nobody
Component: Internationalization Version: 1.5
Severity: Normal Keywords: JavaScript
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description (last modified by Claude Paroz)

django/views/i18n.py includes the following function:

function ngettext(singular, plural, count) {
  value = catalog[singular];
  if (typeof(value) == 'undefined') {
    return (count == 1) ? singular : plural;
  } else {
    return value[pluralidx(count)];
  }
}

The "var" keyword is missing in line:

value = catalog[singular];

Change History (3)

comment:1 by Claude Paroz, 11 years ago

Description: modified (diff)
Easy pickings: set
Triage Stage: UnreviewedAccepted

comment:2 by Tim Graham <timograham@…>, 11 years ago

Resolution: fixed
Status: newclosed

In 0b1d425a4128928291bfaa2c2582e715ef60937d:

Fixed #21347 -- Added missing JS variable declaration.

Thanks szymon.barglowski at gmail.com for the report.

comment:3 by Tim Graham <timograham@…>, 11 years ago

In 5217d01b77188d79387bb7fa333e5349f66a8efe:

[1.6.x] Fixed #21347 -- Added missing JS variable declaration.

Thanks szymon.barglowski at gmail.com for the report.

Backport of 0b1d425a41 from master

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