diff --git a/data/campaigns/Heir_To_The_Throne/scenarios/23_Test_of_the_Clans.cfg b/data/campaigns/Heir_To_The_Throne/scenarios/23_Test_of_the_Clans.cfg index e80c9a3c177..3f5227e973f 100644 --- a/data/campaigns/Heir_To_The_Throne/scenarios/23_Test_of_the_Clans.cfg +++ b/data/campaigns/Heir_To_The_Throne/scenarios/23_Test_of_the_Clans.cfg @@ -23,11 +23,11 @@ local _ = wesnoth.textdomain "wesnoth-httt" local n = vars.units_to_slay local obj = _("Defeat one more enemy unit", "Defeat $units_to_slay enemy units", n) - vars.units_to_slay_obj = wesnoth.format(obj, {units_to_slay = n}) + vars.units_to_slay_obj = obj:format{units_to_slay = n} if not cfg.silent then local splash = _("Still $units_to_slay clan member to defeat!", "Still $units_to_slay clan members to defeat!", n) wesnoth.wml_actions.print{ - text = wesnoth.format(splash, {units_to_slay = n}), + text = splash:format{units_to_slay = n}, size = 18, red = 255, green = 255, blue = 255 } diff --git a/data/campaigns/Legend_of_Wesmere/scenarios/chapter3/09_Bounty_Hunters.cfg b/data/campaigns/Legend_of_Wesmere/scenarios/chapter3/09_Bounty_Hunters.cfg index 4fc53cdec0b..99acc2468b0 100644 --- a/data/campaigns/Legend_of_Wesmere/scenarios/chapter3/09_Bounty_Hunters.cfg +++ b/data/campaigns/Legend_of_Wesmere/scenarios/chapter3/09_Bounty_Hunters.cfg @@ -274,7 +274,7 @@ Chapter Three" for i = 1, #units do units[i] = units[i].name end - wml.variables[var] = wesnoth.format_conjunct_list(empty_str, units) + wml.variables[var] = stringx.format_conjunct_list(empty_str, units) >> [args] empty= _ "some experienced warriors" # wmllint: ignore diff --git a/data/lua/wml/objectives.lua b/data/lua/wml/objectives.lua index 73e9c187a01..0fada684825 100644 --- a/data/lua/wml/objectives.lua +++ b/data/lua/wml/objectives.lua @@ -55,7 +55,7 @@ local function generate_objectives(cfg) if turn_limit >= current_turn then local turn_count = turn_limit - current_turn + 1 turn_counter = _("(this turn left)", "($remaining_turns turns left)", turn_count) - turn_counter = wesnoth.format(turn_counter, {remaining_turns = turn_count}) + turn_counter = turn_counter:format{remaining_turns = turn_count} turn_counter = " " .. turn_counter .. "" end end @@ -116,7 +116,7 @@ local function generate_objectives(cfg) if obj.carryover_percentage == 0 then carryover_amount_string = _"No gold carried over to the next scenario." else - carryover_amount_string = wesnoth.format(_ "$percent|% of gold carried over to the next scenario.", {percent = obj.carryover_percentage}) + carryover_amount_string = (_ "$percent|% of gold carried over to the next scenario."):format{percent = obj.carryover_percentage} end gold_carryover = gold_carryover