Opened 3 years ago

Closed 3 years ago

#25303 closed Bug (worksforme)

help_text on auth model field 'is_active' doesn't get translated

Reported by: Wenze van Klink Owned by: nobody
Component: contrib.admin Version: 1.8
Severity: Normal Keywords: admin translation
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description (last modified by Wenze van Klink)

When I set the admin language to Dutch (nl) not all the sentences are showing in Dutch. But the sentences are available in the .po file. So it seems something else is wrong. See image, the active field is translated but not the help text.

Attachments (1)

translation not working.png (61.3 KB) - added by Wenze van Klink 3 years ago.

Download all attachments as: .zip

Change History (10)

Changed 3 years ago by Wenze van Klink

Attachment: translation not working.png added

comment:1 Changed 3 years ago by Wenze van Klink

Description: modified (diff)

comment:2 Changed 3 years ago by Wenze van Klink

Description: modified (diff)

comment:3 Changed 3 years ago by Claude Paroz

Could you please specify the exact version of Django you are using? Are you using a custom user model or the standard from contrib.auth.models.User?

comment:4 Changed 3 years ago by Wenze van Klink

Django==1.8.3

I'm using a custom user model: AUTH_USER_MODEL = 'authtools.User'

https://github.com/fusionbox/django-authtools

comment:5 Changed 3 years ago by Tim Graham

Resolution: duplicate
Status: newclosed
Summary: Admin translation: Not everything gets translatedpermission names aren't translated

Looks like the issue is specific to permission names which is a duplicate of #1688, #11105, #12396, #13861.

comment:6 Changed 3 years ago by Wenze van Klink

To me it seems that this isn't a permission in the database. Because it is available in the .po translation file, the permissions are not. It is a 'help_text' on the model, see: https://github.com/django/django/blob/master/django/contrib/auth/models.py#L328

And 'superuserstatus' and 'staffstatus' do get translated correctly, which are the same type of fields?

comment:7 Changed 3 years ago by Wenze van Klink

Resolution: duplicate
Status: closednew

comment:8 Changed 3 years ago by Wenze van Klink

Summary: permission names aren't translatedhelp_text on auth model field 'is_active' doesn't get translated

comment:9 Changed 3 years ago by Claude Paroz

Resolution: worksforme
Status: newclosed

I think the problem is that the string in django-authtools is not identical to the one from django.contrib.auth. See https://github.com/fusionbox/django-authtools/blob/master/authtools/models.py#L35 and look at the double space after the point.

Note: See TracTickets for help on using tickets.
Back to Top