Bug 868736 - copyTrans should only happen when pushing source strings
copyTrans should only happen when pushing source strings
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Community
Component: Component-Maven (Show other bugs)
development
Unspecified Unspecified
unspecified Severity medium
: ---
: 2.0
Assigned To: Carlos Munoz
Ding-Yi Chen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-21 21:51 EDT by Ding-Yi Chen
Modified: 2012-11-07 01:19 EST (History)
2 users (show)

See Also:
Fixed In Version: 1.8.0-SNAPSHOT (20121023-0030)
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-07 01:19:09 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ding-Yi Chen 2012-10-21 21:51:09 EDT
Description of problem:
In present version, 
pushType source implies copyTrans on, while pushType=both or trans implies copyTrans off.

However, "[INFO] Copy previous translations: true" still appears even when pushType=trans. 
This message is misleading. Please either
1) Hide copyTrans status unless it is given in command line of setting files.
or
2) Actually contact server and return whether server is going to do the copyTrans

1) should be a simpler fix, and "copyTrans is not specified" implies "use server default", thus no further change is needed even when server default changed.

2) should give the users the clear message that how server actually behave, but need to consider the behavior changes in different server versions.


Version-Release number of selected component (if applicable):
Zanata version 1.8.0-SNAPSHOT (20121019-1428)
INFO] client API version: 1.8.0-SNAPSHOT, server API version: 1.8.0-SNAPSHOT 

How reproducible:
Always 

Steps to Reproduce:
1. Assume a project and version is created
2. mvn -e zanata:push -Dzanata.pushType=both
  
Actual results:
"[INFO] Copy previous translations: true" still appears even when pushType=trans. 

Expected results:
1) Hide copyTrans status unless it is given in command line of setting files.
or
2) Actually contact server and return whether server is going to do the copyTrans
Comment 1 Sean Flanigan 2012-10-21 22:04:34 EDT
> pushType source implies copyTrans on, while pushType=both or trans implies copyTrans off

Not quite, but copyTrans only makes sense when pushing source strings.

If the source is being pushed (ie pushType=both or pushType=source), copyTrans should be enabled.  If only the translations are pushed, copyTrans is irrelevant.

When pushType=trans, we should (a) not ask the server to perform copyTrans, and (b) the log message should say something like "Copy previous translations: disabled since pushType=trans".  

This will make the copyTrans behaviour similar to Zanata 1.7, which only requests copyTrans when pushing source documents (since copyTrans used to be an option of putTranslations, not a separate REST API feature).
Comment 2 Carlos Munoz 2012-10-21 23:49:34 EDT
Copy trans should only happen now when pushing source files (pushType = 'source' or 'both').

In case the copy Trans option is specified, but only translations are pushed, the client will disable copy trans and will inform the user in the initial confirmation message.

See:
https://github.com/zanata/zanata-client/commit/5079efb86b1fada007d7df22f5cf8856550b9c7e
Comment 3 Ding-Yi Chen 2012-10-22 21:02:54 EDT
VERIFIED with Zanata version 1.8.0-SNAPSHOT (20121023-0030)
client API version: 1.8.0-SNAPSHOT, server API version: 1.8.0-SNAPSHOT
Comment 4 Sean Flanigan 2012-11-07 01:19:09 EST
Fix released in Zanata 2.0.

Note You need to log in before you can comment on or make changes to this bug.