Closed Mte90 closed 5 years ago
I am studying the wp core but they use wp as framework also to do query to the db and generate the locales list and put that in cache. also they point to the various zip packages for the locale and version. So I don't know where this endpoints are placed but we can do rest request to our GP instance and generate what we need as static json. I am looking also other porjects like https://github.com/Automattic/wc-lang-packs-server to see how to do at the best.
Another option if the endpoint are not accessing to the db is put the code for them on the translate.cp instance with a plugin that will generate this endpoint.
Maybe the best solution is to do a wpcli plugin that generate the json for the endpoint translations
and that during that process generate the various zip package for all the locales.
In that way we can avoid to do develop plugins for GP for the various endpoints and reuse the code of WP.org.
Our update API and GlotPress are on separate servers so we won't be able to get this directly from the db.
I think a WP-CLI script to generate the needed files is a good idea. We can run it every night and make the files publicly available.
https://github.com/ClassicPress/ClassicPress-Network/pull/19/, this generate a json file but we need to define few things before to release and test it.
We are working to get a better endpoint with the domain.
As https://github.com/ClassicPress/ClassicPress-v1/issues/194 we need to add the translation endpoint. The original code of wordpress for that is at https://meta.svn.wordpress.org/sites/trunk/api.wordpress.org/public_html/translations/
I am looking on that