mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #35973 -- Improved makemessages locale validation to handle numeric region codes.
This commit is contained in:
committed by
Sarah Boyce
parent
d345e5b5f8
commit
08feaae588
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user