Localize new bundleJavaScript entries for Sterling Business Center
Updating your localized bundle js
files with new entries
that have been added in the English bundle js
files after localization of the
application is completed.
About this task
To
update the bundle js
files after installing the changes
in the English bundle js
files:
Procedure
- Run the
jsUtil
tool to generate a freshbundle-index.properties
file to obtain the newly added English bundle entries. Navigate to the<INSTALL_DIR>/bin
folder and run the following command:For Windows:
sci_ant.cmd -f jsUtil.xml bundle.index -Dsourcedir=<INSTALL_DIR>/repository/eardata/sbc/war -Dindexdir=<INSTALL_DIR>/repository/eardata/sbc/localization_index
For Linux/UNIX:
./sci_ant.sh -f jsUtil.xml bundle.index -Dsourcedir=<INSTALL_DIR>/repository/eardata/sbc/war -Dindexdir=<INSTALL_DIR>/repository/eardata/sbc/localization_index
The
bundle-index.properties
file is generated in thelocalization_index
directory. - Compare the
bundle-index.properties
file generated in Step 1, and your localizedbundle-index_<language>_<country or region>.properties
file to determine the newly added entries. Translate the newly added entries and add them in your localizedbundle-index_<language>_<country or region>.properties
file. - Run the
jsUtil
tool in map mode to regenerate the localizedbundle js
files from the updatedbundle-index_<language>_<country or region>.properties
file.Navigate to the
<INSTALL_DIR>/bin
folder and run the following command:For Windows:
sci_ant.cmd -f jsUtil.xml bundle.map -Dsourcedir=<INSTALL_DIR>/repository/eardata/sbc/war -Dindexdir=<INSTALL_DIR>/repository/eardata/sbc/localization_index -Dindexfile=<INSTALL_DIR>/repository/eardata/sbc/localization_index/bundle-index_<language>_<country or region>.properties -Dwebcontentdepth=0
For Linux/UNIX:
./sci_ant.sh -f jsUtil.xml bundle.map -Dsourcedir=<INSTALL_DIR>/repository/eardata/sbc/war -Dindexdir=<INSTALL_DIR>/repository/eardata/sbc/localization_index -Dindexfile=<INSTALL_DIR>/repository/eardata/sbc/localization_index/bundle-index_<language>_<country or region>.properties -Dwebcontentdepth=0
For example, if you have localized to the French locale and the localization directory is
<INSTALL_DIR>/repository/eardata/sbc/localization_index
, and the localizedbundle-index.properties
file isbundle-index_fr_FR.properties
, you must run the following command:For Windows:
sci_ant.cmd -f jsUtil.xml bundle.map -Dsourcedir=<INSTALL_DIR>/repository/eardata/sbc/war -Dindexdir=<INSTALL_DIR>/repository/eardata/sbc/localization_index -Dindexfile=<INSTALL_DIR>/repository/eardata/sbc/localization_index/bundle-index_fr_FR.properties -Dwebcontentdepth=0
For Linux/UNIX:
./sci_ant.sh -f jsUtil.xml bundle.map -Dsourcedir=<INSTALL_DIR>/repository/eardata/sbc/war -Dindexdir=<INSTALL_DIR>/repository/eardata/sbc/localization_index -Dindexfile=<INSTALL_DIR>/repository/eardata/sbc/localization_index/bundle-index_fr_FR.properties -Dwebcontentdepth=0
- Regenerate the minified localized
bundle js
files.Navigate to the
<INSTALL_DIR>/bin
folder and run the following command:For Windows:
sci_ant.cmd -f jsUtil.xml minify-js -DsrcDir=<INSTALL_DIR>/repository/eardata/sbc/war -DdestDir=<INSTALL_DIR>/repository/eardata/sbc/war -Dminify=true -DcreateIndividualFile=false -DjsbDir=<INSTALL_DIR>/repository/eardata/sbc/war/builder/sbc
For Linux/UNIX:
./sci_ant.sh -f jsUtil.xml minify-js -DsrcDir=<INSTALL_DIR>/repository/eardata/sbc/war -DdestDir=<INSTALL_DIR>/repository/eardata/sbc/war -Dminify=true -DcreateIndividualFile=false -DjsbDir=<INSTALL_DIR>/repository/eardata/sbc/war/builder/sbc
- Rebuild the EAR and re- deploy the application.
For more information about rebuilding the EAR, see the Installing topic.