Bug 848988 - RFE: Clients side support of Translation Documents Statistic via REST
Summary: RFE: Clients side support of Translation Documents Statistic via REST
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Zanata
Classification: Retired
Component: Component-Logic
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 2.0
Assignee: Runa Bhattacharjee
QA Contact: Ding-Yi Chen
URL:
Whiteboard:
Depends On: 831894
Blocks: 756657
TreeView+ depends on / blocked
 
Reported: 2012-08-17 02:14 UTC by Ding-Yi Chen
Modified: 2013-03-04 02:22 UTC (History)
7 users (show)

Fixed In Version: 1.8.0-SNAPSHOT (20120822-0015)
Story Points: ---
Clone Of: 831894
Environment:
Last Closed: 2012-11-07 06:19:28 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 831887 0 unspecified CLOSED RFE: List available Translation Locales via REST API 2021-02-22 00:41:40 UTC

Internal Links: 831887

Description Ding-Yi Chen 2012-08-17 02:14:01 UTC
+++ 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

Comment 1 Ding-Yi Chen 2012-08-21 02:46:43 UTC
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.

Comment 2 Carlos Munoz 2012-08-21 04:37:18 UTC
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

Comment 3 Ding-Yi Chen 2012-08-22 04:13:49 UTC
VERIFIED with Zanata version 1.8.0-SNAPSHOT (20120822-0015)
client API version: 1.8.0-SNAPSHOT, server API version: 1.8.0-SNAPSHOT

Comment 4 Sean Flanigan 2012-11-07 06:19:28 UTC
Fix released in Zanata 2.0.


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