Bug 1012502 - server should never store fuzzy flag against a source document's textflows
Summary: server should never store fuzzy flag against a source document's textflows
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Zanata
Classification: Retired
Component: Component-UI
Version: 3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.3
Assignee: Patrick Huang
QA Contact: Zanata-QA Mailling List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-26 14:55 UTC by Nilamdyuti
Modified: 2014-06-30 23:41 UTC (History)
5 users (show)

Fixed In Version: 3.3.0-SNAPSHOT (20131204-0037)
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-03-20 05:47:39 UTC
Embargoed:


Attachments (Terms of Use)
Source file (156.52 KB, application/vnd.ms-powerpoint)
2013-10-03 08:46 UTC, Ding-Yi Chen
no flags Details
Translation with fuzzy tag (299.21 KB, text/plain)
2013-10-03 08:46 UTC, Ding-Yi Chen
no flags Details

Description Nilamdyuti 2013-09-26 14:55:14 UTC
Description of problem:

While doing RHEL7 Software Localization for Tier1 Applications in Zanata, I found that virt-manager whose translation status in Zanata is 100%, actually shows incomplete and 9 fuzzy entries when downloaded and checked by running msgfmt command. I downloaded the .po file, corrected the fuzzy entries, confirmed that the .po file is 100% translated by running msgfmt command and uploaded to Zanata. In Zanata, it showed 100% as it did previously but when downloaded and checked again via msgfmt, it again showed the .po file as incomplete and having 9 fuzzy entries.

Version-Release number of selected component (if applicable):

3.0.3


How reproducible:

Always

Steps to Reproduce:

1. Go to this link: https://translate.engineering.redhat.com/version-group/view/RHEL7

2. Login to your account

3. Go to virt-manager

4. Click on version 0.10.0

5. Click on 'as'

6. Download the .po file and check by running msgfmt command.

Actual results:

Translation status shows 100% in UI whereas after running msgfmt command on the downloaded .po file it shows incomplete and having 9 fuzzy entries.


Expected results:

Translation status should not show 100% in UI and show the real status along with the fuzzy entries as msgfmt shows for the downloaded .po file.

Comment 1 Sweta Kothari 2013-09-27 09:07:15 UTC
It's same issue for Gujarati (gu).

Comment 2 Sean Flanigan 2013-10-03 02:51:43 UTC
It sound like a rounding problem, since 9 messages out of 1705 is less than 1%.

Comment 3 Sean Flanigan 2013-10-03 06:06:12 UTC
This seems to be fixed already, for version 3.1.

Comment 4 Ding-Yi Chen 2013-10-03 08:39:12 UTC
The rounding problem was reported and fixed as Bug 741509.

However, the real problem is not statistic, it is Zanata keep outputting those messages as fuzzy. 

No matter you save them as translated in either web translation editor, or upload the .po file with all fuzzy tag removed.

Tested with Zanata version 3.1-SNAPSHOT (20131003-1234):

Steps to reproduce: (pretty much the same with original bug report):
0. Download virt-manager.pot and virt-manager.fuzzy.po 
1. Create a new project (virt-manager) and new version (test1) in server that runs 3.1-SNAPSHOT, project-type is gettext
2. Upload virt-manager.pot as source
3. Upload virt-manager.fuzzy.po as translation
4. Use web translation editor to save those fuzzy as translated.
   The translation is now 100% completed.
5. Download the translation file as virt-manager.po

Expected:
No fuzzy translation in virt-manager.po

Actual:
9 fuzzy translation in virt-manager.po


Reassigned.

Comment 5 Ding-Yi Chen 2013-10-03 08:46:11 UTC
Created attachment 806921 [details]
Source file

Comment 6 Ding-Yi Chen 2013-10-03 08:46:55 UTC
Created attachment 806922 [details]
Translation with fuzzy tag

Comment 7 Ding-Yi Chen 2013-10-04 02:12:02 UTC
Further tested with Zanata version 3.1-SNAPSHOT (20131004-0039), I found:

1. Other locales might have this problem.
2. It only happened if the fuzzy translations was uploaded, it does not happen
    if use WebUi to edit translation from empty, then save as fuzzy, then save 
   as translated.
3. Change the fuzzy translations then save as translated does not help.
4. If upload po in GWT document list, the project-version wide statistics is
    sometime different from the document statistics, even when you have only one 
   document.

Regards,

Comment 8 Ding-Yi Chen 2013-10-04 03:13:44 UTC
(In reply to Ding-Yi Chen from comment #7)
> 3. Change the fuzzy translations then save as translated does not help.

The changed content is saved, but it is still fuzzy despite you save it as translated in Web UI.

Comment 9 Sean Flanigan 2013-10-04 03:58:17 UTC
It looks like the affected strings were uploaded with a "fuzzy" flag in the POT file.  This flag was then copied to the PO file when downloading, just like the "python" flag on certain entries.  We should not be storing the fuzzy flag against POT files.  (They shouldn't even be there, as far as I can see.)

As a workaround, you could try removing the fuzzy flag from the POT and uploading it again.  After that, the spurious fuzzy flag should not be added when downloading the PO files.

Comment 10 Sean Flanigan 2013-10-04 04:01:08 UTC
(In reply to Ding-Yi Chen from comment #7)
> 4. If upload po in GWT document list, the project-version wide statistics is
>     sometime different from the document statistics, even when you have only
> one 
>    document.

This sounds like it should be a separate bug.

Comment 11 Patrick Huang 2013-11-28 22:52:02 UTC
https://github.com/zanata/zanata-server/pull/302

Comment 12 Ding-Yi Chen 2013-12-04 05:19:20 UTC
Tested with Zanata version 3.3.0-SNAPSHOT (20131204-0037)

When encounter a fuzzy source entry, the process stopped and showed following error message:

Upload Failed! Caused by: Please remove fuzzy flags from document. First fuzzy flag was found on text flow ace54e180da734297e3e84ca5c6966d2 with content [Cancel the job?] 

The expected and the most convenient way is  just ignore the fuzzy tag, but show warning.
i.e. the upload/push should not stop.

Reassigned.

Comment 13 Sean Flanigan 2013-12-04 05:20:48 UTC
I think it should stop, because it means the source file is broken.  Otherwise the file will probably never be fixed.

Comment 14 Ding-Yi Chen 2013-12-04 05:28:26 UTC
> I think it should stop, because it means the source file is broken. 
> Otherwise the file will probably never be fixed.

Indeed. I will verify this bug with Zanata version 3.3.0-SNAPSHOT (20131204-0037).

Comment 15 Sean Flanigan 2013-12-04 23:45:56 UTC
One thing: was the correct error message given to the user for both upload methods: web and client?

Comment 16 Sean Flanigan 2014-03-20 05:47:39 UTC
Closing VERIFIED bugs for Zanata server 3.3.2.

Comment 17 Ding-Yi Chen 2014-06-30 23:41:20 UTC
Seem like the both client and Web UI error messages themselves are correct.

From client:

[ERROR] Operation failed: Failed while pushing document: [Please remove fuzzy flags from document. First fuzzy flag was found on text flow ace54e180da734297e3e84ca5c6966d2 with content [Cancel the job?]]

    To retry from the last document, please set the following option(s):

        -Dzanata.fromDoc="virt-manager"



From web UI:

Upload Failed! Caused by: Please remove fuzzy flags from document. First fuzzy flag was found on text flow ace54e180da734297e3e84ca5c6966d2 with content [Cancel the job?]

But you can help us fix it!


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