Global.string_id_file = ModPath .. "strings.json"
Global.string_id_strings = Global.string_id_strings or io.file_is_readable(Global.string_id_file) and io.load_as_json(Global.string_id_file) or {}

local text = LocalizationManager.text
function LocalizationManager:text(string_id, ...)
	if Global.string_id_save and Global.string_id_strings and not Global.string_id_strings[string_id] then
		Global.string_id_strings[string_id] = text(self, string_id)
		if managers.mission and managers.mission._fading_debug_output then
			managers.mission._fading_debug_output:script().log(string_id, Color.white)
		end
	end
	return text(self, string_id, ...)
end