About this task
To run the string length checker to ensure
that translated strings do not exceed the field lengths of the tables,
follow the following steps:
- Create a /Length folder.
- Copy the contents of <INSTALL_DIR>/repository/entity, including
all subfolders into /Length/entities.
- Copy the contents of <INSTALL_DIR>/database/FactorySetup/ynw/addin into /Length/PCAFCADDINXMLS.
- Copy the contents of <INSTALL_DIR>/database/FactorySetup/ynw/pca into /Length/PCAFCXMLS.
- Copy the <INSTALL_DIR>/database/FactorySetup/ynw/ri into /Length/PCARIXMLS.
- 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/6_0/platform_afc.jar
- <INSTALL_DIR>/jar/install_foundation.jar
- <INSTALL_DIR>/jar/log4j/1_2_15/log4j-1.2.15.jar
- <INSTALL_DIR>/jar/platform_baseutils.jar
- Copy the following *.properties to /Length:
- <INSTALL_DIR>/installed_data/sscap/components/complete_installation/factorysetup/XMLS/<language>_<country
or region>/<baselanguage>_<basecountry or baseregion>_ynwfclocalizedstrings_<language>_<country
or region>.properties
- <INSTALL_DIR>/installed_data/sscap/components/complete_installation/factorysetup/XMLS/<language>_<country
or region>/<baselanguage>_<basecountry or baseregion>_ynwfcaddinlocalizedstrings_<language>_<country
or region>.properties
- <INSTALL_DIR>/installed_data/sscap/components/complete_installation/factorysetup/XMLS/<language>_<country
or region>/<baselanguage>_<basecountry or baseregion>_ynwrilocalizedstrings_<language>_<country
or region>.properties
- Set CLASSPATH=/Length/lib/platform_baseutils.jar;/Length/lib/pl
atform_afc.jar;/Length/lib/install_foundation.jar;/Length/l ib/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 length for the applications factory setup data.
call <JAVA_HOME>/bin/java
com.yantra.ycp.tools.localization.YCPLocalizedStringLengthTool -OUTPUT_FILE/Length/LengthsFCFile.txt
-MODEGENERATE-ENTITY_DIR/Length/entities
-DTYPES_FILE/Length/datatypes.xml -FC_DIR/Length/PCAFCXMLS
- 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 length for the application addin factory setup data.
call <JAVA_HOME>/bin/java
com.yantra.ycp.tools.localization.YCPLocalizedStringLengthTool -OUTPUT_FILE /Length/LengthsFCAddinFile.txt
-MODEGENERATE-ENTITY_DIR /Length/entities
-DTYPES_FILE/Length/datatypes.xml -FC_DIR/Length/PCAFCADDINXMLS
- 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 for the application reference implementation data.
call <JAVA_HOME>/bin/java
com.yantra.ycp.tools.localization.YCPLocalizedStringLengthTool
-OUTPUT_FILE /Length/LengthsRIFile.txt
-MODEGENERATE-ENTITY_DIR /Length/entities
-DTYPES_FILE/Length/datatypes.xml -FC_DIR/Length/PCARIXMLS
- 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_ynwfclocalizedstrings_ja_JP.properties)
is compared with the LengthsFCFile.txt file that
is generated from running the string length checker in GENERATE mode.
Running this tool in CHECK mode also creates the MissingFCLength.txt and LengthsFCFile.txt files.
The MissingFCLength.txt contains the literals that
are missing from the LengthsFCFile.txt and MissingFCTranslations.txt contains
the literals that are missing from the localizedstrings file
that are passed in the input. The checkFCOutput.txt contains
the translations that have length greater than the database column,
and therefore, must be shortened.
call <JAVA_HOME>/bin/java
com.yantra.ycp.tools.localization.YCPLocalizedStringLengthTool
-OUTPUT_FILE /Length/checkFCOutput.txt
-MODE CHECK
-LENGTHS_FILE/Length/LengthsFCFile.txt
-MISSING_TRANSLATION_FILE/Length/MissingFCTranslations.txt
-MISSING_LENGTH_FILE/Length/MissingFCLength.txt
-VARIABLES_FILE/Length/ynw_ref_tmp_variable.properties
-TRANSLATIONS_FILE/Length/<baselanguage>_<basecountry or baseregion>_<prefix>ynwfclocalizedstrings_<language>_<country or region>.properties
- 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_ynwfclocalizedstrings_ja_JP.properties)
is compared with the LengthsFCAddinFile.txt file
that is generated from running the string length checker in GENERATE
mode. Running this tool in CHECK mode also creates the MissingFCAddinLength.txt and LengthsFCAddinFile.txt files.
The MissingFCAddinLength.txt contains the literals
that are missing from the LengthsFCAddinFile.txt and MissingFCAddinTranslations.txt contains
the literals that are missing from the localizedstrings file
that are passed in the input. The checkFCAddinOutput.txt contains
the translations that have length greater than the database column,
and therefore, must be shortened.
call <JAVA_HOME>/bin/java
com.yantra.ycp.tools.localization.YCPLocalizedStringLengthTool
-OUTPUT_FILE/Length/checkFCAddinOutput.txt
-MODE CHECK
-LENGTHS_FILE/Length/LengthsFCAddinFile.txt
-MISSING_TRANSLATION_FILE/Length/MissingFCAddinTranslations.txt
-MISSING_LENGTH_FILE/Length/MissingFCAddinLength.txt
-VARIABLES_FILE/Length/ynw_ref_tmp_variable.properties
-TRANSLATIONS_FILE/Length/<baselanguage>_<basecountry or baseregion>_<prefix>ynwfcaddinloclizedstrings_<language>_<country or region>.properties
- 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_ynwrilocalizedstrings_ja_JP.properties)
is compared with the LengthsRIFile.txt file that
is generated from running the string length checker in GENERATE mode.
Running this tool in CHECK mode also creates MissingRILength.txt and LengthsRIFile.txt files.
The MissingRILength.txt contains the literals that
are missing from the LengthsRIFile.txt and MissingRITranslations.txt contains
the literals that are missing from the localizedstrings file
that are passed in the input. The checkRIOutput.txt contains
the translations that have length greater than the database column,
and therefore, must be shortened.
call <JAVA_HOME>/bin/java
com.yantra.ycp.tools.localization.YCPLocalizedStringLengthTool
-OUTPUT_FILE/Length/checkRIOutput.txt
-MODE CHECK
-LENGTHS_FILE/Length/LengthsRIFile.txt
-MISSING_TRANSLATION_FILE/Length/MissingRITranslations.txt
-MISSING_LENGTH_FILE/Length/MissingRILength.txt
-VARIABLES_FILE/Length/ynw_ref_variable.properties
-TRANSLATIONS_FILE/Length/<baselanguage>_<basecountry or baseregion>_<prefix>ynwrilocalizedstrings_<language>_<country or region>.properties