Bug 1002774

Summary: Source string with translation changed plural will cause incomplete download file
Product: [Retired] Zanata Reporter: Patrick Huang <pahuang>
Component: Component-LogicAssignee: Patrick Huang <pahuang>
Status: CLOSED CURRENTRELEASE QA Contact: Ding-Yi Chen <dchen>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.0CC: dchen, pahuang, sflaniga, zanata-bugs
Target Milestone: ---   
Target Release: 3.1   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: 3.1-SNAPSHOT (20130923-0037) Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-27 03:23:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Patrick Huang 2013-08-30 00:37:12 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: 

Example:
A source string in plural form gets translated in a language with 2 plurals.
It then changed to singular form. The second translated string will still sit in database and when pulling, that second string will be attempted to be written out and cause an error in client (if download from UI it will silently fail and output a halfway file). 

Reproducible: Always

Steps to Reproduce:
1. Push a pot with one string in plural form
2. Pick a language that supports plural > 1
3. Translate the string and save
4. Change the pot and make the string singular
5. download from server
Actual Results:  
Downloaded file will stop at that string

Expected Results:  
When server generating the file it should ignore the unused plural translation and continue so that a complete po file gets written out. Meanwhile somehow inform the user this issue.

Comment 1 Patrick Huang 2013-08-30 00:44:30 UTC
When this situation happens, editor will not display the extra leftover translation, but the underlying model will still store it and thus when launching translation history, it will always have an unsaved entry at the top. We need to make sure server never return inconsistent (plural in source and target) DTO like this.

Comment 2 Sean Flanigan 2013-08-30 08:02:15 UTC
Pull request: https://github.com/zanata/zanata-server/pull/150

Comment 3 Sean Flanigan 2013-09-18 00:13:07 UTC
The PR was merged.  Can we put this ON_QA?

Comment 4 Ding-Yi Chen 2013-09-23 00:39:41 UTC
VERIFIED with Zanata version 3.1-SNAPSHOT (20130923-0037)
zanata-cli-3.1.2

Comment 5 Sean Flanigan 2013-11-27 03:13:12 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 6 Sean Flanigan 2013-11-27 03:15:18 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 7 Sean Flanigan 2013-11-27 03:18:21 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 8 Sean Flanigan 2013-11-27 03:23:11 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 9 Sean Flanigan 2013-11-27 03:33:03 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 10 Sean Flanigan 2013-11-27 03:35:18 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.