Opened 11 years ago

Last modified 11 years ago

#21347 closed Bug

JS variable should be local but is global — at Version 1

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 (1)

comment:1 by Claude Paroz, 11 years ago

Description: modified (diff)
Easy pickings: set
Triage Stage: UnreviewedAccepted
Note: See TracTickets for help on using tickets.
Back to Top