Skip to content

Commit

Permalink
Add extraction of strings to be translated as part of build process
Browse files Browse the repository at this point in the history
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: ansible#7451
  • Loading branch information
nixocio committed Jul 1, 2020
1 parent e3e69b4 commit fab9490
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion awx/ui_next/.linguirc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"localeDir": "src/locales/",
"srcPathDirs": ["src/"],
"format": "po"
"format": "po",
"sourceLocale": "en"
}

0 comments on commit fab9490

Please sign in to comment.