Bug 1030138

Summary: Invalid po file content error message not detailed enough
Product: [Retired] Zanata Reporter: Patrick Huang <pahuang>
Component: UsabilityAssignee: Patrick Huang <pahuang>
Status: CLOSED UPSTREAM QA Contact: Zanata-QA Mailling List <zanata-qa>
Severity: low Docs Contact:
Priority: medium    
Version: 3.0CC: sflaniga, zanata-bugs
Target Milestone: ---Keywords: screened
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-31 01:50:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Patrick Huang 2013-11-14 01:44:36 UTC
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.

Comment 1 Sean Flanigan 2013-11-14 04:48:32 UTC
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.

Comment 2 Patrick Huang 2015-03-11 01:04:02 UTC
Should be an easy fix

Comment 3 Zanata Migrator 2015-07-31 01:50:16 UTC
Migrated; check JIRA for bug status: http://zanata.atlassian.net/browse/ZNTA-568