#19869: Make changing the active language inside `LiveTestServerCase` possible -------------------------------------+------------------------------------- Reporter: void | Owner: Type: New feature | unaizalakain Component: Testing framework | Status: assigned Severity: Normal | Version: master Keywords: | Resolution: Has patch: 1 | Triage Stage: Accepted Needs tests: 0 | Needs documentation: 0 Easy pickings: 0 | Patch needs improvement: 0 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by unaizalakain): The ``set_language`` view could be used to change the live test server thread language but that would mean adding some kind of new method to the test case and the inability to use the already defined methods (`django.utils.translation.override`, `django.utils.translation.activate`, etc). Instead, the PR opts for making the thread local that holds the current active language a non-local. This is done in the two threads so suddenly one thread is capable of accessing the other one's active language. This is afterwards reverted to thread locals again. -- Ticket URL: <https://code.djangoproject.com/ticket/19869#comment:11> 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/062.bf2a209c8cb36e068cd7ee5c1b9f6589%40djangoproject.com. For more options, visit https://groups.google.com/groups/opt_out.