So I have a model that has a status field, for that I've created an Enum class, like that:
class Status(Enum):
PENDING_APPROVAL = "PENDING-APPROVAL"
PLANNED = "PLANNED"
APPROVED = "APPROVED"
CHANGED_PLAN = "CHANGED-PLAN"
COMPLETED = "COMPLETED"
CANCELED = "CANCELED"
And then added this class as a choice for the model:
status = models.CharField(
choices=[(tag.value, tag.name) for tag in Status],
max_length=20,
verbose_name=pgettext("Order", "Status"),
default=Status.PENDING_APPROVAL.value,
)
All works fine, but the problem is that once I click on my dropdown to pick a choice from my Enum class, I want for my choices to be translated to the other language of my site.
I cannot find how to translate my Enum's class choices to the language that I need.