provision: Detect missing language_name_map.json.

If somebody is having issues with provision, it's
plausible they'll do something like `git clean -fX`
to clean up old artifacts of earlier provision runs,
as part of debugging things.

We defend against this by detecting the most obvious
symptom as cheaply as possible.
This commit is contained in:
Steve Howell
2020-04-16 11:29:50 +00:00
committed by Tim Abbott
parent 765d40b34c
commit 796351ed9e

View File

@@ -95,6 +95,11 @@ def setup_bash_profile() -> None:
setup_shell_profile(BASH_PROFILES[0])
def need_to_run_compilemessages() -> bool:
if not os.path.exists('locale/language_name_map.json'):
# User may have cleaned their git checkout.
print('Need to run compilemessages due to missing language_name_map.json')
return True
# Consider updating generated translations data: both `.mo`
# files and `language-options.json`.
paths = ['zerver/management/commands/compilemessages.py']