Translating "Defs" - do I have it right?

Started by joeyeti, May 05, 2014, 08:37:01 AM

Previous topic - Next topic

joeyeti

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?

Neone

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.

joeyeti

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

Neone

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

It is a 'find what you need' source.

Tynan

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

joeyeti

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)...

Tynan

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

Haplo

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. :)