This commit makes the CSV download use the same language for failure reasons as the frontend. It also adds a test around this stuff, which was patchily tested before.