Pawns' age is not properly formatted

Started by Elevator, December 23, 2017, 08:36:09 AM

Previous topic - Next topic

Elevator

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]

Elevator