[0.17.75] on_string_translated sometimes contains wrong localised_string
Posted: Sat Nov 09, 2019 1:59 pm
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"}