Hearts of Iron IV

Hearts of Iron IV

44 ratings
How to translate mods efficiently
By Mouchi
This guilde's aims is to discover and use a home made tool to translate efficiently mods or even the game.

The tool's aim is to avoid you the technical aspects of the translation on Paradox mods to focus only on the essential.
3
   
Award
Favorite
Favorited
Unfavorite
Motivation
To help me to translate some mods, I have created a tool.
This tool has 2 objectives : do a diagnostic of the translation state then allow to translate directly on this tool.
All of these objectives should be simply with no technical knowledge about the Paradox game structure.
Download
You can find the 3.4 version here[github.com].
Installation
  • Install Java 8 if you have not already done it (you will easily find it with google)
  • Download the tool (see above) and extract the archive

To run the tool on Windows, double-click on Script_translate_helper.bat.
On Mac/Linux, double-click on TranslateHelper.jar.
Configuration
The tool includes a demo (old version of the WTWSMS CK2 mod) to help you to see how to configure it.
The Translate Helper opens with the last configuration (so at the beginning with the demo).

The tool at the first openning :


To add your configuration, click on the menu :









You can also modify the demo configuration.
Another example of configuration :


The fields to fill/modify are :
  • Configuration name : The name of the configuration, it will be use to change the current configuration.
  • Localisation directory : The path of the localisation directory for a mod or the game to translate
  • From XXX to XXX : The source and the destination language
  • DeepL : Prefill automatically or not the destination text with DeepL if there is no text. See below for the setup.
  • Google translate : Prefill automatically or not the destination text with google if there is no text. Google is not called if DeepL is called.

DeepL need an API key.

- Create a an account on DeepL and subscribe to the Free API[www.deepl.com]
- Get your API key in your account page[www.deepl.com]
- Copy your API key in the file config/deepL_api_key.txt
- Restart the Translate Helper if it runs
Translate a file
On the Diagnostic view, each line represent a file (without a language suffixe) and gives its statistics.

Click on the Details button to see the details of these statistics.
For example on one of the demo file :

To translate the file, click on Translate... it will open the translation dialog.

At left you can modify the source text and at right the destination.

The following list describes the possible action in the 2.5 version :
  • 1 : Reset the source text to the saved text
  • 2 : Copy the source text into the destination
  • 3 : Replace the destination text by the Google suggestion
  • 4 : Copy the destination text in the clipboard
  • 5 : Reset the destination text to the saved text
  • 6 : Tell the Translate Helper that it is normal that the source and destination text are the same in this case (Examples : expression like "OK", countries like "France" ....). It will no more consider it as a missing translation.
  • 7 : Go back to the previous entry to translate in this file
  • 8 : Go to the next entry to translate in this file without saving current changes
  • 9 : Go to the next entry whose the destination line number is greater than the input number
  • 10 : Save changes and go to the next entry to translate in this file
Check a file
In the Diagnostic view, you can right-click on a line to check all the lines.

It will opens the translation dialog on all the lines to fix grammar/spelling errors ...
Acknowledgement
Thanks to the contributors of the itextpdf, jdom and languagetool libraries.
Thanks to Bisougai to learn me how do a version checker with this tool Paradoxos Mod Manager[forum.paradoxplaza.com].
Thanks to loup99 and Sourenics for encouragements and feedback.
Thanks to the French translation team Scribio for encouragements and feedbacks (Discord[discord.gg], Twitter, Groupe Steam).
124 Comments
Mouchi  [author] 10 Feb @ 12:19am 
I have opened an issue but I have no idea when it will be fixed.
Paratranz supports lot of languages so you can chinese mod to english.
Hauptmann Voss 9 Feb @ 5:34pm 
i see not a singel file, and whats up with Chinese tool Paratranz ? can i translate the chinese mod with that to english ?
Mouchi  [author] 9 Feb @ 11:44am 
Hi, if you edit the configuration of the DEMO, by setting SIMPLE CHINESE as destination translation, do you see all files but with 0 translation ?
If yes, I think the issue is the path of your localisation directory in your configuration.
P.S : I don't personnally use anymore TranslateHelper, I use the Chinese tool Paratranz : https://paratranz.cn/
Hauptmann Voss 8 Feb @ 11:37am 
@Mouchi hope you or anyone can help me here i try to translate a simple chinese mod and added as you say in your post in the file this (14/SIMPLE CHINESE/cn-ZH) but the file i want to translate dont show up
Mouchi  [author] 10 Oct, 2023 @ 12:04pm 
Hi @shiny_flakes,
You can add a language by adding a line in the config/available_languages.csv file.
The first column is the column index for CK2 localisation, put the index of the language you will replace.
The 2nd column is the name of the language, you find it in the folder names in localisation directory. If you can't select Turkish in the launcher, you can put a language you can select in the launcher (don't set English if you translates from English).
The 3rd column is the code of the language to use DeepL or Google Translate.
shiny_flakes 9 Oct, 2023 @ 3:45am 
Can you add Turkish language support?
XOXOJL 10 Jul, 2023 @ 1:01am 
That's okay, thanks for your help and for sharing the website, which is great to use when you translate
Mouchi  [author] 9 Jul, 2023 @ 6:01am 
For another people, it was the solution : https://github.com/NicolasGrosjean/Translate_helper/issues/35
I am sorry, I have other idea
XOXOJL 8 Jul, 2023 @ 11:16am 
Thanks for the suggested site, but I still want to deal with with this problem. It's just that I already use Java 8
https://prnt.sc/mWzK0cPVOMiR
Mouchi  [author] 8 Jul, 2023 @ 10:56am 
@XOXOJL I think it is caused by the Java version.
Try with Java 8 if you can.
Otherwise, you can use https://paratranz.cn/projects , the website done by someone else that I use now to translate