Implemented Verbose Name Translation for TokenProxy#8713
Conversation
| proxy = 'rest_framework.authtoken' in settings.INSTALLED_APPS | ||
| abstract = 'rest_framework.authtoken' not in settings.INSTALLED_APPS | ||
| verbose_name = "token" | ||
| verbose_name = _("Token") |
There was a problem hiding this comment.
just to make sure, adding this two lines with modified values, is there any possible missing migrations?
There was a problem hiding this comment.
As far as I understand it, no. Migrations only accept hard coded values, but since this is not one, a migration would not make sense. It must be created when the language is set.
There was a problem hiding this comment.
the TokenProxy model is inheriting from https://github.com/encode/django-rest-framework/blob/master/rest_framework/authtoken/models.py#L27 but still not showing it properly, right?
There was a problem hiding this comment.
from the migrations history https://github.com/encode/django-rest-framework/tree/master/rest_framework/authtoken/migrations it would be safer to check locally if new migrations are generated with this two attribute changes in meta. if not it is OK. but if so, we must have to ship it with the package :)
There was a problem hiding this comment.
thanks for adding the missing auto migration
| proxy = 'rest_framework.authtoken' in settings.INSTALLED_APPS | ||
| abstract = 'rest_framework.authtoken' not in settings.INSTALLED_APPS | ||
| verbose_name = "token" | ||
| verbose_name = _("Token") |
There was a problem hiding this comment.
from the migrations history https://github.com/encode/django-rest-framework/tree/master/rest_framework/authtoken/migrations it would be safer to check locally if new migrations are generated with this two attribute changes in meta. if not it is OK. but if so, we must have to ship it with the package :)
90e276b to
be94cd6
Compare
|
@auvipy Can you help me out there for a second ? Do you know what went wrong with the Python 3.9 CI check? Can't quite figure it out |
|
that is not related to this PR from what I have seen. |
Added translation for verbose name of TokenProxy
Fixes Issue #8537