Skip to content

Commit

Permalink
Fixed target languages
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalii-bezuhlyi committed Mar 6, 2024
1 parent ac6bcf1 commit 78e1892
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Apps.Memoq/Actions/FileActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,18 @@ public async Task<UploadFileResponse> UploadAndImportFileToProject(
});

await _restClient.ExecuteAsync(restRequest3);

string[]? targetLanguages = request.TargetLanguageCodes?.ToArray() ?? Array.Empty<string>();
if (targetLanguages.Length == 0)
{
targetLanguages = null;
}

var result = await projectService.Service
.ImportTranslationDocumentAsync(
Guid.Parse(request.ProjectGuid),
uploadFileResult,
request.TargetLanguageCodes?.ToArray() ?? Array.Empty<string>(),
targetLanguages,
null);

var restRequest4 = new RestRequest(string.Empty, Method.Post).AddJsonBody(new
Expand Down

0 comments on commit 78e1892

Please sign in to comment.