View Single Post
08/30/18, 02:28 PM   #16
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,965
Not sure if this is correct but an attempt to explain:

Event_addon_loaded fires before the UI is loaded, or sort of at least.
It fires for each addon, that is why you compare the addonName in the callback function with your addon name! Else your code would run on EVERY single addon that loads the event
At this point there might have been missing texts which got loaded after your addon on the time axis and thus some where loaded and translated, others weren't.

event_player_activated is a bit later in the call chain, and fires as your char is loaded and ready to move in the world. It also fires after a zone change or wayshrine teleport etc.
So maybe the crippled text was because your changes were too early, and not too late.
As the event_player_activated fired the Ui was loaded and all texts are there, then your code changes the language and the texts are exchanged properly.

Last edited by Baertram : 08/30/18 at 02:31 PM.
  Reply With Quote