forked from ansible/awx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update tooling and UI development documentation to cover I18N
- Document steps for adding I18N in builds - Add "clean-language" target to remove *.mo files Signed-off-by: Hideki Saito <[email protected]>
- Loading branch information
1 parent
94e14ae
commit 8362aa7
Showing
3 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,6 +60,7 @@ npm --prefix awx/ui run e2e | |
```shell | ||
# add an exact development or build dependency | ||
npm install --prefix awx/ui --save-dev --save-exact [email protected] | ||
|
||
# add an exact production dependency | ||
npm install --prefix awx/ui --save --save-exact [email protected] | ||
|
||
|
@@ -81,3 +82,22 @@ npm uninstall --prefix awx/ui --save prod-package | |
# built files are placed in awx/ui/static | ||
make ui-release | ||
``` | ||
|
||
## Internationalization | ||
Application strings marked for translation are extracted and used to generate `.pot` files using the following command: | ||
```shell | ||
# extract strings and generate .pot files | ||
make pot | ||
``` | ||
To include the translations in the development environment, we compile them prior to building the ui: | ||
```shell | ||
# remove any prior ui builds | ||
make clean-ui | ||
|
||
# compile the .pot files to javascript files usable by the application | ||
make languages | ||
|
||
# build the ui with translations included | ||
make ui-devel | ||
``` | ||
**Note**: Python 3.6 is required to compile the `.pot` files. |