#21113: django_admin_log table stores messages in different languages depending on which language was active while editing. ---------------------------------+------------------------------------ Reporter: dimyur27@… | Owner: Type: New feature | Status: new Component: contrib.admin | Version: master Severity: Normal | Resolution: Keywords: admin logs i18n | Triage Stage: Accepted Has patch: 1 | Needs documentation: 0 Needs tests: 1 | Patch needs improvement: 1 Easy pickings: 0 | UI/UX: 0 ---------------------------------+------------------------------------ Changes (by jooyous):
* status: assigned => new * needs_better_patch: 0 => 1 * has_patch: 0 => 1 * needs_tests: 0 => 1 * owner: jooyous => Comment: https://github.com/django/django/pull/3345 Here's a partial fix for this bug. It changes the log messages so that they're saved in the database in English and then parsed and translated when they need to be displayed. However, due to the way the change messages were written upon being entered into the database, I wasn't able to properly distinguish between different types of save messages. For example, if an object (for example, a Poll or Choice) contained a period or quotation marks in the body, I could not tell the difference between the end of the message and the punctuation within the message body. So I'm only submitting a partial fix. From what I could test, it works pretty well for Users. I was also having some trouble getting certain words to translate. If having history messages displayed in different languages is a priority, I would recommend restructuring the logging functionality entirely, and have the messages be saved in an unambiguously delimited format (yaml? json? something!) so that they can be formed into translatable sentences after they are extracted from the database. I would be willing to work on this if an issue gets made! -- Ticket URL: <https://code.djangoproject.com/ticket/21113#comment:9> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/076.21f21038608b0586519bbe64a7101169%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.