8

Fixed logged in rule string

Signed-off-by: Jasper Berghoef <jasper.berghoef@gmail.com>
This commit is contained in:
Jasper Berghoef
2017-01-10 14:10:09 +01:00
parent b7ca6541f4
commit 9b90551e3b
2 changed files with 5 additions and 7 deletions

View File

@@ -64,7 +64,7 @@ class TimeRule(AbstractBaseRule):
return starting_time <= current_time <= ending_time
def __str__(self):
return 'Time Rule'
return _('Time Rule')
@python_2_unicode_compatible
@@ -90,7 +90,7 @@ class ReferralRule(AbstractBaseRule):
return False
def __str__(self):
return 'Referral Rule'
return _('Referral Rule')
@python_2_unicode_compatible
@@ -148,7 +148,7 @@ class VisitCountRule(AbstractBaseRule):
return False
def __str__(self):
return 'Visit count Rule'
return _('Visit count Rule')
@python_2_unicode_compatible
@@ -177,7 +177,7 @@ class QueryRule(AbstractBaseRule):
return False
def __str__(self):
return 'Query Rule'
return _('Query Rule')
@python_2_unicode_compatible
@@ -196,7 +196,7 @@ class UserIsLoggedInRule(AbstractBaseRule):
return request.user.is_authenticated() == self.is_logged_in
def __str__(self):
return '{}'.format(self.is_logged_in)
return _('Logged In Rule')
@python_2_unicode_compatible

View File

@@ -41,7 +41,6 @@ class SegmentModelAdmin(ModelAdmin):
index_view_extra_css = ['personalisation/segment/index.css']
form_view_extra_css = ['personalisation/segment/form.css']
modeladmin_register(SegmentModelAdmin)
@@ -83,7 +82,6 @@ def segment_user(page, request, serve_args, serve_kwargs):
segments_adapter.refresh()
@hooks.register('before_serve_page')
def serve_variation(page, request, serve_args, serve_kwargs):
user_segments = []