Implemented Verbose Name Translation for TokenProxy (#8713)

This commit is contained in:
Giebisch 2022-11-27 11:45:54 +01:00 committed by GitHub
parent 52f4139674
commit 4ef0fc1ca0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,17 @@
# Generated by Django 4.1.3 on 2022-11-24 21:07
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('authtoken', '0003_tokenproxy'),
]
operations = [
migrations.AlterModelOptions(
name='tokenproxy',
options={'verbose_name': 'Token', 'verbose_name_plural': 'Tokens'},
),
]

View File

@ -51,4 +51,5 @@ class TokenProxy(Token):
class Meta:
proxy = 'rest_framework.authtoken' in settings.INSTALLED_APPS
abstract = 'rest_framework.authtoken' not in settings.INSTALLED_APPS
verbose_name = "token"
verbose_name = _("Token")
verbose_name_plural = _("Tokens")