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

"Please correct the error below." is not translated. #21

Open
Floris272 opened this issue Dec 10, 2024 · 0 comments
Open

"Please correct the error below." is not translated. #21

Floris272 opened this issue Dec 10, 2024 · 0 comments
Labels
bug Something isn't working triage

Comments

@Floris272
Copy link
Contributor

Floris272 commented Dec 10, 2024

Product versie / Product version

0.0.1

Omschrijf het probleem / Describe the bug

Django 4.2 does not translate the message "Please correct the error below." when for example saving an object in the admin with required fields not filled in. Everything else is translated correctly.

image

The issue is that change_form.html uses {% blocktranslate %} for both the signular and plural form.

{% blocktranslate count counter=errors|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktranslate %}

The current translation in Django 4.2 looks like the following:

msgid "Please correct the error below."
msgstr "Corrigeer de fout hieronder."

msgid "Please correct the errors below."
msgstr "Corrigeer de fouten hieronder."

But when using blocktranslation it needs to look like this:

msgid "Please correct the error below."
msgid_plural "Please correct the errors below."
msgstr[0] "Por favor, corrija el siguiente error."
msgstr[1] "Por favor, corrija los siguientes errores."
msgstr[2] "Por favor, corrija los siguientes errores."

For NL this seems to have been added in Django 5.1

it can be fixed by adding the translations manually to django.po inside open_producten

msgid "Please correct the error below."
msgid_plural "Please correct the errors below."
msgstr[0] "Corrigeer de onderstaande fout."
msgstr[1] "Corrigeer de onderstaande fouten."

but they are commented out when running makemessages or removed when using --no-obsolete. Adding a dummy use also does not work because it will generate them the old way.

Stappen om te reproduceren / Steps to reproduce

No response

Verwacht gedrag / Expected behavior

No response

@Floris272 Floris272 added bug Something isn't working triage labels Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

1 participant