Skip to content

Commit

Permalink
Use wesnoth.format instead of string.format for translateable strings…
Browse files Browse the repository at this point in the history
… in [objectives]
  • Loading branch information
CelticMinstrel committed Mar 30, 2018
1 parent c835e5b commit 15ae9fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions data/lua/wml/objectives.lua
Expand Up @@ -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 = "<span foreground='white'><small> " .. turn_counter .. "</small></span>"
end
end
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 15ae9fc

Please sign in to comment.