Page 1 of 1

[0.17.75] on_string_translated sometimes contains wrong localised_string

Posted: Sat Nov 09, 2019 1:59 pm
by eradicator
The answer to a translation request sometimes has an extra empty string at the beginning of event.localised_string which breaks the correlation between request and answer.

Code: Select all

/c
local x = game.technology_prototypes['advanced-electronics-2'].localised_name
script.on_event(defines.events.on_string_translated,function(e)
  print(serpent.line(e.localised_string),'event')
  print(serpent.line(x))
  end)
game.player.request_translation(x)

Code: Select all

{"", "", "", {"technology-name.advanced-electronics"}, " 2"}    event
{"", "", {"technology-name.advanced-electronics"}, " 2"}

Re: [0.17.75] on_string_translated sometimes contains wrong localised_string

Posted: Sun Nov 10, 2019 2:05 pm
by Rseding91
Thanks for the report. It's now fixed for the next version of 0.17.