Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The translation of the message "No active account found with the given credentials" does not work in various locales #798

Open
Upr82 opened this issue Apr 15, 2024 · 1 comment
Labels

Comments

@Upr82
Copy link

Upr82 commented Apr 15, 2024

When sending requests to the "auth/jwt/create" endpoint, the message "No active account found with the given credentials" is not translated:

{
    "detail": "No active account found with the given credentials"
}

But the message about the missing field is translated correctly:

{
    "email": [
        "Este campo es requerido."
    ]
}

I checked for the "es" and "ru" locales.

Django==4.2.3
djangorestframework==3.14.0
djangorestframework-simplejwt==5.2.2
INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    ...
]

MIDDLEWARE = [
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'corsheaders.middleware.CorsMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'django.middleware.locale.LocaleMiddleware',
]

LANGUAGE_CODE = 'es'
@Andrew-Chen-Wang
Copy link
Member

:(

Possibly need locales to be updated. Just merged an auto locale script fixer thanks to some amazing helpers. Will get back to this soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants