Rename Lua UserInterface.Translate to .GetFluentMessage.

This commit is contained in:
Paul Chote
2024-10-19 14:52:36 +01:00
committed by Gustas
parent 8b11b499ed
commit 8452f71481
94 changed files with 308 additions and 308 deletions

View File

@@ -18,9 +18,9 @@ end
---@param description string key of the translation string
---@return number id used to query for the objective later
AddPrimaryObjective = function(player, description)
local translation = UserInterface.Translate(description)
Media.DisplayMessageToPlayer(player, translation, UserInterface.Translate("new-primary-objective"))
return player.AddObjective(translation, UserInterface.Translate("primary"), true)
local translation = UserInterface.GetFluentMessage(description)
Media.DisplayMessageToPlayer(player, translation, UserInterface.GetFluentMessage("new-primary-objective"))
return player.AddObjective(translation, UserInterface.GetFluentMessage("primary"), true)
end
---Adds a new optional objective, translates it and announces it via in-game chat message.
@@ -28,7 +28,7 @@ end
---@param description string key of the translation string
---@return number id used to query for the objective later
AddSecondaryObjective = function(player, description)
local translation = UserInterface.Translate(description)
Media.DisplayMessageToPlayer(player, translation, UserInterface.Translate("new-secondary-objective"))
return player.AddObjective(translation, UserInterface.Translate("secondary"), false)
local translation = UserInterface.GetFluentMessage(description)
Media.DisplayMessageToPlayer(player, translation, UserInterface.GetFluentMessage("new-secondary-objective"))
return player.AddObjective(translation, UserInterface.GetFluentMessage("secondary"), false)
end