I am using django with the french i18n enabled. When I add a new object from the admin I get a Unicode Error. I fixed the problem with this patch
The french message was : L'objet %(name)s "%(obj)s" a été ajouté avec succès.
Index: main.py
===================================================================
--- main.py (revision 5173)
+++ main.py (working copy)
@@ -254,7 +254,9 @@
new_object = manipulator.save(new_data)
pk_value = new_object._get_pk_val()
LogEntry.objects.log_action(request.user.id, ContentType.objects.get_for_model(model).id, pk_value, str(new_object), ADDITION)
- msg = _('The %(name)s "%(obj)s" was added successfully.') % {'name': opts.verbose_name, 'obj': new_object}
+ from django.utils.encoding import StrAndUnicode, smart_unicode
+ msg = smart_unicode(_('The %(name)s "%(obj)s" was added successfully.'))
+ msg = msg % {'name': opts.verbose_name, 'obj': new_object}
# Here, we distinguish between different save types by checking for
# the presence of keys in request.POST.
if "_continue" in request.POST: