Skip to content

Commit

Permalink
translates "Recognize..." statements
Browse files Browse the repository at this point in the history
  • Loading branch information
smirolo committed Jul 9, 2024
1 parent 3b6a2c2 commit 75afda4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions saas/humanize.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
'refund_type': r'(?P<refund_type>\S+)',
'subscriber_full_name': r'(?P<subscriber_full_name>(\S| )+)',
'subscription': r'(?P<subscriber>\S+):(?P<plan>\S+)',
'subscriber': r'(?P<subscriber>\S+)',
'sync_on': r'(?P<sync_on>\S+)',
'use_charge': r'(?P<use_charge>\S+)',
'unlock_event': r'(?P<unlock_event>\S+)',
Expand Down
4 changes: 3 additions & 1 deletion saas/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -1355,7 +1355,9 @@ def _as_html_description(transaction_descr,
descr = groups.get('descr')
if descr:
groups.update({'descr': _as_html_description(descr)})

if 'subscriber' in groups and 'plan' in groups:
groups.update({'subscription': "%s:%s" % (
groups.get('subscriber'), groups.get('plan'))})
result = trans % groups
pos = transaction_descr.rfind(' - ')
if pos > 0:
Expand Down

0 comments on commit 75afda4

Please sign in to comment.