Inside Kiwi TCMS we're using the following pattern:
list(
TestExecutionStatus.objects.filter(**query).values("id", "name", "weight", "icon", "color")
)
This returns the name field untranslated. From my limited experimentation I can tell that vinaigrette VinaigretteDescriptor doesn't seem to be triggered. (At least it doesn't reach the gettext part).
OTOH if I modify my code to look like:
result = []
for status in TestExecutionStatus.objects.filter(**query).distinct():
result.append({
"id": status.pk,
"name": status.name,
"weight": status.weight,
"icon": status.icon,
"color": status.color,
})
then the values for name field are returned translated.
Inside Kiwi TCMS we're using the following pattern:
This returns the name field untranslated. From my limited experimentation I can tell that vinaigrette VinaigretteDescriptor doesn't seem to be triggered. (At least it doesn't reach the gettext part).
OTOH if I modify my code to look like:
then the values for name field are returned translated.