JFD
Kathigitarkh
I was hoping to make things easy, and use an existing Popup box to display some information. The problem is this information is dynamic and whilst the text key shows correctly, it fails to localise. Here's my code, to make things clearer:
So is it just a matter of that the popup doesn't have the functionality to support this, or am I missing something?
Code:
function populateInfo()
local activePlayer = Players[Game.GetActivePlayer()]
local popupInfo = {Data1 = 800, Type = ButtonPopupTypes.BUTTONPOPUP_TEXT, }
for row in GameInfo.Civilization_JFD_CulturalObjectives() do
local civilizationType = row.CivilizationType
if activePlayer:GetCivilizationType() == GameInfoTypes[civilizationType] then
local bonuses = row.Bonuses
local penalties = row.Penalties
local briefing = bonuses .. "[NEWLINE]" .. penalties
popupInfo.Text = Locale.ConvertTextKey(briefing)
UI.AddPopup(popupInfo)
end
end
end
So is it just a matter of that the popup doesn't have the functionality to support this, or am I missing something?