Update uses of moved format functions

This commit is contained in:
Celtic Minstrel 2019-12-04 00:50:00 -05:00
parent 533206674a
commit e81a0377b0
3 changed files with 5 additions and 5 deletions

View file

@ -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
}

View file

@ -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

View file

@ -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 = "<span foreground='white'><small> " .. turn_counter .. "</small></span>"
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