Skip to content

Commit

Permalink
Upgrade to Crowdin V2 APIs (#9954)
Browse files Browse the repository at this point in the history
* use crowdin v2 apis

* rename crowdin API

* add projectid setting

* fix test mode

* copy pxt-translations crowdin config
  • Loading branch information
riknoll authored Apr 10, 2024
1 parent cffd252 commit b92e911
Show file tree
Hide file tree
Showing 6 changed files with 589 additions and 504 deletions.
8 changes: 4 additions & 4 deletions cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,14 +449,14 @@ async function ciAsync() {
if (branch === "master" && isTaggedCommit) {
if (uploadDocs) {
await buildWebStringsAsync();
await crowdin.execCrowdinAsync("upload", "built/webstrings.json");
await crowdin.uploadBuiltStringsAsync("built/webstrings.json");

for (const subapp of SUB_WEBAPPS) {
await crowdin.execCrowdinAsync("upload", `built/${subapp.name}-strings.json`);
await crowdin.uploadBuiltStringsAsync(`built/${subapp.name}-strings.json`);
}
}
if (uploadApiStrings) {
await crowdin.execCrowdinAsync("upload", "built/strings.json");
await crowdin.uploadBuiltStringsAsync("built/strings.json");
}
if (uploadDocs || uploadApiStrings) {
await crowdin.internalUploadTargetTranslationsAsync(uploadApiStrings, uploadDocs);
Expand Down Expand Up @@ -7020,7 +7020,7 @@ ${pxt.crowdin.KEY_VARIABLE} - crowdin key
advanced: true,
}, pc => uploadTargetRefsAsync(pc.args[0]));
advancedCommand("uploadtt", "upload tagged release", uploadTaggedTargetAsync, "");
advancedCommand("downloadtrgtranslations", "download translations from bundled projects", crowdin.downloadTargetTranslationsAsync, "<package>");
advancedCommand("downloadtrgtranslations", "download translations from bundled projects", crowdin.downloadTargetTranslationsAsync, "[package]");

p.defineCommand({
name: "checkdocs",
Expand Down
Loading

0 comments on commit b92e911

Please sign in to comment.