Bullet-proof pre-commit UI a bit.
Review Request #6365 — Created Sept. 23, 2014 and submitted
When receiving an unexpected error from the server, the frontend code for the
pre-commit upload would hit a TypeError, preventing it from completing the
process and leaving the browser with a forever "Loading..." message. This
change updates it to check when the response can't be parsed as JSON and show
"Unknown error" instead.While I was in here I fixed up some of the nearby localization to be more
correct.
- Checked that uploading a diff through the pre-commit UI still worked as
expected. - Ran js-tests.