Skip to content

Commit

Permalink
Make text message for test_normalization give the command used
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Aug 18, 2022
1 parent 6053f26 commit bc0a615
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion survey/tests/locale/test_locale_normalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ def test_normalization(self):
git_diff = subprocess.check_output(git_diff_command).decode("utf8")
# In the diff we should have a change only for the date of the generation
# So 2 * @@ * number of language
command_as_str = " ".join(makemessages_command)
number_of_change = git_diff.count("@@") / 2
msg = (
"You did not update the translation following your changes. Maybe you did not use the "
"normalized 'python3 manage.py makemessages --no-obsolete --no-wrap' ? If you're "
"working locally, just use 'git add {}', we launched it during tests.".format(self.LOCALE_PATH),
f"working locally, just use 'git add {self.LOCALE_PATH}', we launched "
f"'{command_as_str}' during tests.",
)
self.assertEqual(number_of_change, number_of_language, msg)

0 comments on commit bc0a615

Please sign in to comment.