View Single Post
07/25/19, 04:37 AM   #1
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
[open] FormatTime() inconsistent in different languages

function ZO_Stats:CreateMountSection() formats time to next training with this:
Lua Code:
  1. ZO_FormatTimeMilliseconds(timeUntilCanBeTrained, TIME_FORMAT_STYLE_COLONS, TIME_FORMAT_PRECISION_TWELVE_HOUR)

The strings this function returns with STYLE_COLONS and PRECISION_TWELVE_HOUR are strangely inconsistent.
The same applies to ZO_FormatTime, as well as the API functions these two invoke: FormatTimeMilliseconds and FormatTime.

language "en"
always returns strings like "19h 26m 40s"
never with colons
sidenote: the spaces are ASCII SPACE, looks kinda bad with line breaks, I'd use NBSP

language "de"
if time is under 1 hour, returns "26 m 40 s"
if time is above 1 hour, returns "19:26:40" COLONS!!!

language "fr"
if time is under 1 hour, returns "26 m 40 s"
if time is above 1 hour, returns "19h 26m 40s"
again no colons
why is there a space after number SOMETIMES?
  Reply With Quote