Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - nomius

#1
A colonist hit by a bear, for example, would end up with the following injury in the Health tab:

QuoteBite (Grizzly teeth)

For languages such as Romanian, French, Italian, Japanese, Spanish and probably others, the order in the parenthesis has to be reversed:

Quote
Mușcătură (dinți de Grizzly)
bite = mușcătură
teeth = dinți

However there doesn't seem to be a way to this. I suspect it's because of hardcoded code, more specifically in Hediff_Injury.cs, the LabelInBrackets method:

public override string LabelInBrackets
{
get
{
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.Append(base.LabelInBrackets);
if (sourceHediffDef != null)
{
if (stringBuilder.Length != 0)
{
stringBuilder.Append(", ");
}
stringBuilder.Append(sourceHediffDef.label);
}
else if (source != null)
{
if (stringBuilder.Length != 0)
{
stringBuilder.Append(", ");
}
stringBuilder.Append(source.label);
if (sourceBodyPartGroup != null)
{
stringBuilder.Append(" ");
stringBuilder.Append(sourceBodyPartGroup.LabelShort);
}
}
HediffComp_GetsPermanent hediffComp_GetsPermanent = this.TryGetComp<HediffComp_GetsPermanent>();
if (hediffComp_GetsPermanent != null && hediffComp_GetsPermanent.IsPermanent && hediffComp_GetsPermanent.PainCategory != 0)
{
if (stringBuilder.Length != 0)
{
stringBuilder.Append(", ");
}
stringBuilder.Append(("PainCategory_" + hediffComp_GetsPermanent.PainCategory).Translate());
}
return stringBuilder.ToString();
}
}


More specifically this section in the second if statement:


stringBuilder.Append(source.label);
if (sourceBodyPartGroup != null)
{
stringBuilder.Append(" ");
stringBuilder.Append(sourceBodyPartGroup.LabelShort);
}


I don't know C#, but a format string (something like "{0} {1}", specifiable in the XMLs) could be used there.
#2
Hi,

I have the same issue with the Romanian translation, and at least so do the French, Italian and Japanese ones.
It seems like it's not solvable as it's something hardcoded into the game. I've looked through the decompiled code and I suspect this is the problematic function (from Hediff_Injury.cs):
public override string LabelInBrackets
{
get
{
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.Append(base.LabelInBrackets);
if (sourceHediffDef != null)
{
if (stringBuilder.Length != 0)
{
stringBuilder.Append(", ");
}
stringBuilder.Append(sourceHediffDef.label);
}
else if (source != null)
{
if (stringBuilder.Length != 0)
{
stringBuilder.Append(", ");
}
stringBuilder.Append(source.label);
if (sourceBodyPartGroup != null)
{
stringBuilder.Append(" ");
stringBuilder.Append(sourceBodyPartGroup.LabelShort);
}
}
HediffComp_GetsPermanent hediffComp_GetsPermanent = this.TryGetComp<HediffComp_GetsPermanent>();
if (hediffComp_GetsPermanent != null && hediffComp_GetsPermanent.IsPermanent && hediffComp_GetsPermanent.PainCategory != 0)
{
if (stringBuilder.Length != 0)
{
stringBuilder.Append(", ");
}
stringBuilder.Append(("PainCategory_" + hediffComp_GetsPermanent.PainCategory).Translate());
}
return stringBuilder.ToString();
}
}


The second if statement contains the hardcoded part. Code is from version 1.2.3005

Edit: I've created a bug report regarding this
#3
Translations / Re: Official: Romanian
June 12, 2021, 08:49:50 AM
Salut! Sunt și eu interesat în a ajuta la traducere. Intenționez să încep de azi. S-a mai făcut ceva de când ai creat post-ul?
Mă găsești pe discord cu handle-ul nomius#9879