You run the string length checker to ensure that the translated strings do not exceed the
field lengths of the tables.
About this task
Note: The Localized Strings Reconciler is enhanced to extract data from specific attributes on XMLs
in CLOB columns in the database. These fields do not have explicit length restrictions. When you run
the string length checker tool, the output file displays these fields as strings with missing
length.
To run the string length
checker, perform the following steps:
Procedure
- Create a folder named
/Length.
- Copy the contents of
<INSTALL_DIR>/repository/entity, including
all subfolders, into /Length/entity.
- Copy the contents of the following subdirectories of
<INSTALL_DIR>/repository/factorysetup/ into /Length/XMLS:
-
<INSTALL_DIR>/repository/factorysetup/base_factorysetup/XMLS
-
<INSTALL_DIR>/repository/factorysetup/base_sbc_factorysetup/XMLS
-
<INSTALL_DIR>/repository/factorysetup/promising_server_integration/XMLS
-
<INSTALL_DIR>/repository/factorysetup/scwc_integration/XMLS
-
If you installed WMS:
<INSTALL_DIR>/repository/factorysetup/scecore_installation/XMLS
-
All xml files under
<INSTALL_DIR>/repository/factorysetup/base_addin_factorysetup/XMLS
and its subdirectories.
Note: The factorysetup directory is generated when the COPY_FCXML_TO_REPOSITORY
property is set to True.
- Copy the
<INSTALL_DIR>/repository/datatypes/datatypes.xml into /Length.
- Copy the following JAR files to the
/Length/lib directory:
<INSTALL_DIR>/jar/platform_afc/<version>/platform_afc.jar,
where <version> is the Sterling Application
Platform version being consumed by the application.
<INSTALL_DIR>/jar/platform_baseutils.jar
<INSTALL_DIR>/jar/install_foundation.jar
<INSTALL_DIR>/jar/log4j/1_2_15/log4j-1.2.15.jar
<INSTALL_DIR>/jdk/jre/lib/endorsed/xalan.jar
<INSTALL_DIR>/jdk/jre/lib/endorsed/xercesImpl.jar
<INSTALL_DIR>/jdk/jre/lib/endorsed/xml-apis.jar
- Copy
<INSTALL_DIR>/repository/factorysetup/complete_installation/XMLS/<language>_<country>/<baselanguage>_<basecountry>_<prefix>localizedstrings_<language>_<country>.properties to /Length
- Set
CLASSPATH= /Length/lib/xml-apis.jar;/Length/lib/xalan.jar;/Length/lib/xercesImpl.jar;/Length/lib/platform_afc.jar;/Length/lib/platform_baseutils.jar;/Length/lib/install_foundation.jar;/Length/lib/log4j-1.2.15.jar
- Run the following Java™ command. This command runs the string length
checker in GENERATE mode. In this mode, the output file contains a
list of translatable literals and their maximum string lengths.
call <JAVA_HOME>/bin/java
com.yantra.ycp.tools.localization.YCPLocalizedStringLengthTool -OUTPUT_FILE
/Length/LengthsFile.txt -MODE GENERATE -ENTITY_DIR /Length/entity -DTYPES_FILE
/Length/datatypes.xml -FC_DIR /Length/XMLS
- Run the following Java command. This command runs the string length
checker in CHECK mode. In this mode, the
localizedstrings file
(for instance en_US_ycplocalizedstrings_ja_JP.properties)
is compared with the LengthsFile.txt file that is
generated from running the string length checker in GENERATE mode.
Running this tool in CHECK mode also creates MissingLength.txt,
which contains the literals that are missing from LengthsFile.txt, and MissingTranslations.txt,
which contains the literals missing from the localizedstrings file
that was passed in the input.
call <JAVA_HOME>/bin/java
com.yantra.ycp.tools.localization.YCPLocalizedStringLengthTool
-OUTPUT_FILE inconsistencies.txt -MODE CHECK -LENGTHS_FILE
/Length/LengthsFile.txt -TRANSLATIONS_FILE /Length/
<baselanguage>_<basecountry>_<prefix>localizedstrings
_<language>_<country>.properties