summaryrefslogtreecommitdiff
path: root/tests/i18n
diff options
context:
space:
mode:
authorJosh Santos <josh@omnidapps.com>2020-10-27 19:52:48 +0700
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-02-09 20:00:20 +0100
commit9c6ba876928fd20194ac3238dc06aeae66d7bd50 (patch)
tree31f30653b361aa5de9c2791f77fc4e65beabcacb /tests/i18n
parentd4ac23bee1c84d8e4610350202ac068fc90f38c0 (diff)
downloaddjango-9c6ba876928fd20194ac3238dc06aeae66d7bd50.tar.gz
Fixed #32145 -- Improved makemessages error message when app's locale directory doesn't exist.
Diffstat (limited to 'tests/i18n')
-rw-r--r--tests/i18n/test_extraction.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/i18n/test_extraction.py b/tests/i18n/test_extraction.py
index 73336816cb..ee8257175b 100644
--- a/tests/i18n/test_extraction.py
+++ b/tests/i18n/test_extraction.py
@@ -758,9 +758,13 @@ class CustomLayoutExtractionTests(ExtractorTests):
work_subdir = 'project_dir'
def test_no_locale_raises(self):
- msg = "Unable to find a locale path to store translations for file"
+ msg = (
+ "Unable to find a locale path to store translations for file "
+ "__init__.py. Make sure the 'locale' directory exist in an app or "
+ "LOCALE_PATHS setting is set."
+ )
with self.assertRaisesMessage(management.CommandError, msg):
- management.call_command('makemessages', locale=LOCALE, verbosity=0)
+ management.call_command('makemessages', locale=[LOCALE], verbosity=0)
def test_project_locale_paths(self):
self._test_project_locale_paths(os.path.join(self.test_dir, 'project_locale'))