diff --git a/Apps.Crowdin/Actions/TaskActions.cs b/Apps.Crowdin/Actions/TaskActions.cs index 6bb1525..ff6eb1a 100644 --- a/Apps.Crowdin/Actions/TaskActions.cs +++ b/Apps.Crowdin/Actions/TaskActions.cs @@ -14,6 +14,7 @@ using Blackbird.Applications.Sdk.Utils.Utilities; using Crowdin.Api.Tasks; using TaskStatus = Crowdin.Api.Tasks.TaskStatus; +using System.IO; namespace Apps.Crowdin.Actions; @@ -127,8 +128,8 @@ [ActionParameter] [Display("Task ID")] string taskId) if (downloadLink is null) throw new("No string found for this task"); - var fileContent = await FileDownloader.DownloadFileBytes(downloadLink.Url, _fileManagementClient); - - return new(fileContent); + var fileContent = await FileDownloader.DownloadFileBytes(downloadLink.Url); + var file = await _fileManagementClient.UploadAsync(fileContent.FileStream, fileContent.ContentType, fileContent.Name); + return new(file); } } \ No newline at end of file diff --git a/Apps.Crowdin/Actions/TranslationActions.cs b/Apps.Crowdin/Actions/TranslationActions.cs index 1b5a208..0a58f41 100644 --- a/Apps.Crowdin/Actions/TranslationActions.cs +++ b/Apps.Crowdin/Actions/TranslationActions.cs @@ -49,8 +49,7 @@ public async Task PreTranslate( EngineId = intEngineId, DuplicateTranslations = input.DuplicateTranslations, TranslateUntranslatedOnly = input.TranslateUntranslatedOnly, - TranslateWithPerfectMatchOnly = input.TranslateWithPerfectMatchOnly, - MarkAddedTranslationsAsDone = input.MarkAddedTranslationsAsDone + TranslateWithPerfectMatchOnly = input.TranslateWithPerfectMatchOnly }; var response = await client.Translations .ApplyPreTranslation(intProjectId!.Value, request); diff --git a/Apps.Crowdin/Actions/TranslationMemoryActions.cs b/Apps.Crowdin/Actions/TranslationMemoryActions.cs index 9dd1eb5..7684f8e 100644 --- a/Apps.Crowdin/Actions/TranslationMemoryActions.cs +++ b/Apps.Crowdin/Actions/TranslationMemoryActions.cs @@ -12,6 +12,7 @@ using Blackbird.Applications.Sdk.Utils.Parsers; using Blackbird.Applications.Sdk.Utils.Utilities; using Crowdin.Api.TranslationMemory; +using System.IO; namespace Apps.Crowdin.Actions; @@ -114,8 +115,9 @@ public async Task DownloadTranslationMemory( var client = new CrowdinClient(Creds); var response = await client.TranslationMemory.DownloadTm(intTmId!.Value, input.ExportId); - var fileContent = await FileDownloader.DownloadFileBytes(response.Url, _fileManagementClient); - return new(fileContent); + var fileContent = await FileDownloader.DownloadFileBytes(response.Url); + var file = await _fileManagementClient.UploadAsync(fileContent.FileStream, fileContent.ContentType, fileContent.Name); + return new(file); } [Action("Add translation memory segment", Description = "Add new segment to the translation memory")] diff --git a/Apps.Crowdin/Apps.Crowdin.csproj b/Apps.Crowdin/Apps.Crowdin.csproj index b3c2bbd..bad5674 100644 --- a/Apps.Crowdin/Apps.Crowdin.csproj +++ b/Apps.Crowdin/Apps.Crowdin.csproj @@ -5,14 +5,14 @@ enable Crowdin Cloud-based solution that streamlines localization management - 1.0.3 + 1.0.4 Apps.Crowdin - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Apps.Crowdin/Models/Request/Translation/PreTranslateRequest.cs b/Apps.Crowdin/Models/Request/Translation/PreTranslateRequest.cs index 3ffb249..ac94e85 100644 --- a/Apps.Crowdin/Models/Request/Translation/PreTranslateRequest.cs +++ b/Apps.Crowdin/Models/Request/Translation/PreTranslateRequest.cs @@ -18,6 +18,4 @@ public class PreTranslateRequest [Display("Translate with perfect match only")] public bool? TranslateWithPerfectMatchOnly { get; set; } - [Display("Mark added translations as done")] - public bool? MarkAddedTranslationsAsDone { get; set; } } \ No newline at end of file