Note on translating for Royalty

Started by Tynan, February 25, 2020, 09:15:24 PM

Previous topic - Next topic

Tynan

Hi all, just a quick note on translating for Royalty.

You can do it in the same repo as the base language, just by making a folder for Core and one for Royalty.

The German translation has an example. See here: https://github.com/Ludeon/RimWorld-de

As always, thank you deeply to all translators.
Tynan Sylvester - @TynanSylvester - Tynan's Blog

b606

Hi Tynan,

Can you please give more information about the gender constant system. The release note is not enough informative :
In which files are they active ?

So far I identified some QuestScript (not in : PrisonerWillingToJoin and DownedRefugee, not for manhunter animal) and RulePacks.

A bit desappointed it is not in TaleDef (I already had my gender commits waiting for months  :( ), I would like to know whether it is active in ThoughtDef and TraitDef.

Also, in some QuestScript we have {SUBJECT_definite}, can we use {SUBJECT_gender ? : :} there?
b606


Make the French RimWorld Translation at maximum quality.
French Optimisation Mod

ison

Quote from: b606 on March 25, 2020, 06:54:10 AM
Can you please give more information about the gender constant system. The release note is not enough informative :
In which files are they active ?
They should be available everywhere. For texts which use {} the syntax is as follows: {PAWN_gender ? male : female}. For texts which use [] you need to add new conditional rules like so:
<li>questDescription->Some text. [mysymbol]</li>
<li>mysymbol(asker_gender==Male)->the asker is male</li>
<li>mysymbol(asker_gender==Female)->the asker is female</li>

(where "asker" is the pawn symbol, it could be PAWN in some cases)
If it doesn't work, could you please copy-paste the generation error here?

Quote from: b606 on March 25, 2020, 06:54:10 AM
Also, in some QuestScript we have {SUBJECT_definite}, can we use {SUBJECT_gender ? : :} there?
Yes, you can.

b606

Hi Ison,

Thank you very much for the information. I used as much as I could the conditional rules in the RulePacks. I shall re-test again for PrisonerWillingToJoin and DownedRefugee (may be I didn't do it right last time) and shall provide more info about how it worked.
b606


Make the French RimWorld Translation at maximum quality.
French Optimisation Mod

b606

Here is the excerpt from Core/DefInjected/QuestScriptDef/Script_DownedRefugee.xml where I attempted to use refugee_gender in conditional rule (see last rules), resulting in questDescription → UNRESOLVABLE. Similar situation PrisonerWillingToJoin with prisoner_gender.


  <OpportunitySite_DownedRefugee.questDescriptionRules.rulesStrings>
    <li>questDescription(askerIsNull==true)->[refugee_nameDef] vous contacte par radio et vous supplie de l'aider. [refugee_pronoun] est [refugee_wounded] et incapable de bouger.\n\n[refugee_nameDef] est [refugee_titleIndef] [refugee_has_age] de [refugee_age] ans. [refugee_pronoun] promet de vous rejoindre si vous lui portez secours.\n\n[refugee_nameDef] dit que [allSitePartsDescriptionsExceptFirst][pawnInvolvedInQuestInfo]</li>
    <li>questDescription(asker_factionLeader==True)->[asker_nameDef], [asker_faction_leaderTitle] de [asker_faction_name], dit que son [asker_friend] a été [refugee_wounded] pendant un voyage. La victime est [refugee_nameIndef], [refugee_titleIndef] [refugee_has_age] de [refugee_age] ans.\n\n[asker_nameDef] n'a personne de disponible pour sauver [refugee_nameDef], mais dit que si vous arrivez à la position de [refugee_nameDef] et à lui porter secours, [refugee_pronoun] rejoindra votre colonie.\n\n[asker_nameDef] dit aussi que [allSitePartsDescriptionsExceptFirst][pawnInvolvedInQuestInfo]</li>
    <!-- NOTE: What is refugee_pawnInvolvedInQuestInfo for? -->
    <li>pawnInvolvedInQuestInfo(priority=1)->[refugee_pawnInvolvedInQuestInfo]</li>
    <li>pawnInvolvedInQuestInfo-></li>
    <!-- BUG: refugee_gender not defined -->
    <li>asker_friend(refugee_gender==Male)->ami</li>
    <li>asker_friend(refugee_gender==Female)->amie</li>
    <li>refugee_wounded(refugee_gender==Male)->blessé</li>
    <li>refugee_wounded(refugee_gender==Female)->blessée</li>
    <li>refugee_has_age(refugee_gender==Male)->âgé</li>
    <li>refugee_has_age(refugee_gender==Female)->âgée</li>
    <li>refugee_rescued(refugee_gender==Male)->sauvé</li>
    <li>refugee_rescued(refugee_gender==Female)->sauvée</li>
  </OpportunitySite_DownedRefugee.questDescriptionRules.rulesStrings>
b606


Make the French RimWorld Translation at maximum quality.
French Optimisation Mod

Tynan

Ison can you comment on the above?

But b606, the log you posted has no mention of gender at all.
Tynan Sylvester - @TynanSylvester - Tynan's Blog

b606

The gender conditional rules are UNRESOLVABLE


refugee_wounded → UNRESOLVABLE
refugee_has_age → UNRESOLVABLE


The french (and latin) language is so heavily gendered that x_gender is needed everywhere, for each pawn and animal in the texts.
b606


Make the French RimWorld Translation at maximum quality.
French Optimisation Mod

b606

#7
Tested CaravanFled in Core/../Tales_Caravan.xml with tale_noun reduced to the only one needing gender.

The conditional rule tale_noun(PAWN_gender==Male)->... is UNRESOLVABLE

Since {PAWN_gender ? i : ie : i(e)} is not interpreted here, using it would just generate texts such as

Beau-fils de Orange
Cette sculpture ressemble à Carbra Orange repli{PAWN_gender ? É : Ée : É(e)}
derrière un arbre, se cachant d'un imposant bandit. Les poursuivants de
Orange sont auréolés de fumée bleue. L'œuvre a une touche de «graffiti»
et a une structure concentrée. Cette gravure raconte l'histoire de Orange
poursuiv{PAWN_gender ? I : Ie : I(e)} par des ennemis, le 1er septobre
5476.


Excerpt of Tales_Caravan.xml

  <CaravanFled.rulePack.rulesStrings>
    <li>tale_noun(PAWN_gender==Male)->[PAWN_nameDef] poursuivi par des ennemis</li>
    <li>tale_noun(PAWN_gender==Female)->[PAWN_nameDef] poursuivie par des ennemis</li>
    <li>image->[PAWN_nameFull] courant frénétiquement [circumstance_group]</li>
    <li>image->[PAWN_nameFull] courant très vite [circumstance_group]</li>
    <li>image(PAWN_gender==Male)->[PAWN_nameFull] replié derrière [TerrainFeatureAny_indef], se cachant [circumstance_group]</li>
    <li>image(PAWN_gender==Female)->[PAWN_nameFull] repliée derrière [TerrainFeatureAny_indef], se cachant [circumstance_group]</li>
    <li>image->[PAWN_nameFull] tentant de battre en retraite [circumstance_group]</li>
    <li>image->[PAWN_nameFull] s'éloignant tranquillement [circumstance_group]</li>
    <li>circumstance_phrase->tandis que [Quantity_adjphrase] [Enemy_AnyPlural] se lancent à sa poursuite</li>
    <li>circumstance_phrase->tandis que [Quantity_adjphrase] [Enemy_AnyPlural] son à sa recherche</li>
    <li>circumstance_phrase->de [Quantity_adjphrase] [Enemy_AnyPlural]</li>
    <li>circumstance_phrase->de [Quantity_adjphrase] [Animal_Plural] ennemis</li>
    <li>circumstance_phrase->de [Quantity_adjphrase] [Animal_FemPlural] ennemies</li>
    <li>circumstance_phrase->d'un [AdjectiveLarge] [Enemy]</li>
    <li>circumstance_phrase->d'une [AdjectiveLarge_Feminine] [Enemy_Feminine]</li>
    <li>desc_sentence->les poursuivants de [PAWN_nameDef] brandissent des [Weapon_AnyPlural].</li>
    <li>desc_sentence->les poursuivants de [PAWN_nameDef] sont auréolés de fumée [Color_Feminine].</li>
    <li>desc_sentence->les poursuivants de [PAWN_nameDef] affichent des visages [AdjectiveAngsty_Plural].</li>
    <li>desc_sentence->les poursuivants de [PAWN_nameDef] brandissent des [Weapon_AnyPlural].</li>
    <li>desc_sentence->[PAWN_nameDef] est en sueur.</li>
    <li>desc_sentence->[PAWN_nameDef] est hors d'haleine.</li>
  </CaravanFled.rulePack.rulesStrings>


b606


Make the French RimWorld Translation at maximum quality.
French Optimisation Mod

b606

For ThreatReward_Manhunters_ItemPod in Royalty/DefInjected/QuestScriptDef/Scripts_ItemPodThreat.xml, we need the tags below especially for manhunterArrivalLetterEnd rules (Same case anywhere involving animals).

Ex: Ce/tte [animalKind_label] a été relâché(e) par [asker_nameFull] (This [animalKind_label] was released by [asker_nameFull]).


[animalKind_gender]
[animalKind_definite]
[animalKind_indefinite]

b606


Make the French RimWorld Translation at maximum quality.
French Optimisation Mod

b606

In Core/DefInjected/RulePackDef/* (see for example Combat_MeleeIncludes.rulePack.rulesStrings), we need [recipient_part{0..3}_definite] and [TOOL_definite], avoiding "le/la" everywhere in the combat log.

These words come mainly from customLabel in BodyDef that we can classify easily in WordInfo/Gender/{Male,Female}.txt.

It would also be really nice if X_possessive uses <her and <his from grammar.xml not <its, when a gender!=Neuter is defined for the object. Using neuter <its will not make sense in that case. Ex. of use is [TOOL_possessive] and [WEAPON_possessive] in these RulePacks_Combat*. This would also clean up the combat log.
b606


Make the French RimWorld Translation at maximum quality.
French Optimisation Mod

Ragnar-F

Indeed, WordInfo/Gender/* seems to be completely ignored for RulePackDef, TaleDef and possibly other similar concepts. Conditions like WEAPON_gender==Female or WEAPON_projectile_gender==Male do not work. This alone would already improve the quality of the sentences significantly.

The other suggestions of b606 are also a nice-to-have.

ison

Fixed:
Downed refugee and prisoner quests indeed handled gender constants incorrectly. This should be fixed once the next hotfix is released.
Added TOOL_definite, TOOL_indefinite, and TOOL_gender.
Added recipient_part_definite, indefinite, gender

Not fixed yet:
Symbols like animalKind still don't have their gender constants added. Unfortunately this would require some API breaking changes for 1.1. We'll have to fix it in the next major version.
Tales don't support gender constants. This would require API breaking changes as well. So some mods could break.
WEAPON and WEAPON_projectile don't support gender constants yet

b606

Hi Ison,

Thanks for the changes !

I knew there were some technical difficulties when the sublimissimo {x_gender ? :: } could not be generalized.

We will do with what we have now, and waiting for the new API impatiently.
b606


Make the French RimWorld Translation at maximum quality.
French Optimisation Mod

b606

All modifications have been applied and the french combat log is much cleaner now.

Still, there is a regression from version 1.0 where animal pawns do not use their <XXX.labelFemale>, giving very odd sentences. See screenshots below where "la dinde" (female turkey) is referred to "la dindon", and "la rate" (female) to "la rat", which are just plain wrong. More info here https://github.com/Ludeon/RimWorld-fr/issues/283

With 1.1.2586 rev1246, I still also have the issue https://ludeon.com/forums/index.php?topic=51260.0 where choosing a specific word as seed for world generation will bug the game (absolutely reproducible, use for example "ruisseau" or "jack-pot", other seeds will run fine). The Polish translation also runs into that issue. And I suppose that any translation may runs into that with some unlucky random seed.

The log I submitted there is not informative enough to determine where the problem originates.
b606


Make the French RimWorld Translation at maximum quality.
French Optimisation Mod

morticinus

#14
Hi

I have a problem with translating all "questnames", is forcibly replacing the first capital letters. I have no idea how I can solve it.

Examples:

  <!-- EN:
    <li>questName->monument decree</li>
  -->
  <Decree_BuildMonument.questNameRules.rulesStrings>
    <li>questName->Nařízení výstavby monumentu</li>
  </Decree_BuildMonument.questNameRules.rulesStrings>



  <!-- EN:
    <li>questName->[defToProduce_label] production decree</li>
  -->
  <Decree_ProduceItem.questNameRules.rulesStrings>
    <li>questName->Nařízení výroby ([defToProduce_label])</li>
  </Decree_ProduceItem.questNameRules.rulesStrings>


Ingame: