Fix translation in dependent_restrict_with_error

This fixes an issue where the translation would be expected on the associated model itself, instead of on the association's parent.