mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #30221 -- Made label suffix of admin's read-only fields translatable.
This commit is contained in:
committed by
Tim Graham
parent
25e724a5d6
commit
4dcbe6eb2d
@@ -4961,6 +4961,13 @@ class ReadonlyTest(AdminFieldExtractionMixin, TestCase):
|
||||
self.assertNotContains(response, "<a>evil</a>", status_code=200)
|
||||
self.assertContains(response, "<a>evil</a>", status_code=200)
|
||||
|
||||
def test_label_suffix_translated(self):
|
||||
pizza = Pizza.objects.create(name='Americano')
|
||||
url = reverse('admin:admin_views_pizza_change', args=(pizza.pk,))
|
||||
with self.settings(LANGUAGE_CODE='fr'):
|
||||
response = self.client.get(url)
|
||||
self.assertContains(response, '<label>Toppings\u00A0:</label>', html=True)
|
||||
|
||||
|
||||
@override_settings(ROOT_URLCONF='admin_views.urls')
|
||||
class LimitChoicesToInAdminTest(TestCase):
|
||||
|
||||
Reference in New Issue
Block a user