New translation cleaner tool

Started by Tynan, July 18, 2018, 07:42:06 AM

Previous topic - Next topic

Tynan

We just added a tool to the latest unstable build: The translation cleaner.

You can access it on the main menu in the translation info window on the bottom right, when any non-English localization is selected.

It does various things:

  • It inserts the English text in comments above each translation for reference, so you don't have to look back and forth at the English data.
  • If a translation key has been renamed in the game, the tool automatically renames it in the translation data.
  • If any key (in any category) isn't translated at all, the tool inserts a "TODO" translation. These are ignored by the game and also come with English reference text. So it's impossible for you to make a mistake in the translation keys since the system writes them for you.
  • Other useful tools!

The tool explains itself in-game when you click the button to use it.

Every translation team should be using this! At first if just one member of each team runs the tool and pushes the results to GitHub, most members may be able to translate without the game at all, or at least without integrating their translation files into the game.

Once you run the tool, it'll be very easy to find missing data by just searching for the string TODO on all the translation files, using either Visual Studio Code or any other program that can do a text search on all files in a folder.

Let me know how it works!
Tynan Sylvester - @TynanSylvester - Tynan's Blog

Haplo

I've done the german language with it and have to say: this is a great tool!
This makes translating much easier. Thank you very much ;D

Moleculor

I'm having a hard time finding and selecting this language.

mecatxis

Yes!

It is a must have tool! Thank you! I will check it ASAP...

Tynan

Quote from: Moleculor on July 18, 2018, 04:44:39 PM
I'm having a hard time finding and selecting this language.

It's not included in the main build until it's a bit more fleshed out.
Tynan Sylvester - @TynanSylvester - Tynan's Blog

Hellioob

Someone can help me to update Bulgarian language! https://github.com/Ludeon/RimWorld-Bulgarian

Can anyone update files and send them to me?

Thanks in advance!

Elevator

Cleaner tool messes up with end-of-line symbols.
After line <?xml version="1.0" encoding="UTF-8"?> it places LF instead of CR+LF.

ison

Quote from: Elevator on July 30, 2018, 09:51:25 AM
Cleaner tool messes up with end-of-line symbols.
After line <?xml version="1.0" encoding="UTF-8"?> it places LF instead of CR+LF.

Hmm, maybe it would be better to use LF consistently everywhere instead of using CR+LF here. Would it cause any problems for you? Since such generated file is most likely going to be pushed to a repo, maybe it's better to keep it platform-independant? This way using this tool on both Windows and Linux will give the same files.

Haplo

In regards to the tool: this problem is still there in 1.0.1980..

ison

Quote from: Haplo on July 30, 2018, 04:28:20 PM
In regards to the tool: this problem is still there in 1.0.1980..

Fixed, thanks, sorry for that.

Haplo


Elevator

QuoteHmm, maybe it would be better to use LF consistently everywhere instead of using CR+LF here
I don't think that if Cleanup tool generate LF everywhere it will be a problem. The same is for CR+LF. I believe most translators use advanced text editors that work well with both variants. Editorconfig tool can help with that.

publicuser

Will the tool include in 1.0 stable build, and can it translate mod?

ison

Unfortunately it doesn't handle mods.