Ludeon Forums

Ludeon Forums

  • December 18, 2018, 05:54:25 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Pawns' age is not properly formatted  (Read 306 times)

Elevator

  • Drifter
  • **
  • Posts: 65
  • Refugee
    • View Profile
Pawns' age is not properly formatted
« 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:
Code: [Select]
age 80 (153) yearsFurthermore, in some languages the "years" entry is necessary:
Code: [Select]
мужчина, 80 (153) года
Technically, localized values for "year" and "years" are already given in keyed values in localizations: "Period1Year", "PeriodYears"
The code lloks like that:
Code: [Select]
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]
Logged

Elevator

  • Drifter
  • **
  • Posts: 65
  • Refugee
    • View Profile
Re: Pawns' age is not properly formatted
« Reply #1 on: August 02, 2018, 05:16:58 PM »

This issue is still not fixed
Logged

ison

  • Developer
  • Planetologist
  • *****
  • Posts: 2136
    • View Profile
Re: Pawns' age is not properly formatted
« Reply #2 on: December 06, 2018, 08:36:29 AM »

Logged