Hi Mario

maybe you can look at how Weblate operates:

https://docs.weblate.org/en/latest/admin/continuous.html

In short, Weblate is web front end to edit translation files in VCS
repository. In the demo server, the VCS repository has po files, that's
why you get them, in case it would be JSON, you would get JSON.

I've also updated the API docs to be more clear on this:

https://docs.weblate.org/en/latest/api.html#get--api-translations-(stri
ng-project)-(string-component)-(string-language)-file-

Best regards
-- 
        Michal Čihař | https://cihar.com/ https://weblate.org/


Mario Ernst píše v Čt 25. 08. 2016 v 11:59 +0200:
> Hi Michal, 
> 
> thx for the quick response!
> 
> Since I do not really know Weblate I am unsure how to manage the data
> input (as JSON) and how to request the data (since request without
> given a format delivers PO).
> 
> Is there is any documentation or example how to handle JSON?
> 
> Thanks in advance!
> 
> Regards, Mario
> 
> On Wed, Aug 24, 2016 at 5:32 PM, Michal Čihař <[email protected]>
> wrote:
> > Hi Mario
> > 
> > Mario Ernst píše v St 24. 08. 2016 v 16:51 +0200:
> > > I try to get the localizations via API from the demo. This works,
> > but
> > > what I get is a PO-file. The documentation says, that generally
> > JSON
> > > is supported, but obviously not as a parameter for the file
> > download
> > > here: https://demo.weblate.org/api/translations/hello/master/de/f
> > ile/
> > > . Other formats do work though. 
> > >
> > > Since I want to process the localization in JavaScript, is there
> > a
> > > way to get JSON-files (not only for some stats, but for the real
> > > localizations)?
> > 
> > Indeed Weblate can not convert to JSON on the fly, however if you
> > have
> > JSON translation, you can download it without specifying format at
> > all.
> > 
> > --
> >         Michal Čihař | https://cihar.com/ | https://weblate.org/
> > 
> 

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Weblate mailing list
[email protected]
https://lists.cihar.com/cgi-bin/mailman/listinfo/weblate

Reply via email to