IFS Translation Downloader¶
The IFS Translation Downloader is the tool that is used to download translations stored at download.ifs.cloud. It is possible to provide the list of languages, the component list and the version of the translations as an input to the downloader tool.The tool can be found in fndbas\build\translation.
Languages to downloadtranslations¶
The list of languages to download translations is taken from the translationusage.json file. Here the language codes with the “used” property set to true will only be considered for download.
The file "translationusage.json" should be in the location server/translation in the Delivery. In case if it cannot be found in the delivery, it is possible to consider the translationusage.json file in the Build Home, given that the “FORCE_TRANSLATIONS_DOWNLOAD” parameter is set to Y in the build process.
Note: by default English ('en') translations will always be downloaded.
Alternative way to define the list of languages is to provide the Language list to download as an input in a comma separated list for “IFS_LANGUAGES_LIST”.
Example: “cs,da,de”.
If none of the above are given and hence it is not possible to define the list of languages to download the translations, we will not download any translations.
Translation Version to download¶
The translation version to download is also defined in the translationusage.json file. If the list of languages is defined in “IFS_LANGUAGES_LIST”, then the version can be defined through the java option “IFS_TRANSLATION_VERSION”
The components to download translations¶
The list of components for which the translations needs to be downloaded is defined in the solutionset.yaml file. In here all the components set as “true” will be downloaded.
Initially the tool will look for the solutionset.yaml file in the Delivery to get the component list. The file is expected to be in the root level of the Delivery Folder. If the file could not be found in the delivery it will consider the solutionset.yaml file in Build Home. If solutionset.yaml file could not be found in both places and hence it is not possible to define the list of components to download translations, the tool will download translations for all the components.
Another way we could define the list of components is to provide the components as a comma separated list for the java option IFS_COMPONENTS_LIST.
The translation downloader tool will first download as the translation zip files from the translation storage to a temporary location and will then extract the translations to the server/translation in the Delivery. The temporary location to download the zip files and the storage location to download the translations can be configured in the config.properties as “local.temporary.download.path” and “azure.storage.container.path”
Example Usage¶
- Open up a command window/terminal and change directory to the location where you have the
translation_downloader.cmd
(Windows) ortranslation_downloader.sh
(Linux). - Make sure that the translation-downloader.jar file is also available in the location, if not copy it from the build_home.
-
Set the delivery location as an environment variable,
- Windows - Execute the command
set DELIVERY=<location>
- Linux - Execute the command
export DELIVERY=<DELIVERY_LOCATION>
Alternatively, you can pass the delivery location using the command line argument
DELIVERY
. - Windows - Execute the command
-
Execute the following command in the command window/terminal. This would start the download of translations.
- Windows -
translation_downloader.cmd
- Linux -
bash translation_downloader.sh
- Windows -
Supported Optional Command Line Arguments¶
DELIVERY
BUILD_HOME
FORCE_TRANSLATIONS_DOWNLOAD
IFS_COMPONENTS_LIST
IFS_LANGUAGES_LIST
IFS_TRANSLATION_VERSION
Usage¶
Windows¶
translation_downloader.cmd -FORCE_TRANSLATIONS_DOWNLOAD Y -IFS_LANGUAGES_LIST "cs,de" -IFS_COMPONENTS_LIST ACCRUL
Important: Please note that you must enclose any parameter value containing a comma separated list within
double quotes when running the cmd script.
As an example see how the value IFS_LANGUAGES_LIST
is passed in the above command.
Linux¶
bash translation_downloader.sh FORCE_TRANSLATIONS_DOWNLOAD=Y IFS_TRANSLATION_VERSION="21.1" IFS_LANGUAGES_LIST="cs,de"