Update uses of moved format functions
This commit is contained in:
parent
533206674a
commit
e81a0377b0
3 changed files with 5 additions and 5 deletions
|
@ -23,11 +23,11 @@
|
||||||
local _ = wesnoth.textdomain "wesnoth-httt"
|
local _ = wesnoth.textdomain "wesnoth-httt"
|
||||||
local n = vars.units_to_slay
|
local n = vars.units_to_slay
|
||||||
local obj = _("Defeat one more enemy unit", "Defeat $units_to_slay enemy units", n)
|
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
|
if not cfg.silent then
|
||||||
local splash = _("Still $units_to_slay clan member to defeat!", "Still $units_to_slay clan members to defeat!", n)
|
local splash = _("Still $units_to_slay clan member to defeat!", "Still $units_to_slay clan members to defeat!", n)
|
||||||
wesnoth.wml_actions.print{
|
wesnoth.wml_actions.print{
|
||||||
text = wesnoth.format(splash, {units_to_slay = n}),
|
text = splash:format{units_to_slay = n},
|
||||||
size = 18,
|
size = 18,
|
||||||
red = 255, green = 255, blue = 255
|
red = 255, green = 255, blue = 255
|
||||||
}
|
}
|
||||||
|
|
|
@ -274,7 +274,7 @@ Chapter Three"
|
||||||
for i = 1, #units do
|
for i = 1, #units do
|
||||||
units[i] = units[i].name
|
units[i] = units[i].name
|
||||||
end
|
end
|
||||||
wml.variables[var] = wesnoth.format_conjunct_list(empty_str, units)
|
wml.variables[var] = stringx.format_conjunct_list(empty_str, units)
|
||||||
>>
|
>>
|
||||||
[args]
|
[args]
|
||||||
empty= _ "some experienced warriors" # wmllint: ignore
|
empty= _ "some experienced warriors" # wmllint: ignore
|
||||||
|
|
|
@ -55,7 +55,7 @@ local function generate_objectives(cfg)
|
||||||
if turn_limit >= current_turn then
|
if turn_limit >= current_turn then
|
||||||
local turn_count = turn_limit - current_turn + 1
|
local turn_count = turn_limit - current_turn + 1
|
||||||
turn_counter = _("(this turn left)", "($remaining_turns turns left)", turn_count)
|
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>"
|
turn_counter = "<span foreground='white'><small> " .. turn_counter .. "</small></span>"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -116,7 +116,7 @@ local function generate_objectives(cfg)
|
||||||
if obj.carryover_percentage == 0 then
|
if obj.carryover_percentage == 0 then
|
||||||
carryover_amount_string = _"No gold carried over to the next scenario."
|
carryover_amount_string = _"No gold carried over to the next scenario."
|
||||||
else
|
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
|
end
|
||||||
|
|
||||||
gold_carryover = gold_carryover
|
gold_carryover = gold_carryover
|
||||||
|
|
Loading…
Add table
Reference in a new issue