Ludeon Forums

RimWorld => Mods => Translations => Topic started by: Elevator on December 23, 2017, 08:36:09 AM

Title: Pawns' age is not properly formatted
Post by: Elevator on December 23, 2017, 08:36:09 AM
At the description frame and in the Health tab pawn's age in years is given (see the screenshot below).
The better solution would be to place localized values of "year" or "years" after the number. In this case it will look like:
age 80 (153) years
Furthermore, in some languages the "years" entry is necessary:
мужчина, 80 (153) года

Technically, localized values for "year" and "years" are already given in keyed values in localizations: "Period1Year", "PeriodYears"
The code lloks like that:
int num = (int)(yearsFloat * 3600000f);
num = Mathf.Min(num, 3599999);
int num2;
int num3;
int num4;
float num5;
num.TicksToPeriod(out num2, out num3, out num4, out num5);
if (num2 > 0)
{
if (num2 == 1)
{
return "Period1Year".Translate();
}
return "PeriodYears".Translate(new object[]
{
num2
});
}

So there shouldn't be a problem to implement the suggested solution.

[attachment deleted by admin: too old]
Title: Re: Pawns' age is not properly formatted
Post by: Elevator on August 02, 2018, 05:16:58 PM
This issue is still not fixed
Title: Re: Pawns' age is not properly formatted
Post by: ison on December 06, 2018, 08:36:29 AM
Moved to mantis: https://ludeon.com/mantis/view.php?id=3630