+++ This bug was initially created as a clone of Bug #831894 +++ Split from Bug #759983 point number 2. It sort of overlaps a bit with Bug #831887 Currently there isn't a proper way to tell what percentage a Translation Document is at via the REST API without trying to manually calculate it using the number of strings in the Source Document and the number of available translated text-flows in the Translation Document. As such it would be handy if there was a mechanism to get this type of information via the REST API. --- Additional comment from sflaniga on 2012-06-14 13:39:27 EST --- Would you want to fetch all locale stats for a document at once, or separately? --- Additional comment from mcaspers on 2012-06-19 13:40:17 EST --- Stats would be fetched at the document level and at the view, and return stats for all locales at once. --- Additional comment from camunoz on 2012-08-13 10:28:57 EST --- Reassigning to add client enhancements. --- Additional comment from camunoz on 2012-08-13 13:42:29 EST --- Added java and maven client statistics commands. For details on usage type mvn zanata:help -Dgoal=stats -Ddetail Zanata maven client 1.8.0-SNAPSHOT See: https://github.com/zanata/zanata/commit/b3628c711f5e8239387902291aaf04f915d1ab24 https://github.com/zanata/zanata/commit/201587b0c50d78b54de3b7e13e40c9af5a40dea8 https://github.com/zanata/zanata/commit/89527b89a61e425723487185ae5cc3943c322fdb
Tested with Zanata version 1.8.0-SNAPSHOT (20120821-1123) maven client API version: 1.8.0-SNAPSHOT In include detail mode (-Dzanata.details), if the project version contains documents without content, it returns HTTP 500 error. Step to reproduce: mvn -e zanata:stats -Dzanata.project=SELinuxGuide -Dzanata.projectVersion=f12 -Dzanata.details Actual result: Expect result: Run without error, while the statistic of empty documents should also correctly shown. i.e. Total:0, translated:0, NeedReview:0, Untranslated: 0 Reassigned.
Fixed for documents with no translation units. The UI should show '(No Content)' as usual, and the REST API will show 'Total:0, translated:0, NeedReview:0, Untranslated: 0'. See: https://github.com/zanata/zanata/commit/0c549aa710d0c5e3a810d1fadeecf787cb0e0363
VERIFIED with Zanata version 1.8.0-SNAPSHOT (20120822-0015) client API version: 1.8.0-SNAPSHOT, server API version: 1.8.0-SNAPSHOT
Fix released in Zanata 2.0.