Opened 17 years ago
Closed 17 years ago
#5132 closed (duplicate)
admin/views/auth.py change password is not working
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | contrib.admin | Version: | 0.96 |
Severity: | Keywords: | admin auth | |
Cc: | gomo@… | Triage Stage: | Unreviewed |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Error code:
File "/var/lib/python-support/python2.5/django/contrib/admin/views/auth.py" in user_change_password
- 'title': _('Change password: %s') % escape(user.username),
ValueError at /admin/auth/user/2/password/
unsupported format character 'S' (0x53) at index 22
The fix is really easy, in http://code.djangoproject.com/browser/django/trunk/django/contrib/admin/views/auth.py#L64[[br]]
just change
'title': _('Change password: %s' ) % escape(user.username),
for
'title': _('Change password: %s' % escape(user.username)) ,
i think this is self explanatory.
Attachments (3)
Change History (11)
by , 17 years ago
comment:1 by , 17 years ago
Javier - please attach this as a diff (do svn diff
from the root of your Django tree).
comment:2 by , 17 years ago
I don't have a svn version of django, so i just did a diff file using the simple diff command.
hope it helps.
comment:3 by , 17 years ago
I can't replicate this bug -- I was able to change my password successfully using Django trunk.
comment:6 by , 17 years ago
Cc: | added |
---|
I have the same problem. The provided fix solves it, but doesn't really make sense: we should be translating the template string, not the actual phrase with the username filled in. The weird thing is it actually works if you translate everything like the "fix" suggests.
I looked some more into this and the problem is in the es_AR translation, which uses %S (capital s) as a format string instead of the lowercase s. I am uploading a patch with that and some other typos in the translation fixed in #5214.
comment:7 by , 17 years ago
My fault, the es_AR translation as of 0.96 had some missing literals and this typo that broke things.
As per http://code.djangoproject.com/browser/django/branches there is no 0.96-bugfixes
branch yet so you will need to review and apply GomoX's patch from #5214 manually to your 0.96 copy.
See #3823, [4860], #4343, [5288] and http://groups.google.com/group/Django-I18N/browse_thread/thread/f3cd26dd912a73d1/
comment:8 by , 17 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Ramiro - I've mark edthis as duplicate since #5214 fixes it. Please re-open if the issue is more than a translation glitch.
Patched version