Bug 255775 - Open a REST API for people to query for translations
Summary: Open a REST API for people to query for translations
Status: RESOLVED FIXED
Alias: None
Product: Babel
Classification: Technology
Component: Server (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Babel server inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 223036
  Show dependency tree
 
Reported: 2008-11-19 07:19 EST by Antoine Toulmé CLA
Modified: 2009-01-05 09:32 EST (History)
0 users

See Also:


Attachments
A first naive patch (1.72 KB, patch)
2008-11-19 08:53 EST, Antoine Toulmé CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Toulmé CLA 2008-11-19 07:19:49 EST
I think it would be great to provide translations through a REST API as well for integration into clients (or other Babel installations scavenging the Babel resources).

I think the REST API could be something like this:

http://babel.eclipse.org/babel/query.php?nl=iso_code&string=string

The API should return the first available translation (for now, we can do a fancy JSON array of all the translations for one english string later) as a plain text response.
Comment 1 Antoine Toulmé CLA 2008-11-19 07:22:19 EST
This bug represents half of the work needed for 223036.
Comment 2 Antoine Toulmé CLA 2008-11-19 08:53:29 EST
Created attachment 118243 [details]
A first naive patch

Here is a first naive patch that needs testing.
Comment 3 Antoine Toulmé CLA 2008-11-24 08:33:53 EST
Committed to staging by mistake along with the fix for 241055.
Comment 4 Antoine Toulmé CLA 2008-11-24 08:54:51 EST
Committed a small change to fix the page initialization. At this time things look good.

Try it out with this simple string:
http://babel.eclipse.org/staging/query.php?nl=fr&string=Synonym
Comment 5 Antoine Toulmé CLA 2008-12-24 08:55:53 EST
Marking as fixed. Please reopen if you want more of it.
Comment 6 Denis Roy CLA 2008-12-24 09:35:39 EST
Thanks.  Do we have a link to this from the Server tool?  Or should we start a Babel doc page on the Wiki?
Comment 7 Antoine Toulmé CLA 2008-12-29 06:32:10 EST
(In reply to comment #6)
> Thanks.  Do we have a link to this from the Server tool?  Or should we start a
> Babel doc page on the Wiki?
> 

We have no doc for this. I will do one.
Comment 8 Antoine Toulmé CLA 2008-12-29 13:45:44 EST
Fixed.

I opened a page for the server API:

http://wiki.eclipse.org/Babel_/_Server_Tool_API
Comment 9 Denis Roy CLA 2009-01-05 09:32:55 EST
Cool!