You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
atodorov
added a commit
to kiwitcms/Kiwi
that referenced
this issue
Jul 2, 2021
API methods TestExecutionStatus.filter() and TestCaseStatus.filter()
will now return translated values depending on the Accept-Language
header sent as part of the API request!
Related: ecometrica/django-vinaigrette#47
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.
The text was updated successfully, but these errors were encountered: