Skip to content

Commit

Permalink
Pluralize visit count
Browse files Browse the repository at this point in the history
  • Loading branch information
robmoorman committed May 31, 2017
1 parent 053dc1d commit 7c22242
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/wagtail_personalisation/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from datetime import datetime

from django.db import models
from django.template.defaultfilters import slugify
from django.template.defaultfilters import pluralize, slugify
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from modelcluster.fields import ParentalKey
Expand Down Expand Up @@ -251,9 +251,10 @@ def description(self):
'title': _('These users visited {}').format(
self.counted_page
),
'value': _('{} {} times').format(
'value': _('{} {} time{}').format(
self.get_operator_display(),
self.count
self.count,
pluralize(self.count)
),
}

Expand Down

0 comments on commit 7c22242

Please sign in to comment.