Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Context parameter to Add file action #11

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Apps.Crowdin/Actions/FileActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ public async Task<FileEntity> AddFile(
DirectoryId = intDirectoryId,
Title = input.Title,
ExcludedTargetLanguages = input.ExcludedTargetLanguages?.ToList(),
AttachLabelIds = input.AttachLabelIds?.ToList()
AttachLabelIds = input.AttachLabelIds?.ToList(),
Context = input.Context
};

var file = await client.SourceFiles.AddFile(intProjectId!.Value, request);
Expand Down
2 changes: 1 addition & 1 deletion Apps.Crowdin/Apps.Crowdin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<Product>Crowdin</Product>
<Description>Cloud-based solution that streamlines localization management</Description>
<Version>1.0.7</Version>
<Version>1.0.8</Version>
<AssemblyName>Apps.Crowdin</AssemblyName>
</PropertyGroup>
<ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions Apps.Crowdin/Models/Request/File/AddNewFileRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ public class AddNewFileRequest
[Display("Directory ID")]
public string? DirectoryId { get; set; }

[Display("File context")]
public string? Context { get; set; }

public string? Title { get; set; }

[Display("Excluded target languages")]
Expand Down