mirror of
https://github.com/ansible/awx.git
synced 2026-05-11 03:17:38 -02:30
Merge pull request #10390 from rooftopcellist/update-translations
Update translation make target for ui_next SUMMARY This adds the --clean flag to the extract-strings command (cleans up obsolete strings) and separates out the extract-template command. ISSUE TYPE Feature Pull Request COMPONENT NAME Translation Automation AWX VERSION 19.2.0 Reviewed-by: Jake McDermott <yo@jakemcdermott.me> Reviewed-by: Christian Adams <rooftopcellist@gmail.com> Reviewed-by: Alex Corey <Alex.swansboro@gmail.com>
This commit is contained in:
9
Makefile
9
Makefile
@@ -551,10 +551,13 @@ awx-kube-dev-build: Dockerfile.kube-dev
|
|||||||
# Translation TASKS
|
# Translation TASKS
|
||||||
# --------------------------------------
|
# --------------------------------------
|
||||||
|
|
||||||
# generate UI .pot
|
# generate UI .pot file, an empty template of strings yet to be translated
|
||||||
pot: $(UI_BUILD_FLAG_FILE)
|
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 --clean
|
||||||
$(NPM_BIN) --prefix awx/ui_next --loglevel warn run extract-template
|
|
||||||
|
# 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
|
# generate API django .pot .po
|
||||||
LANG = "en-us"
|
LANG = "en-us"
|
||||||
|
|||||||
@@ -74,6 +74,7 @@
|
|||||||
"lint": "eslint --ext .js --ext .jsx .",
|
"lint": "eslint --ext .js --ext .jsx .",
|
||||||
"add-locale": "lingui add-locale",
|
"add-locale": "lingui add-locale",
|
||||||
"extract-strings": "lingui extract",
|
"extract-strings": "lingui extract",
|
||||||
|
"extract-template": "lingui extract-template",
|
||||||
"compile-strings": "lingui compile",
|
"compile-strings": "lingui compile",
|
||||||
"prettier": "prettier --write \"src/**/*.{js,jsx,scss}\"",
|
"prettier": "prettier --write \"src/**/*.{js,jsx,scss}\"",
|
||||||
"prettier-check": "prettier --check \"src/**/*.{js,jsx,scss}\""
|
"prettier-check": "prettier --check \"src/**/*.{js,jsx,scss}\""
|
||||||
|
|||||||
Reference in New Issue
Block a user