The unfolded protein response and translation attenuation: a modelling approach