Red Hat Bugzilla – Bug 1192271
For gettext plural project, project-version statistics was inconsistent between language and document ( sometime more than 100%)
Last modified: 2015-03-19 03:10:15 EDT
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)
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)
In languages column, German is 96.62% translated
In Documents column, Document tar is 110.66% translated
In languages column and document column should show same percentage. (96.62%)
Statistics in translation editor was correct.
Statistic looks fine when trying to reproduce the issue with given data. Please try retest with your local cache cleared.
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.
Statistics of new locales shown in languages column and documents column were inconsistent.
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
VERIFIED with Zanata 3.6.0-SNAPSHOT (git-jenkins-zanata-server-github-pull-requests-2744)