From 15ae9fcb0cc93da52c4ee1100c4422d815b8b28d Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Fri, 30 Mar 2018 16:58:51 -0400 Subject: [PATCH] Use wesnoth.format instead of string.format for translateable strings in [objectives] --- data/lua/wml/objectives.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/lua/wml/objectives.lua b/data/lua/wml/objectives.lua index a233f562f6d4..5fa9370e3d50 100644 --- a/data/lua/wml/objectives.lua +++ b/data/lua/wml/objectives.lua @@ -54,8 +54,8 @@ local function generate_objectives(cfg) if turn_limit >= current_turn then local turn_count = turn_limit - current_turn + 1 - turn_counter = _("(this turn left)", "(%d turns left)", turn_count) - turn_counter = tostring(turn_counter):format(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 .. "" 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 = string.format(tostring(_ "%d%% of gold carried over to the next scenario."), obj.carryover_percentage) + carryover_amount_string = wesnoth.format(_ "$percent|% of gold carried over to the next scenario.", {percent = obj.carryover_percentage}) end gold_carryover = gold_carryover