mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-05-06 05:01:48 +02:00
Update ihatemoney/utils.py
Co-Authored-By: Glandos <bugs-github@antipoul.fr>
This commit is contained in:
parent
1497d2c666
commit
9d91eea6c2
1 changed files with 1 additions and 6 deletions
|
@ -320,12 +320,7 @@ def localize_list(list, surround_with_em=True):
|
|||
middle = _("{previous_object}, {next_object}")
|
||||
end = _("{previous_object}, and {end_object}")
|
||||
|
||||
item_wrapper = em_surround
|
||||
# fmt: off
|
||||
if not surround_with_em:
|
||||
def item_wrapper(x):
|
||||
return x
|
||||
# fmt: on
|
||||
item_wrapper = em_surround if surround_with_em else lambda x: x
|
||||
|
||||
if len(list) == 1:
|
||||
return one.format(single_object=item_wrapper(list[0]))
|
||||
|
|
Loading…
Reference in a new issue