I tried a few options for localised strings. These variants worked for me:
if Machine.localised_name ~= nil and not Machine.localised_name == {} and not Machine.localised_name == "" then
AMSMachine.localised_name = {"ams.name", {Machine.localised_name}}
else
AMSMachine.localised_name = {"ams.name", {"entity-name."..Machine.name}}
end
Similarly for other fields:
AMSMachine.localised_description = {"ams.description", {Machine.localised_name}}
AMSMachine.localised_description = {"ams.description", {"entity-name."..Machine.name}}
AMSMachineItem.localised_name = {"ams.name", {Machine.localised_name}}
AMSMachineItem.localised_name = {"ams.name", {"entity-name." .. Machine.name}}
AMSMachineItem.localised_description = {"ams.description", {Machine.localised_name}}
AMSMachineItem.localised_description = {"ams.description", {"entity-name."..Machine.name}}
AMSMachineRecipe.localised_name = {"ams.name", {Machine.localised_name}}
AMSMachineRecipe.localised_name = {"ams.name", {"entity-name." .. Machine.name}}
AMSMachineRecipe.localised_description = {"ams.description", {Machine.localised_name}}
AMSMachineRecipe.localised_description = {"ams.description", {"entity-name."..Machine.name}}
AMSMachineTechnology.localised_name = {"ams.name", {Machine.localised_name}}
AMSMachineTechnology.localised_name = {"ams.name", {"entity-name." .. Machine.name}}
AMSMachineTechnology.localised_description = {"ams.tech-description", {Machine.localised_name}}
AMSMachineTechnology.localised_description ={"ams.tech-description", {"entity-name."..Machine.name}}