Translating defs

Started by TomaszA2, April 29, 2018, 11:59:49 AM

Previous topic - Next topic

TomaszA2

Hey, I have problem with translating my mod defs.
It looks fine but game didn't even notice DefInjected translation files.

├───Defs
│   ├───Cond
│   │       Game conditions.xml
│   │
│   └───Evs
│           Events.xml

├───Languages
│   ├───English
│   │   └───Keyed
│   │           Text_interface.xml
│   │
│   └───Polish
│       ├───DefInjected
│       │   ├───Cond
│       │   │       Game conditions.xml
│       │   │
│       │   └───Evs                          <- here is problem too
│       │           Events.xml
│       │
│       └───Keyed
│               Text_interface.xml

Original Game conditions.xml:
<?xml version="1.0" encoding="utf-8"?>
<Defs>
  <GameConditionDef>
    <defName>HeatApoCon</defName>
<conditionClass>Apocalypse.GameCondition_OverHeatWave</conditionClass>
    <label>Heat Apocalypse</label>
    <description>Apocalypse: Heat.</description>
    <endMessage>You survived the Apocalypse: Heat.</endMessage>
    <canBePermanent>true</canBePermanent>
  </GameConditionDef>

</Defs>

Translated:
<?xml version="1.0" encoding="utf-8" ?>
<LanguageData>
<HeatApoCon.label>Piekielna apokalipsa</HeatApoCon.label>
<HeatApoCon.description>Cała ludzkość jest zagrożona spaleniem żywcem, upewnij się że twoja kolonia jest chłodzona na tyle mocno aby to przetrwać.</HeatApoCon.description>
<HeatApoCon.endMessage>Przeżyliście apokalipsę! Teraz tylko musicie się upewnić że jesteście gotowi na następne wyzwania.</HeatApoCon.endMessage>
</LanguageData>


I'll be grateful for any help. It looks for me very fine and I really dont know what's not ok with this. I've tried all my ideas, everyone fail.

Mehni

Translations are a bit picky: they have to be in the right folder.

Put the translation for the game conditions in a folder called GameConditionsDef. I also discourage using spaces in filenames, it can cause issues with certain operating systems. There's no Events in vanilla, so I assume you mean Incidents. These would go in their own appropriate folder too. N.B.: It follows the vanilla XML structure (not the folder structure).

Quote from: TomaszA2 on April 29, 2018, 11:59:49 AM
├───Defs
│   ├───Cond
│   │       Game_Conditions.xml
│   
│   
├───Languages
│   ├───English
│   │   └───Keyed
│   │           Text_interface.xml
│   │
│   └───Polish
│       ├───DefInjected
│       │   ├───GameConditionsDef
│       │   │       Game_Conditions.xml
│       │   
│       │
│       └───Keyed
│               Text_interface.xml

TomaszA2

Hey, I've tried it all and nothing changed in game.
Actual structure:
├───Defs
│   ├───GameConditionsDef
│   │       Game_conditions.xml
│   │
│   └───Incidents
│           Events.xml

├───Languages
│   ├───English
│   │   └───Keyed
│   │           Text_interface.xml
│   │
│   └───Polish
│       ├───DefInjected
│       │   ├───GameConditionsDef
│       │   │       Game_conditions.xml
│       │   │
│       │   └───Incidents
│       │           Events.xml
│       │
│       └───Keyed
│               Text_interface.xml

Im translating my mod, not game, probably it's why folder names in DejInjected can be any with the same result.