ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   v4.1.10 zo_iconTextFormat (https://www.esoui.com/forums/showthread.php?t=8072)

Gandalf 09/25/18 03:49 AM

v4.1.10 zo_iconTextFormat
 
Since yesterdays patch v4.1.10 zo_iconTextFormat shows a strange behavior while doing localization testing:

My ESO clients native language is English. So I use /script SetCVar("language.2", xx) to test German and French.

While having /script SetCVar("language.2", "en") or /script SetCVar("language.2", "de") active
Code:

/script d(zo_iconTextFormat("EsoUI/Art/MapPins/AvA_largeKeep_Aldmeri.dds",40,40))
> returns the yellow keepicon as expected

But when /script SetCVar("language.2", "fr") is active
Code:

/script d(zo_iconTextFormat("EsoUI/Art/MapPins/AvA_largeKeep_Aldmeri.dds",40,40))
> returns an empty string!

There very similar API function zo_iconFormatInheritColor()
Code:

/script d(zo_iconFormatInheritColor("EsoUI/Art/MapPins/AvA_largeKeep_Aldmeri.dds",40,40))
> returns the correct icon

Also, the behavior on the pts is correct.

Can someone confirm this behavior? Otherwise my client must have got corrupted a very strange way.

Thanks

Oops, picked the wrong forum sorry

votan 09/25/18 04:17 AM

French localization file:
SafeAddString(SI_FORMAT_ICON_TEXT, "", 0)
SafeAddString(SI_FORMAT_ICON_TEXT_NO_SPACE, "", 0)

Not good!
And not the only localization wiped out.

German:
SafeAddString(SI_FORMAT_ICON_TEXT, "<<X:1>>*<<!aC:2>>", 0)
SafeAddString(SI_FORMAT_ICON_TEXT_NO_SPACE, "<<X:1>><<2>>", 0)

English:
SafeAddString(SI_FORMAT_ICON_TEXT, "<<X:1>> <<2>>", 0)
SafeAddString(SI_FORMAT_ICON_TEXT_NO_SPACE, "<<X:1>><<2>>", 0)

zo_iconFormatInheritColor and zo_iconFormat do not use localization and will work the same in all languages.

Gandalf 09/25/18 05:40 AM

Thanks Votan!

So this is actually a new bug.

However this bug triggers bad programming on my side three years ago :o
I never should have used zo_iconTextFormat anyway.

These textformat functions come with quiet a cost:

Code:

/script local msStart = GetGameTimeMilliseconds() for i = 1,1000 do local icon = zo_iconTextFormat("EsoUI/Art/MapPins/AvA_largeKeep_Aldmeri.dds",40,40) end d(GetGameTimeMilliseconds()-msStart.."ms")
Tells me 50 -150ms

Code:

/script local msStart = GetGameTimeMilliseconds() for i = 1,1000 do local icon = zo_iconFormat("EsoUI/Art/MapPins/AvA_largeKeep_Aldmeri.dds",40,40) end d(GetGameTimeMilliseconds()-msStart.."ms")
Tells me 1ms

ZOS_ChipHilseberg 09/25/18 08:11 AM

This looks like a general problem with the French localization data. It will be fixed in a patch.


All times are GMT -6. The time now is 08:27 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI