gettext_lazy not working in Django template

Ah, I see, my database only contains the letters, indeed, thank you. Is there a way to get the appropriate string from the PeriodChoices class by using the letters “a” - “m”? I was able to get the translation strings using PeriodChoices.ONE.label but this means having to change ONE to TWO and so on makes it impossible for it to be used to convert “a” to “1 month”. I should be able to use something like PeriodChoices.labels[“a”].

I ended up using something questionable but it works. I used a custom template tag to translate the letters to their labels by returning:

def translate_period(period):

"""
Translates period letters 'a' - 'm' to their translation '1 month', ...
"""
return AssignmentAd.PeriodChoices.labels[ord(period) - 96]