Bug 1012706

Summary: RFE: when pulling or downloading, warning or error messages when invalid translations are discovered
Product: [Retired] Zanata Reporter: Ding-Yi Chen <dchen>
Component: UsabilityAssignee: Michelle Kim <mkim>
Status: CLOSED UPSTREAM QA Contact: Zanata-QA Mailling List <zanata-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: developmentCC: aeng, dchen, zanata-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1006063 Environment:
Last Closed: 2015-07-29 02:49:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1006063    
Bug Blocks:    

Description Ding-Yi Chen 2013-09-26 23:58:52 UTC
When project maintainer change the validation level to warning or error, it is expected that:
 1. On level warning: warning messages should be shown whenever invalid translation is detected.
 2. On level error: error messages should be shown whenever invalid translation is detected, and the invalid should not be saved to file.


Test Basis: https://github.com/zanata/zanata-server/wiki/Translation-Validation

Data preparation:
 1. Set the validation level to Off on "printf"
 2. Set the validation level to warning on "tab"
 3. In translation editor, edit a translated document.
    a. 1st translation is valid
    b. 2nd translation trigger the error (such as excess %d)
    c. 3rd translation trigger the warning (such as excess tab \t)
    d. 4th translation and rest are empty
 4. Set the validation level to Error on "printf"

Steps to reproduce:
I. Download using GWT Document list
 1. Go to Projects->[ProjectName]->[VersionName]->[LocaleName]
    GWT Document list should be shown.
 2. Download by clicking .po

 Expected:
   After download, message 2 should produced an error message.
   After download, message 3 should produced an warning message.
   In .po file, message 1 and 3 should be saved. 
   In .po file, message 2 should NOT be saved. 
   The other messages are empty.

 Actual:
   ! After download, message 2 DID NOT produce an error message.
   ! After download, message 3 DID NOT produce an warning message.
   In .po file, message 1 and 3 were saved. 
   ! In .po file, message 2 was MISTAKENLY saved. 
   The other messages were empty.

 (!) stands for where actual does not meet expectation.

II. Download using JSF Document list
 1. Go to Projects->[ProjectName]->[VersionName]->Documents Icon in [LocaleName]
    A JSF Document list should be shown.
 2. Download by clicking .po

 Expected:
   After download, message 2 should produced an error message.
   After download, message 3 should produced an warning message.
   In .po file, message 1 and 3 should be saved. 
   In .po file, message 2 should NOT be saved. 
   The other messages are empty.

 Actual:
   ! After download, message 2 DID NOT produce an error message.
   ! After download, message 3 DID NOT produce an warning message.
   In .po file, message 1 and 3 were saved. 
   ! In .po file, message 2 was MISTAKENLY saved. 
   The other messages were empty.

III. Client pull
 1. mvn zanata:pull -Dzanata.locales=<locale>

 Expected:
   After download, message 2 should produced an error message.
   After download, message 3 should produced an warning message.
   In .po file, message 1 and 3 should be saved. 
   In .po file, message 2 should NOT be saved. 
   The other messages are empty.

 Actual:
   ! After download, message 2 DID NOT produce an error message.
   ! After download, message 3 DID NOT produce an warning message.
   In .po file, message 1 and 3 were saved. 
   ! In .po file, message 2 was MISTAKENLY saved. 
   The other messages were empty.

Comment 2 Damian Jansen 2015-07-14 00:21:01 UTC
Reassigned to PM

Comment 3 Zanata Migrator 2015-07-29 02:49:09 UTC
Migrated; check JIRA for bug status: http://zanata.atlassian.net/browse/ZNTA-212