From fb1a5c0db5ce6ef728ed2371f8e5256d2bca133d Mon Sep 17 00:00:00 2001 From: "Christian M. Adams" Date: Tue, 8 Jun 2021 09:58:51 -0400 Subject: [PATCH] Update translation make target for ui_next --- Makefile | 9 ++++++--- awx/ui_next/package.json | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index ae70de0583..46a9adf8a2 100644 --- a/Makefile +++ b/Makefile @@ -551,10 +551,13 @@ awx-kube-dev-build: Dockerfile.kube-dev # Translation TASKS # -------------------------------------- -# generate UI .pot +# generate UI .pot file, an empty template of strings yet to be translated pot: $(UI_BUILD_FLAG_FILE) - $(NPM_BIN) --prefix awx/ui_next --loglevel warn run extract-strings - $(NPM_BIN) --prefix awx/ui_next --loglevel warn run extract-template + $(NPM_BIN) --prefix awx/ui_next --loglevel warn run extract-template --clean + +# generate UI .po files for each locale (will update translated strings for `en`) +po: $(UI_BUILD_FLAG_FILE) + $(NPM_BIN) --prefix awx/ui_next --loglevel warn run extract-strings -- --clean # generate API django .pot .po LANG = "en-us" diff --git a/awx/ui_next/package.json b/awx/ui_next/package.json index b1db2991e2..4ffe1d1d95 100644 --- a/awx/ui_next/package.json +++ b/awx/ui_next/package.json @@ -74,6 +74,7 @@ "lint": "eslint --ext .js --ext .jsx .", "add-locale": "lingui add-locale", "extract-strings": "lingui extract", + "extract-template": "lingui extract-template", "compile-strings": "lingui compile", "prettier": "prettier --write \"src/**/*.{js,jsx,scss}\"", "prettier-check": "prettier --check \"src/**/*.{js,jsx,scss}\""