diff options
| author | Claude Paroz <claude@2xlibre.net> | 2019-01-26 16:44:49 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2019-01-28 18:17:52 -0500 |
| commit | caaa01142d349c42f9f72bac8af83023b0b84d3f (patch) | |
| tree | c3f3e0f86efcd25290ecd489a62b0e7b5756e0c7 /django | |
| parent | 728358c5cf96898a00eea2f81a2e305c0754f0c3 (diff) | |
[2.2.x] Fixed #29825 -- Fixed JS ngettext if the string is a non-plural msgid in the catalog.
Backport of 16454ac35f6a24a04b23a9340b0d62c33edbc1ea from master.
Diffstat (limited to 'django')
| -rw-r--r-- | django/views/i18n.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/views/i18n.py b/django/views/i18n.py index 3bd240ea3d..f684da23dc 100644 --- a/django/views/i18n.py +++ b/django/views/i18n.py @@ -113,7 +113,7 @@ js_catalog_template = r""" if (typeof(value) == 'undefined') { return (count == 1) ? singular : plural; } else { - return value[django.pluralidx(count)]; + return value.constructor === Array ? value[django.pluralidx(count)] : value; } }; |
