Bug 1012502 - server should never store fuzzy flag against a source document's textflows
server should never store fuzzy flag against a source document's textflows
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Community
Component: Component-UI (Show other bugs)
3.0
Unspecified Unspecified
unspecified Severity high
: ---
: 3.3
Assigned To: Patrick Huang
Zanata-QA Mailling List
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-26 10:55 EDT by Nilamdyuti
Modified: 2014-06-30 19:41 EDT (History)
5 users (show)

See Also:
Fixed In Version: 3.3.0-SNAPSHOT (20131204-0037)
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-03-20 01:47:39 EDT
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)
Source file (156.52 KB, application/vnd.ms-powerpoint)
2013-10-03 04:46 EDT, Ding-Yi Chen
no flags Details
Translation with fuzzy tag (299.21 KB, text/plain)
2013-10-03 04:46 EDT, Ding-Yi Chen
no flags Details

  None (edit)
Description Nilamdyuti 2013-09-26 10:55:14 EDT
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 05:07:15 EDT
It's same issue for Gujarati (gu).
Comment 2 Sean Flanigan 2013-10-02 22:51:43 EDT
It sound like a rounding problem, since 9 messages out of 1705 is less than 1%.
Comment 3 Sean Flanigan 2013-10-03 02:06:12 EDT
This seems to be fixed already, for version 3.1.
Comment 4 Ding-Yi Chen 2013-10-03 04:39:12 EDT
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 04:46:11 EDT
Created attachment 806921 [details]
Source file
Comment 6 Ding-Yi Chen 2013-10-03 04:46:55 EDT
Created attachment 806922 [details]
Translation with fuzzy tag
Comment 7 Ding-Yi Chen 2013-10-03 22:12:02 EDT
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-03 23:13:44 EDT
(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-03 23:58:17 EDT
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 00:01:08 EDT
(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 17:52:02 EST
https://github.com/zanata/zanata-server/pull/302
Comment 12 Ding-Yi Chen 2013-12-04 00:19:20 EST
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 00:20:48 EST
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 00:28:26 EST
> 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 18:45:56 EST
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 01:47:39 EDT
Closing VERIFIED bugs for Zanata server 3.3.2.
Comment 17 Ding-Yi Chen 2014-06-30 19:41:20 EDT
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.