Bug 1192271 - For gettext plural project, project-version statistics was inconsistent between language and document ( sometime more than 100%)
For gettext plural project, project-version statistics was inconsistent betwe...
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Community
Component: Component-Logic (Show other bugs)
3.6
Unspecified Unspecified
unspecified Severity high
: ---
: 3.6
Assigned To: Alex Eng
Ding-Yi Chen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-02-12 21:34 EST by Ding-Yi Chen
Modified: 2015-03-19 03:10 EDT (History)
1 user (show)

See Also:
Fixed In Version: 3.6.0-SNAPSHOT (git-jenkins-zanata-server-github-pull-requests-2744)
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-19 03:10:15 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)
Statistics shows more than 100% (94.95 KB, image/png)
2015-02-12 21:34 EST, Ding-Yi Chen
no flags Details

  None (edit)
Description Ding-Yi Chen 2015-02-12 21:34:21 EST
Created attachment 991188 [details]
Statistics shows more than 100%

Description of problem:
After pushed translations of gettext plural project, the statistics shown in project-version view was inconsistent between languages and documents. Some documents are over 100%

See the screenshot for detail

Version-Release number of selected component (if applicable):
Zanata 3.6.0-SNAPSHOT (git-server-3.5.1-152-g3b2474e)

How reproducible:
Always

Steps to Reproduce:
1. Download GNU tar-1.27.1 with http://ftp.gnu.org/gnu/tar/tar-1.27.1.tar.gz and extract it 
2. Create project tar, version 1.27.1
3. Upload tar.pot under tar-<ver>/po/tar.pot
4. Upload de.po under tar-<ver>/po/de.po as German translation (de)
5. Go to project-version view of tar/1.27.1
6. Click language tab
7. Click the language German (de)

Actual results:
In languages column, German is 96.62% translated
In Documents column, Document tar is  110.66% translated

Expected results:
In languages column and document column should show same percentage. (96.62%)


Additional info:
Statistics in translation editor was correct.
Comment 1 Alex Eng 2015-02-15 19:33:28 EST
Statistic looks fine when trying to reproduce the issue with given data. Please try retest with your local cache cleared.
Comment 2 Ding-Yi Chen 2015-02-15 22:31:19 EST
To reproduce the bug seems more complicate that I originally thought.

My steps to reproduced in test server:
1. Add a new locale in zanata.xml (Add a new language in Zanata server if necessary)

2. Push with 
mvn -e  org.zanata:zanata-maven-plugin:push -Dzanata.pushType=both -Dzanata.srcDir=po -Dzanata.transDir=po -Dzanata.url=$ZANATA_URL

3. In Web UI, check the statistics of new locales.

Actual results:
Statistics of new locales shown in languages column and documents column were inconsistent.

Expected:
Statistics of locales shown in languages column and document are consistent.

Upload from web UI seems fine now.

Workaround: (Admin only)
1.  Go to Administration Menu -> Server Monitoring
2. look for "Data caches", expends it. 
3. Search for "org.zanata.service.impl.TranslationStateCacheImpl.documentStatisticCache", 
4. Click the recycle bin icon at the end of that row
Comment 3 Alex Eng 2015-02-16 01:22:47 EST
Pull request:
https://github.com/zanata/zanata-server/pull/695
Comment 4 Ding-Yi Chen 2015-02-18 01:05:58 EST
VERIFIED with Zanata 3.6.0-SNAPSHOT (git-jenkins-zanata-server-github-pull-requests-2744)

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