microsoft / pxt

Microsoft MakeCode (PXT - Programming eXperience Toolkit)
https://makecode.com
MIT License
2.08k stars 579 forks source link

Upgrade Crowdin API's #9539

Open Jaqster opened 1 year ago

Jaqster commented 1 year ago

Message from Crowdin - Hello, You've received this email because you're currently using Crowdin API v1 or services built upon it (e.g., CLI, SDK, etc.). In our continuous effort to provide you with the best experience and improved functionality, we will be removing API v1 from our platform. Effective from November 30, 2023, API v1 will no longer be supported. This change means that any integrations, tools like CLI, SDK, or other services relying on API v1 will cease to function. To ensure uninterrupted service, we recommend migrating to API v2, which offers enhanced features and compatibility. Learn more:

From Joey - The docs upload path in the CI builds still is using v1 api, I had given it a quick shot and backed off upgrading it back when I changed how the backend read out the translations from the server making requests to our backup repo- it was very early in their v2 api and it was missing lots of functionality that appear to have been added since then (also, that upload path in our cli is a little clunky at the best of times, e.g. the way it handles making sure folders exist is to just send a "make folder" request for each subfolder and checking the error code to see if the folder already existed). While we're making changes we should give it another look to see how we can trim it down to only upload changed files, as it's taking a big chunk of our build time currently.

sae220 commented 6 months ago

I'd like to help for this issue but how can I test for my code? I think I need crowdin API key for development.

sae220 commented 6 months ago

I noticed I can generate crowdin API key by myself. Now I'm updating some code for crowdin API v2 with the test by my API key. But some API endpoints (/projects/{projectId}/files) return 403 response. I want to test how it work with recursion parameter. I guess it is needed that crowdin manager make some treatment for my key.

sae220 commented 6 months ago

It is still in the middle but I updated some code into using crowdin api v2. https://github.com/sae220/pxt/commit/38d6fed0922ba03420f38d2b2cf1f5488a24b600 I'll update the rest of code and test some. After that I'll create pull request.

ganicke commented 5 months ago

@sae220 - some upgrade work was done to update to the V2 API in #9954.