diff options
| author | Juan Pablo Mallarino <mjuanpablo@google.com> | 2024-12-05 08:14:59 -0500 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2024-12-09 08:32:11 +0100 |
| commit | 08feaae5885f5719b8a7471b19f0d7e720b2137e (patch) | |
| tree | ba878db12e814fe975ee432195e2ab8a24e2b786 /tests/i18n | |
| parent | d345e5b5f88af64b1c3d95582cdaea4beb773120 (diff) | |
Fixed #35973 -- Improved makemessages locale validation to handle numeric region codes.
Diffstat (limited to 'tests/i18n')
| -rw-r--r-- | tests/i18n/test_extraction.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/i18n/test_extraction.py b/tests/i18n/test_extraction.py index 7aa600c4c1..e4a6260c33 100644 --- a/tests/i18n/test_extraction.py +++ b/tests/i18n/test_extraction.py @@ -179,6 +179,15 @@ class BasicExtractorTests(ExtractorTests): self.assertIn("processing locale en_GB", out.getvalue()) self.assertIs(Path("locale/en_GB/LC_MESSAGES/django.po").exists(), True) + def test_valid_locale_with_numeric_region_code(self): + out = StringIO() + management.call_command( + "makemessages", locale=["ar_002"], stdout=out, verbosity=1 + ) + self.assertNotIn("invalid locale ar_002", out.getvalue()) + self.assertIn("processing locale ar_002", out.getvalue()) + self.assertIs(Path("locale/ar_002/LC_MESSAGES/django.po").exists(), True) + def test_valid_locale_tachelhit_latin_morocco(self): out = StringIO() management.call_command( |
