Add extraction of strings to be translated as part of build process

Add extraction of strings to be translated as part of build process for
ui_next.

Also, sets the source locale. See: https://lingui.js.org/tutorials/cli.html#configuring-source-locale

closes: https://github.com/ansible/awx/issues/7451
This commit is contained in:
nixocio
2020-07-01 11:29:08 -04:00
parent e3e69b4c6b
commit fab94902a0
3 changed files with 5 additions and 1 deletions

1
.gitignore vendored
View File

@@ -29,6 +29,7 @@ awx/ui/client/languages
awx/ui/templates/ui/index.html
awx/ui/templates/ui/installing.html
awx/ui_next/node_modules/
awx/ui_next/src/locales/
awx/ui_next/coverage/
awx/ui_next/build
awx/ui_next/.env.local

View File

@@ -576,6 +576,8 @@ ui-release-next:
touch awx/ui_next/build/static/.placeholder
ui-devel-next: awx/ui_next/node_modules
$(NPM_BIN) --prefix awx/ui_next run extract-strings
$(NPM_BIN) --prefix awx/ui_next run compile-strings
$(NPM_BIN) --prefix awx/ui_next run build
mkdir -p awx/public/static/css
mkdir -p awx/public/static/js

View File

@@ -1,5 +1,6 @@
{
"localeDir": "src/locales/",
"srcPathDirs": ["src/"],
"format": "po"
"format": "po",
"sourceLocale": "en"
}