From cbf0c2704d7865140f1ccdaf534511ce9154ec07 Mon Sep 17 00:00:00 2001 From: Shane McDonald Date: Thu, 12 Jan 2017 21:06:08 -0500 Subject: [PATCH] Separate API and UI l10n make targets. A couple reasons for this: - The command for generating the API l10n files is currently broken, and I want to get the translation folks looking at the UI ASAP. - These things require different environments: - Generating the UI files requires Grunt, which is only available *before* packaging. We generate the static files before invoking mock or pbuilder. - Generating the API files requires Django, which is only available inside the virtual environment. This will likely need to be invoked somewhere inside of the install playbooks. --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index c0c8f62d75..5acfa44f86 100644 --- a/Makefile +++ b/Makefile @@ -559,9 +559,12 @@ messages: fi; \ $(PYTHON) manage.py makemessages -l $(LANG) --keep-pot -# generate l10n .json .mo -languages: $(UI_DEPS_FLAG_FILE) check-po +# generate l10n .json +ui-languages: $(UI_DEPS_FLAG_FILE) check-po $(NPM_BIN) --prefix awx/ui run languages + +# generate l10n .mo +api-languages: @if [ "$(VENV_BASE)" ]; then \ . $(VENV_BASE)/tower/bin/activate; \ fi; \ @@ -592,8 +595,7 @@ ui-devel: $(UI_DEPS_FLAG_FILE) ui-release: $(UI_RELEASE_FLAG_FILE) -# todo: include languages target when .po deliverables are added to source control -$(UI_RELEASE_FLAG_FILE): $(UI_DEPS_FLAG_FILE) +$(UI_RELEASE_FLAG_FILE): ui-languages $(UI_DEPS_FLAG_FILE) $(NPM_BIN) --prefix awx/ui run build-release touch $(UI_RELEASE_FLAG_FILE)