[zanata-bugs] [Bug 831887] RFE: List available Translation Locales via REST API

bugzilla at redhat.com bugzilla at redhat.com
Fri Jun 28 03:40:31 UTC 2013


https://bugzilla.redhat.com/show_bug.cgi?id=831887

--- Comment #9 from Ding-Yi Chen <dchen at redhat.com> ---
Original description is private, which cannot be view by outside stakeholder.
Thus, I repost it here with sensitive data removed.

Currently via the REST API there is no way to find what translations exist for
a Source Document. As such you need to send a request for each translation to
see if it exists. eg.

http://<zanataServer>/rest/projects/p/<proj>/iterations/i/<ver>/r/4767-48873/translations/pt-BR

Sean mentioned he believed the ITranslationResources.getResource() function
would do this but it only makes a call to the URL above. So if you don't know
what translations exist for each document then you are just sending requests
that are going to return a 404 response or a 403 response if the locale isn't
setup. eg.

404 response:
http://<zanataServer>/rest/projects/p/<proj>/iterations/i/<ver>/r/8816-134374/translations/pt-BR

403 response:
http://<zanataServer>/rest/projects/p/<proj>/iterations/i/<ver>/r/8816-134374/translations/ar

Currently using the ITranslationResources service and the Source Document all
you can do is get the Translation Strings for that Document. eg.

http://<zanataServer>/rest/projects/p/<proj>/iterations/i/<ver>/r/8816-134374/

As such it would be handy and something that would save a number of requests,
is if you could do a rest query to find out information about each Source
Document or Translated Document. eg. What translations exist for the document,
when it was last modified, etc..

An example query to list the available translations maybe something like:

http://<zanataServer>/rest/projects/p/<proj>/iterations/i/<ver>/r/8816-134374/translations

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=HZmTHEDNIh&a=cc_unsubscribe




More information about the zanata-bugs mailing list