This is a patch to fix lazy translation failure in some circumstances when Argument helps are gettext_lazy proxies.
This will require an upstream patch on Typer. The attribute error is caused by this function attempting to call a str function on a lazy string object.
|
# this is a patch to fix lazy translation failure in some circumstances |
|
# when Argument helps are gettext_lazy proxies. This is I think actually |
|
# a problem with typer that can be fixed in a number of different ways |
|
# but this is the easiest |
|
from typer._click import _compat |
|
|
|
strip_ansi = _compat.strip_ansi |
|
_compat.strip_ansi = lambda value: strip_ansi(str(value)) |
This is a patch to fix lazy translation failure in some circumstances when Argument helps are gettext_lazy proxies.
This will require an upstream patch on Typer. The attribute error is caused by this function attempting to call a str function on a lazy string object.
django-typer/src/django_typer/patch.py
Lines 107 to 114 in 7e32424