Localize new bundleJavaScript entries

If you add new entries to your localized bundle files, you must update your localization.

About this task

This section describes the steps required to update your localized bundle JavaScript files with the new entries that have been added in the English bundle js files after localization of the application is completed.

To update the bundle js files after installing the changes in the English bundle js files:

Procedure

  1. Run the jsUtil tool to generate a fresh bundle-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/sfs/war

    -Dindexdir=<INSTALL_DIR>/repository/eardata/sfs/localization_index

    where -Dindexdir is the output directory.

    For Linux/UNIX:

    
    ./sci_ant.sh -f jsUtil.xml bundle.index
    

    -Dsourcedir=<INSTALL_DIR>/repository/eardata/sfs/war

    -Dindexdir=<INSTALL_DIR>/repository/eardata/sfs/localization_index

    where -Dindexdir is the output directory.

    The bundle-index.properties file is generated in the localization_index directory.

  2. Compare the bundle-index.properties file generated in Step 1, and your localized bundle-index_<language_code>_<country or region or region_code>.properties file to determine the newly added entries. Translate the newly added entries and add them in your localized bundle-index_<language_code>_<country or region or region_code>.properties file.
  3. Run the jsUtil tool in map mode to regenerate the localized bundle js files from the updated bundle-index_<language_code>_<country or region or region_code>.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/sfs/war

    -Dindexdir=<INSTALL_DIR>/repository/eardata/sfs/localization_index

    -Dindexfile=<INSTALL_DIR>/repository/eardata/sfs/localization_index/bundle-index_<language_code>_<country or region or region_code>.properties -Dwebcontentdepth=0

    For Linux/UNIX:

    
    ./sci_ant.sh -f jsUtil.xml bundle.map
    

    -Dsourcedir=<INSTALL_DIR>/repository/eardata/sfs/war

    -Dindexdir=<INSTALL_DIR>/repository/eardata/sfs/localization_index

    -Dindexfile=<INSTALL_DIR>/repository/eardata/sfs/localization_index/bundle-index_<language_code>_<country or region or region_code>.properties -Dwebcontentdepth=0

    For example, if you have localized to the French locale and the localization directory is <INSTALL_DIR>/repository/eardata/sfs/localization_index, and the localized bundle-index.properties file is bundle-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/sfs/war

    -Dindexdir=<INSTALL_DIR>/repository/eardata/sfs/localization_index

    -Dindexfile=<INSTALL_DIR>/repository/eardata/sfs/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/sfs/war

    -Dindexdir=<INSTALL_DIR>/repository/eardata/sfs/localization_index

    -Dindexfile=<INSTALL_DIR>/repository/eardata/sfs/localization_index/bundle-index_fr_FR.properties -Dwebcontentdepth=0

  4. Regenerate the minified localized bundle js files by performing the following steps:
    1. Download the jsmin.jar file and run the following command from the <INSTALL_DIR>/bin folder:

      For Windows:

      
      install3rdParty.cmd
      

      For Linux/UNIX:

      
      install3rdParty.sh
      
    2. Run the following command:

      For Windows:

      sci_ant.cmd -f jsUtil.xml minify-js -DsrcDir=<INSTALL_DIR>/repository/eardata/sfs/war -DdestDir=<INSTALL_DIR>/repository/eardata/sfs/war -Dminify=true -DcreateIndividualFile=false -DjsbDir=<INSTALL_DIR>/repository/eardata/sfs/war/builder/sfs

      For Linux/UNIX:

      ./sci_ant.sh -f jsUtil.xml minify-js -DsrcDir=<INSTALL_DIR>/repository/eardata/sfs/war -DdestDir=<INSTALL_DIR>/repository/eardata/sfs/war -Dminify=true -DcreateIndividualFile=false -DjsbDir=<INSTALL_DIR>/repository/eardata/sfs/war/builder/sfs

  5. Rebuild the EAR and redeploy the application.