Ludeon Forums

Ludeon Forums

  • December 18, 2018, 06:32:08 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: New translation cleaner tool  (Read 1532 times)

Tynan

  • Developer
  • Administrator
  • Transcendent
  • *****
  • Posts: 11513
    • View Profile
    • Tynan's Blog
New translation cleaner tool
« on: July 18, 2018, 07:42:06 AM »

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!
« Last Edit: September 04, 2018, 08:17:23 AM by ison »
Logged
Tynan Sylvester - @TynanSylvester - Tynan's Blog

Haplo

  • Global Moderator
  • Planetologist
  • ****
  • Posts: 2065
  • Shadow
    • View Profile
Re: New translation cleaner tool
« Reply #1 on: July 18, 2018, 12:22:16 PM »

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
Logged

Moleculor

  • Muffalo
  • *
  • Posts: 1
  • Refugee
    • View Profile
Re: New translation cleaner tool
« Reply #2 on: July 18, 2018, 04:44:39 PM »

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

mecatxis

  • Drifter
  • **
  • Posts: 35
  • Refugee
    • View Profile
Re: New translation cleaner tool
« Reply #3 on: July 19, 2018, 03:51:18 AM »

Yes!

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

Tynan

  • Developer
  • Administrator
  • Transcendent
  • *****
  • Posts: 11513
    • View Profile
    • Tynan's Blog
Re: New translation cleaner tool
« Reply #4 on: July 20, 2018, 10:43:22 AM »

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.
Logged
Tynan Sylvester - @TynanSylvester - Tynan's Blog

Hellioob

  • Muffalo
  • *
  • Posts: 1
  • Refugee
    • View Profile
Re: New translation cleaner tool
« Reply #5 on: July 23, 2018, 07:27:22 AM »

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!
Logged

Elevator

  • Drifter
  • **
  • Posts: 65
  • Refugee
    • View Profile
Re: New translation cleaner tool
« Reply #6 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.
Logged

ison

  • Developer
  • Planetologist
  • *****
  • Posts: 2136
    • View Profile
Re: New translation cleaner tool
« Reply #7 on: July 30, 2018, 10:10:04 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.
Logged

Haplo

  • Global Moderator
  • Planetologist
  • ****
  • Posts: 2065
  • Shadow
    • View Profile
Re: New translation cleaner tool
« Reply #8 on: July 30, 2018, 04:28:20 PM »

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

ison

  • Developer
  • Planetologist
  • *****
  • Posts: 2136
    • View Profile
Re: New translation cleaner tool
« Reply #9 on: July 31, 2018, 07:21:36 AM »

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

Fixed, thanks, sorry for that.
Logged

Haplo

  • Global Moderator
  • Planetologist
  • ****
  • Posts: 2065
  • Shadow
    • View Profile
Re: New translation cleaner tool
« Reply #10 on: July 31, 2018, 03:29:13 PM »

Thank you very much ;D
Logged

Elevator

  • Drifter
  • **
  • Posts: 65
  • Refugee
    • View Profile
Re: New translation cleaner tool
« Reply #11 on: August 03, 2018, 06:35:42 PM »

Quote
Hmm, 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.
Logged

publicuser

  • Drifter
  • **
  • Posts: 82
  • Refugee
    • View Profile
Re: New translation cleaner tool
« Reply #12 on: October 03, 2018, 04:35:58 AM »

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

ison

  • Developer
  • Planetologist
  • *****
  • Posts: 2136
    • View Profile
Re: New translation cleaner tool
« Reply #13 on: December 06, 2018, 08:57:37 AM »

Unfortunately it doesn't handle mods.
Logged