(I guess because with one, scrap-rail becomes straight-scrap-rail because these were collapsed?) Was a little confused because other rail types showed 'straight rail' but the junk rail showed 'curved scrap rail' but turns out the localization file had those names reversed.
For other types - transport-belt, fast-transport-belt, express-belt both ways work the same way.
Code: Select all
local tooltip = '';
if( name ) then
-- this is how I get the localized name here... but it fails to translate 'rail' or 'scrap-rail' (from some mod)
tooltip ={'entity-name.'..name}
-- This is how the name was passed when the control was created; and works
tooltip = items[from].localised_name
end
ruleset_grid["upgrade-planner-from-" .. i].tooltip = tooltip