SUPERALGOS PLATFORM NEWS

Superalgos Translator

Superalgos translators, I have great news for you! How about doing most of your translations automatically?

Önder DAL
Superalgos | Algorithmic Trading

--

Photo by Brett Jordan on Unsplash

If you have heard of Superalgos for the first time, you can get the necessary information from https://superalgos.org/. There are also many Telegram groups for you to ask your questions interactively.

What is Superalgos Translator?

Superalgos Translator automatically adds translations for the desired language to the Multilingual files in the Superalgos project. Translations go through many checks before being added. For example, if the target language you translate with Translator has already been translated, no changes are made in that section.

Language translation processes are carried out using https://www.deepl.com. Therefore, translations are much more accurate than Google Translate and other known translation systems.

Which languages are supported?

BULGARIAN, CHINESE SIMPLIFIED, CZECH, DANISH, DUTCH, ENGLISH AMERICAN, ENGLISH BRITISH, ESTONIAN, FINNISH, FRENCH, GERMAN, GREEK, HUNGARIAN, ITALIAN, JAPANESE, LATVIAN, LITHUANIAN, POLISH, PORTUGUESE, PORTUGUESE BRAZILIAN, ROMANIAN, RUSSIAN, SLOVAK, SLOVENIAN, SPANISH, SWEDISH, TURKISH

Requirements

  1. Windows 10+ (does not work on Linux operating system yet)
  2. Java 11+ (download from https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.html)
    https://java.tutorials24x7.com/blog/how-to-install-java-11-on-windows
  3. Chromedriver.exe (https://chromedriver.storage.googleapis.com/102.0.5005.61/chromedriver_win32.zip. You can download it from Extract the chromedriver.exe file inside the zip file to C:\Windows\System32\ folder.

How to use it?

  1. Open a new command line window. Navigate to the folder with your Superalgos scripts. For example: `cd C:\Superalgos`
  2. Go to the folder containing the Translator tool source codes with the command `cd .\Translator`.
  3. Run `.\mvnw clean package`
  4. Run cd .\bin command
  5. Use `java -jar translator.jar` to see how to use the tool and which languages are supported.
  6. Use `java -jar translator.jar <root folder> <language code>` to start the translation process.
    Example: `java -jar translator.jar C:\Superalgos tr-TR`
    If you wish, you can also have a specific module translated. To do this, just give the folder path of the module as a parameter.
    Example: `java -jar translator.jar C:\Superalgos\Projects\Foundations tr-TR`
  7. The more places in the folder you give as parameters that require translation, the longer your waiting time will be.
  8. During the translation process, a new file ending with “_translated.json” is created where the original file is located.

7. Compare the original file and the file ending with “_translated.json” and fix translation errors. There are many “Diff” programmes for this. I use Intellij IDEA IDE.

You can make your Diff controls with Visual Studio Code.

8. After all checks are completed, you can apply the changes in the “_translated.json” files to the original files with the `java -jar translator.jar C:\Superalgos apply-translations` command.

9. Translator does not use “git” commands in any way.

10. If you have no problems, you can now create a Pull Request. :-) Good job!

--

--