universal_notifications icon indicating copy to clipboard operation
universal_notifications copied to clipboard

What is the underscore function shown in readme ?

Open ArnaudPel opened this issue 4 years ago • 1 comments

The nature of the _() function in the readme needs to be documented, or maybe renamed, eg. here:

email_subject = _('Order no. {{item.pk}} has been shipped.')

ArnaudPel avatar Sep 29 '20 11:09 ArnaudPel

@ArnaudPel That is likely from an import that deals with i18n. It is a common pattern I've seen. The gettext standard library is the likely candidate. But below is an example I use in my Django projects.

from django.utils.translation import gettext_lazy as _

BallisticPain avatar Oct 23 '21 22:10 BallisticPain