Ludeon Forums

Ludeon Forums

  • October 15, 2019, 03:56:43 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Translating "Defs" - do I have it right?  (Read 1708 times)

joeyeti

  • Super Translator
  • Drifter
  • ***
  • Posts: 48
  • Refugee
    • View Profile
Translating "Defs" - do I have it right?
« on: May 05, 2014, 08:37:01 AM »

Judging by the other translations already included in 0.4.430 I just wanted to be sure - for my own Slovak translation I need to create a "DefInjected" subfolder (besides "Keyed") in "sk-SK", copy in there all the folders under "Mods\Core\Defs" and translate the XML files in them?
Logged

Neone

  • Colonist
  • ***
  • Posts: 178
  • Forum addict
    • View Profile
Re: Translating "Defs" - do I have it right?
« Reply #1 on: May 05, 2014, 08:45:22 AM »

Not exactly - translation files have only lines that need to be translated, while Mods\Core\Defs have all data in them. Language Def files have also a little different structure and names.

Easiest way is to copy DefInjected from other translator (German, French, Polish) and then translate - you can find English version of text in  Mods\Core\Defs, while copying from other translator gives you proper structure.
Logged

joeyeti

  • Super Translator
  • Drifter
  • ***
  • Posts: 48
  • Refugee
    • View Profile
Re: Translating "Defs" - do I have it right?
« Reply #2 on: May 05, 2014, 09:04:26 AM »

Ok... so there is no up-to-date english source for the Language Def files then?
Logged

Neone

  • Colonist
  • ***
  • Posts: 178
  • Forum addict
    • View Profile
Re: Translating "Defs" - do I have it right?
« Reply #3 on: May 05, 2014, 09:08:49 AM »

Yes there is - but it is not a copy paste source.

It is a 'find what you need' source.
Logged

Tynan

  • Developer
  • Administrator
  • Transcendent
  • *****
  • Posts: 11708
    • View Profile
    • Tynan's Blog
Re: Translating "Defs" - do I have it right?
« Reply #4 on: May 05, 2014, 11:34:53 AM »

The original English data is in the main game XML data under Defs/. Translating this works by replacing fields from the main game XML. You create new language data which is "injected" into the game data at the end of the loading process to replace the English data.

So if you want to replace the <label> or the item with defname <defName>Metal</defName>, you would write:

<Metal.label>Newname</Metal.label>

In a DefInjected XML file.

As Neone notes, you'll want to look at other languages for reference.

Moving this to Translations board.
Logged
Tynan Sylvester - @TynanSylvester - Tynan's Blog

joeyeti

  • Super Translator
  • Drifter
  • ***
  • Posts: 48
  • Refugee
    • View Profile
Re: Translating "Defs" - do I have it right?
« Reply #5 on: May 05, 2014, 12:48:23 PM »

Thx both! Working on it already, based on the german translation.

One more question - are only those files in Definjected in the german translation used? Cause there are more XML files in the subdirs under "Core\Defs"... But maybe those do not contain anything translatable (yet)...
Logged

Tynan

  • Developer
  • Administrator
  • Transcendent
  • *****
  • Posts: 11708
    • View Profile
    • Tynan's Blog
Re: Translating "Defs" - do I have it right?
« Reply #6 on: May 05, 2014, 12:57:15 PM »

You'll want to work directly from the Core/Defs data to be most complete. The Germans may have missed something.
Logged
Tynan Sylvester - @TynanSylvester - Tynan's Blog

Haplo

  • Global Moderator
  • Planetologist
  • ****
  • Posts: 2095
  • Shadow
    • View Profile
Re: Translating "Defs" - do I have it right?
« Reply #7 on: May 05, 2014, 02:00:28 PM »

Right now the german may not be complete. I've made only a quick update from 420 to the 430 version yet.
Didn't have much time to do an in depth look through, so it may be that there is still something missing. :)
Logged