Skip to content

Commit 7c22242

Browse files
committed
Pluralize visit count
1 parent 053dc1d commit 7c22242

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/wagtail_personalisation/rules.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from datetime import datetime
55

66
from django.db import models
7-
from django.template.defaultfilters import slugify
7+
from django.template.defaultfilters import pluralize, slugify
88
from django.utils.encoding import python_2_unicode_compatible
99
from django.utils.translation import ugettext_lazy as _
1010
from modelcluster.fields import ParentalKey
@@ -251,9 +251,10 @@ def description(self):
251251
'title': _('These users visited {}').format(
252252
self.counted_page
253253
),
254-
'value': _('{} {} times').format(
254+
'value': _('{} {} time{}').format(
255255
self.get_operator_display(),
256-
self.count
256+
self.count,
257+
pluralize(self.count)
257258
),
258259
}
259260

0 commit comments

Comments
 (0)