XML Translation Tool
Translation Tool: XMLTranslatorTool
Javapackage: com.etendoerp.copilot.xmltranslationtool
Translates the content of an XML file from one language to another, as specified within the XML.
Functionality
- Add Copilot Translation Tool dependency in the Etendo Classic project, In
build.gradle
, add: -
In
gradle.properties
file you can add some environment variables. If they are not set, the default values will be used.Environment Variable Options Default Info OPENAI_MODE gpt-4
,gpt-3.5-turbo-16k
,gpt-3.5-turbo
gpt-3.5-turbo
Among others that have the same number of requests per minute BUSINESS_TOPIC ERP
,Human Resorces
,Finance
,Other
ERP
This parameter indicates the category to which the translations will be focused. -
Restart Docker image using
./gradlew copilot.stop
and./gradlew copilot.start
tasks -
The tool will translate the XML files to the language indicated when the XML file to be translated is generated, for example if the first line of the file is:
The tool will know that the language to be translated will be Spanish.
-
It goes through each of these XML files and translates what is in the source language to the target language, overwriting them for later use.
How to use the XML translation tool shown in an example
First of all, we start from the module com.etendoerp.bankingpool
originally in English and we can see the Financial Type Configuration window:
-
You must generate the
com.etendoerp.bankingpool
translation module, you can see how to do it in How to Create and Update Translation Modules.
Initially all its fields will be in the source language and then it will be translated by the translation tool.After having created the translation module in the modules folder we will find
com.etendoerp.bankingpool.es_es
-
To execute translation tool, in a new terminal, run:
-
In the folder
modules/com.etendoerp.bankingpool.es_es
you will find the automatic translations. -
To apply the translation compile the enviroment
-
Now we can see the Financial Type Configuration windows with their respective fields translated into Spanish.