[0.17.75] on_string_translated sometimes contains wrong localised_string

This subforum contains all the issues which we already resolved.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

[0.17.75] on_string_translated sometimes contains wrong localised_string

Post 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"}
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14360
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.75] on_string_translated sometimes contains wrong localised_string

Post by Rseding91 »

Thanks for the report. It's now fixed for the next version of 0.17.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”