How to contribute

Started by Tynan, April 11, 2014, 09:43:08 AM

Previous topic - Next topic

alareth1976

Quote from: Haplo on August 01, 2016, 06:06:32 AM
Your folder Mods > Core > Languages > English is correct. You just can't take that as the translation source, as it only contains a few examples, not the full set. English has no complete translation folder, as it doesn't need translation.
This makes it for us translators a lot harder, as you need to find out what must be translated but it is as it is.
You can take another folder as a source to see what you need to translate in principle, even if you can't read what's written there.
I'm responsible for german and can say that These files are as far as I know up to date.
But I know that it's hard to read it, if you don't know german...

It does not make any sense.
Inside (RimWorld folder) > Mods > Core > Defs there are, kind, all the files that are in the other translations





even tho, inside Italians translations there are some differences compared to it



In the translations there's a single file and inside the file are defined different biomes


Haplo

#61
Yes, that looks to be correct.. But, sorry was there a question that I missed?


If you want to ask why the files are different, that is because in the Core -> Defs -> xxx folders are the full Def-files with all the infos that RimWorld needs to create the objects. Where in Core -> Languages -> xxx -> DefInjected -> xxx folders are only the informations about where the translation strings can be found.

Example Core -> Defs -> BiomeDefs -> Biomes_Arid.xml:

  <BiomeDef>
    <defName>AridShrubland</defName>
    <label>arid shrubland</label>
    <description>A dry region, but not dry enough to become a true desert. Open plains with grasses and bushes give way to scattered groves of trees. Plants are hardy and there is a moderate density of animals.</description>
    <workerClass>BiomeWorker_AridShrubland</workerClass>
    <animalDensity>4.0</animalDensity>
    <plantDensity>0.5</plantDensity>
    <baseColor>(125,101,78)</baseColor>


This part contains three important informations that you need: The defName, the string label and the string description.

So the translation file needs this information seperated by a .
(I've taken an extract from the german translation file as an example here :) )

  <AridShrubland.label>Savanne</AridShrubland.label>
  <AridShrubland.description>Eine trockene Gegend, aber nicht trocken genug für ...</AridShrubland.description>


Is this clear so far? Or do you have any more questions about it?


For if you're asking why your translations are all in one single file:
It may be that it is from an old alpha version and the structure was changed, or it just was translated like that. The file structure isn't really relevant, the info inside the file is more important. But for example I try to build my structure according to the Core files too. I also split up my files if the core files are split up. Not because it is needed, but because it makes it easier to see where what can be found.


Hopefully this clarifies it a bit? I know that the translation isn't easy... I also know that you'll later on find some more complicated pitfalls, but this is a basic introduction if you want ;)

dhrgusdlrns

Deer, developer.
Can we translate Background story?
Some people said it's not opened cause it's supported by sponsor.


Tynan

Tynan Sylvester - @TynanSylvester - Tynan's Blog

kaptain_kavern


Dinoabunai

#66
Hi, i've got some problems translating 0.15 stuff.

I switch to unstable beta and try to translate drugs.
So there is the file ~\Mods\Core\Defs\Drugs\Alcohol_Beer.xml
I created ~\Mods\Core\Languages\Russian\DefInjected\Drugs\Alcohol_Beer.xml
I made my translation, but it don't appear in game. Am I doing somethimg wrong?

Same problem with other files in that directory.

pluhi

#67
Quote from: Dinoabunai on August 24, 2016, 03:31:38 AM
Hi, i've got some problems translating 0.15 stuff.

I switch to unstable beta and try to translate drugs.
So there is the file ~\Mods\Core\Defs\Drugs\Alcohol_Beer.xml
I created ~\Mods\Core\Languages\Russian\DefInjected\Drugs\Alcohol_Beer.xml
I made my translation, but it don't appear in game. Am I doing somethimg wrong?

Same problem with other files in that directory.

You only need these lines for beer:
<Beer.label>beer</Beer.label>
<Beer.description>The first beverage besides water ever consumed by mankind. Beer can taste good, but its main effect is intoxication. Excessive consumption can lead to alcohol addiction.</Beer.description>
<Beer.ingestible.ingestCommandString>Drink {0}</Beer.ingestible.ingestCommandString>
<Beer.ingestible.ingestReportString>Drinking {0}.</Beer.ingestible.ingestReportString>

You can check other languages for ideas.

I have a better question. Some drugs don't have specific ingestCommandString and ingestReportString. In these cases the game falls back to base definition. Looks like this:

<ThingDef Name="MakeableDrugPillBase" ParentName="MakeableDrugBase" Abstract="True">
    <ingestible>
      <foodType>Processed</foodType>
      <baseIngestTicks>120</baseIngestTicks>
      <chairSearchRadius>0</chairSearchRadius>
      <ingestSound>Ingest_Pill</ingestSound>
      <ingestHoldUsesTable>false</ingestHoldUsesTable>
      <ingestCommandString>Take {0}</ingestCommandString>
      <ingestReportString>Taking {0}.</ingestReportString>
    </ingestible>
  </ThingDef>

There is no <defName> tag here, how to handle these?

UPDATE: You do it exactly the same as others. Like: <Amphetamine.ingestible.ingestCommandString>

Dinoabunai

#68
QuoteYou only need these lines for beer:
<Beer.label>beer</Beer.label>
<Beer.description>The first beverage besides water ever consumed by mankind. Beer can taste good, but its main effect is intoxication. Excessive consumption can lead to alcohol addiction.</Beer.description>
<Beer.ingestible.ingestCommandString>Drink {0}</Beer.ingestible.ingestCommandString>
<Beer.ingestible.ingestReportString>Drinking {0}.</Beer.ingestible.ingestReportString>

I know. i already translate them, but game shows default english text instead.

Haplo

Yes that is something that makes it harder this time to translate it:

If you take a look into the file Alcohol_Beer.xml you'll find that
<Beer.label> / <Beer.description> are part of the ThingDef for Beer.
This means you must place this translation inside the ThingDef folder in your translations.
Same for Wort..

Next there is <AlcoholHigh.label>, <AlcoholHigh.stages.0.label>, ...
These are actual HediffDefs and need to be inside a file in the folder HediffDef.

Next we have ThoughtDef, ChemicalDef and NeedDef to be extracted and placed in their corresponding folder..


Dinoabunai

Thx, Haplo!
But it really suck, that I spent 3 days to figure that out.

It'll be very cool, if devs at least makes a post on how localisation mechanics works. And it'll be VERY VERY nice, if they improve the mechanic, so that translators can clearly understand, where the game takes a particular translation. For now localisation process is a mess.

Dinoabunai

Note - from now (0.15.1276) drugs have fictional names.
So be sure to make the necessary changes in the game files.

KviEt

#72
Hi.
Сan i get complete version of Defs somewhere?
Defs from Steam has not all data like Shooting.label...

Dinoabunai

#73
In Defs\SkillDefs\Skills.xml we have something like this:

<SkillDef>
        <defName>Crafting</defName>
    <description>Crafting general items including weapons and tools.</description>
    <skillLabel>Crafting</skillLabel>
        <pawnLabel>Craftsman</pawnLabel>
</SkillDef>

But game also use <Crafting.label> tag in-game (see attachment). Same for other skills.

This is a bug? Or how do we should unerstand, that non-existing tag should be translated?

[attachment deleted by admin - too old]

Dinoabunai

Where the text from DefInjected/DesignationCategoryDef/DesignationCategories.xml should appear?
It's just does not appear when you hover the cursor over the tabs.