User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31 Build Identifier: When upload an invalid po file to server via UI, the error message given is: Invalid PO file contents on file: [file name] The user has no clue what exactly went wrong. Reproducible: Always Steps to Reproduce: 1. Find a po file with invalid entry in header section i.e. "\n" 2. Upload it from web UI (two ways: one from editor one from documents page) Actual Results: from documents page: Invalid PO file contents on file: [file name] from within editor: File upload failed. JBWEB000065: HTTP Status 500 - An error occurred while uploading the file : Invalid PO file contents on file: about_fedora JBWEB000309: type JBWEB000067: Status report JBWEB000068: message An error occurred while uploading the file : Invalid PO file contents on file: about_fedora JBWEB000069: description JBWEB000145: The server encountered an internal error that prevented it from fulfilling this request. JBoss Web/7.2.0.Final-redhat-1 Expected Results: At least give or hint the offending entry/line number etc. The invalid header is accepted by msgcat and Zanata probably should not reject it. But giving line number of a file is always useful.
Even after Zanata handles "\n" in headers (ie when bug 1029734 is fixed), it is important that Zanata should generate useful error messages (not a 500 error!) for any file which it thinks is non-compliant.
Should be an easy fix
Migrated; check JIRA for bug status: http://zanata.atlassian.net/browse/ZNTA-568